-
Notifications
You must be signed in to change notification settings - Fork 40k
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
kubeadm: annotate CRI socket on kubelet-finalize
phase
#85419
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ereslibre 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 |
When running `kubeadm init phase upload-config kubelet` the current logic will try to read the config file and patch the node annotation for the CRI socket. Ideally, this logic should not be triggered under this phase, because uploading the kubelet configuration to the cluster and patching the current node CRI socket annotation are two different things. Now that we introduced the `kubelet-finalize` phase, make this logic happen under this phase on init. The rest (join, upgrade) are left untouched.
After some discussion with @neolit123 we might want to take different approaches here:
I think it's reasonable to delegate this discussion post KubeCon, so folks can give their opinion. |
@ereslibre: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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. I understand the commands that are listed here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @ereslibre !
Code-wise it looks good. However, hiding the CRI annotation in another phase was deliberate when designing all the phases. This is a technical detail that can change.
Even now the CRI can be obtained from the kubelet command line parameters. In the future it is best to obtain it from the local kubeadm component config file (provided that a new field for the CRI socket is introduced).
Is re-annotation such a big problem for you? Let's discuss this on the next office hours.
/hold
Let's discuss during next office hours. It's not a big deal, but it feels a bit arbitrary that we are patching the CRI socket during the upload config phase. In my opinion it would be better to extract it (even if we prefix the new phase with |
Also, using |
The idea is that at some point the kubelet component config will have a CRI socket field in it. Thus the action of "storing kubelet's CRI socket" will take place during the upload config phase. |
we can still add it as a separate phase, but make the phase hidden. the phase runner supports this. |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Rotten issues close after 30d of inactivity. Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
@fejta-bot: Closed this PR. 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. |
What type of PR is this?
/kind bug
What this PR does / why we need it:
When running
kubeadm init phase upload-config kubelet
the currentlogic will try to read the config file and patch the node annotation
for the CRI socket.
Ideally, this logic should not be triggered under this phase, because
uploading the kubelet configuration to the cluster and patching the
current node CRI socket annotation are two different things.
Now that we introduced the
kubelet-finalize
phase, make this logichappen under this phase on init. The rest (join, upgrade) are left
untouched.
Which issue(s) this PR fixes:
Fixes kubernetes/kubeadm#1924
Does this PR introduce a user-facing change?:
/priority backlog
/cc @kubernetes/sig-cluster-lifecycle-pr-reviews