-
Notifications
You must be signed in to change notification settings - Fork 433
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
MachinePool bootstrap token do not get refreshed automatically when VMSS is manually/externally scaled #2683
Comments
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
/assign @BrennenMM7 |
@dthorsen: GitHub didn't allow me to assign the following users: BrennenMM7. Note that only kubernetes-sigs members with read permissions, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/assign @dthorsen |
/kind bug
What steps did you take and what happened:
A cluster with MachinePools and externally managed autoscaler is necessary for this bug to appear.
The reconciliation loop for AzureMachinePool does not automatically refresh bootstrap tokens once they get rotated. Writing of new bootstrap tokens into custom data is done only when there is a surge change or the VMSS model changes.
When scaling a VMSS manually or externally via cluster-autoscaler set to provider azure, the token in the VMSS custom data may already be outdated and therefore the new node can not join the cluster.
I believe there might be two separate issues:
patchVMSSIfNeeded
does not verify if custom data changed and therefore does not update it. To do this, we'd need to store e.g. a hash of custom data in theAzureMachinePool.Status
and compare the hashes.What did you expect to happen:
When Kubeadm bootstrap token refreshes, the VMSS custom data gets updated automatically and new nodes can join without issues.
Anything else you would like to add:
I'm aware that the prerequisites (MachinePools and externally managed cluster autoscaler) are a special case. I'm not sure how many users want to have an externally managed autoscaler and I'm personally testing whether I can switch to the cluster-api cluster-autoscaler provider.
However, I do think custom data changes should be considered in
patchVMSSIfNeeded
.To solve point two, I believe the AzureMachinePool controller would need to watch KubeadmConfig and then kick off a reconciliation. This might be even worth to consider in CAPI itself, since I expect this to be an issue for all CAP* providers.
The text was updated successfully, but these errors were encountered: