-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Changed to use first_kube_control_plane to parse kubeadm_certificate_key #11875
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
Changed to use first_kube_control_plane to parse kubeadm_certificate_key #11875
Conversation
|
Hi @Xartos. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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-sigs/prow repository. |
|
Hum, if @nvalembois wrote the patch, maybe we should put it as author in the commit ? and I'm not sure how that interacts with the k-sigs CLA stuff ? |
Right, yea if it's easier then @nvalembois is free to create another PR instead of me and I'll close this one. As long as we get the fix then I'm happy |
|
You could also put
Co-Authored-By: Name <email>
At the end of the commit message. But I'm not sure the CLA bot take it into consideration though.
|
7ca8483 to
daad54a
Compare
|
Hmm, can't seem to see any details on what the CLA action looked at now so I can't tell. But let's see if @yankay knows |
|
I think you need to rebase on master for the CI, this is because of recent CI cleanups.
|
Co-Authored-By: nvalembois <[email protected]>
daad54a to
ef2a92c
Compare
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: VannTen, Xartos The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
…key (kubernetes-sigs#11875) Co-authored-by: nvalembois <[email protected]>
|
/cherrypick release-2.27 |
|
@VannTen: new pull request created: #12758 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-sigs/prow repository. |
Before "5ca23e3bf (Changed to use first_kube_control_plane to parse kubeadm_certificate_key (kubernetes-sigs#11875), 2025-01-14)", kubespray would have problem adding new control planes when the order of the nodes in kubectl output and the ansible inventory were not the same. But the underlying problem is that the operation is fundamentally something that should be done only once, and recorded for all host in play. Since `register` and `sef_fact` when used with `run_once` set the variable for all the hosts, use it. Also allows to use the variable directly instead of relying on hostvars to make the task more readable.
Before "5ca23e3bf (Changed to use first_kube_control_plane to parse kubeadm_certificate_key (#11875), 2025-01-14)", kubespray would have problem adding new control planes when the order of the nodes in kubectl output and the ansible inventory were not the same. But the underlying problem is that the operation is fundamentally something that should be done only once, and recorded for all host in play. Since `register` and `sef_fact` when used with `run_once` set the variable for all the hosts, use it. Also allows to use the variable directly instead of relying on hostvars to make the task more readable.
What type of PR is this?
What this PR does / why we need it:
When reordering controlplane nodes in
inventory.iniand the first in the list is not the same as the first one when runningkubectl get nodes --selector=node-role.kubernetes.io/control-plane -o jsonyou'll get an error:This is because the variable
first_kube_control_planeis ultimately set using kubectl and this is the one that is used to create the certificate.However the one after is using
groups['kube_control_plane'][0]which will depend on what node is first ininventory.inihence why this error occurs.This PR changes so the parsing also fetches the certificate from the
first_kube_control_plane.Which issue(s) this PR fixes:
Fixes #10973
Special notes for your reviewer:
All credit to @nvalembois who had this patch in #10973
Does this PR introduce a user-facing change?: