-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
request: provide a way to set labels on the machines created by the controlplane provider #58
Comments
high level looks go to me. I just want to double check how its being done for kubeadmcontrolplane. On the control plane machine as machine deployment topic, I don't think we want to go that route as it diverges too much from how the kubeadmcontrolplane works. We probably need to just implement the proper logic in this controlplane provider to get MHCs working. |
Maybe we should follow their pattern of using a ObjectMeta as the struct to pass in the labels? https://github.com/kubernetes-sigs/cluster-api/blob/8ba3f47b053da8bbf63cf407c930a2ee10bfd754/controlplane/kubeadm/api/v1alpha4/kubeadm_control_plane_types.go#L93C2-L93C67 |
I agree, following the conventions setup out by KCP would be a good approach. However, this would require a new API version (i.e. |
I agree @richardcase. This should be the north star. But can we figure out a way to split the difference until we are ready to take an api version bump? For now, can we stick ObjectMeta in an "undesirable" place while we maybe begin to think about what a new apiversion would look like? |
Cool I'll do this 👍 thanks |
Ah okay. Sounds good to me. I was mistaken in thinking that MHCs required MDs 👍 happy to contribute to this work at some point |
i have taken this intermediate approach that avoids the version bump by mimicking what kubeadm does. i understand that this additional spec field should someday go somewhere else. hopefully this is the middle-ground you're looking for. happy to rework if needed! |
Thats a good point @zawachte. Off the top of my head there are a couple of ways to do this:
I didn't see an issue to track future API changes so i created #62 |
when creating a machine deployment in cluster-api one can set labels on the created machines by specifying them in
.spec.template.metadata
. it would be nice if we could do something similar for the controlplane machines created by the k3s controlplane provider.it would be nice if controlplane machines could be created as
MachineDeployments
in order to benefit fromMachineHealthChecks
, however that's a separate discussion. given they are now created asMachines
i propose we add aMachineLabels map[string]string
optional field to theKThreesControlPlaneSpec
and set them onto the created machine ingenerateMachine()
.@zawachte if you prefer a different approach let me know, otherwise i'll get started on a PR to do this.
The text was updated successfully, but these errors were encountered: