kubernetes-sigs / cluster-api

Home for Cluster API, a subproject of sig-cluster-lifecycle
https://cluster-api.sigs.k8s.io
Apache License 2.0
3.57k stars 1.31k forks source link

ClusterClass MachinePool implementation is probably not able to rollout BootstrapConfig changes. #10496

Open sbueringer opened 6 months ago

sbueringer commented 6 months ago

Quoting from a different issue:

Can you please summarize what a user would have to do to rollout a change to a KubeadmConfig with a reguar cluster (not using ClusterClass). Is it as simple as modifying the KubeadmConfig object that is linked in a MachinePool directly?

Change MachinePool.spec.template.spec.bootstrap.configRef.name and the KubeadmConfig.spec changes will be reconciled. In practice, that means a user's KubeadmConfig.metadata.name should be suffixed with a hash (or increasing number) when making changes, and the reference in the MachinePool object gets changed to this new KubeadmConfig name. https://github.com/kubernetes-sigs/cluster-api/issues/8858#issuecomment-2051049208

The ClusterClass MachinePool implementation today uses one single BootstrapConfig / KubeadmConfig object for a MachinePool and just continuously patches it in-place to rollout changes.

Based on #8858 this is not enough, it seems to be required to rotate the BootstrapConfig object (create a new one + update the ref in MachinePool).

Someone would need to confirm if my observation is correct.

Furthermore I don't know if there is a documented contract as of today for MachinePools how BootstrapConfigs are supposed to be rolled out. I also don't know if MachinePools behave the same across providers today.

So my tl;dr:

k8s-ci-robot commented 6 months ago

This issue is currently awaiting triage.

CAPI contributors will take a look as soon as possible, apply one of the triage/* labels and provide further guidance.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
sbueringer commented 6 months ago

I don't have the know how about MachinePools and MachinePool implementations in providers to be 100% sure. I also don't have the time to do the required research, but I just wanted to surface this issue, so folks have a chance to fix it (or determine that everything is actually fine at the moment).

(cc @AndiDog @willie-yao, just fyi)

fabriziopandini commented 6 months ago

/priority important-longterm /kind bug

k8s-triage-robot commented 3 months ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

sbueringer commented 3 months ago

/remove-lifecycle stale

k8s-triage-robot commented 2 weeks ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

Sunnatillo commented 6 days ago

/assign