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: introduce the UnversionedKubeletConfigMap feature gate #105741
kubeadm: introduce the UnversionedKubeletConfigMap feature gate #105741
Conversation
Skipping CI for Draft Pull Request. |
a660e96
to
569e63f
Compare
/triage accepted |
/milestone v1.23 |
9a00126
to
608d165
Compare
The legacy bool works well but looks a little odd to me. The PR LGTM. |
// During the first "kubeadm upgrade apply" when the feature gate goes "true" by default and | ||
// a preferred user value is missing in the ClusterConfiguration, "kubeadm upgrade apply" will try | ||
// to fetch using the new format and that CM will not exist yet. | ||
// Tollerate both the old a new format until UnversionedKubeletConfigMap goes GA and is locked. |
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.
Nit: tollerate -> tolerate
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.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: neolit123, pacoxu 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 |
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.
Some questions about the upgrade path for existing clusters.
- users not expressing any preference on ConfigMap naming; legacy name will be converted to new unified name during the first upgrade after the default value for the feature flag has been switched from false to true. Is that right? Is the old configMap/RBAC rule being deleted or not?
- users that wants to opt in in the new naming schema early; they have to force the feature gate to true in the kubeadm-config ConfigMap before an upgrade, no matter of the the default value for the feature flag. Is that right?
- users that wants to stick on the legacy schema naming ConfigMap; in oder to prevent kubeadm moving to the new naming schema automatically, they have to force the feature gate to false in the kubeadm-config ConfigMap before the first upgrade after the default value for the feature flag has been switched from false to true. Is that right?
Can we have tests for those scenarios? currently all the upgrade logic is implicit in kubeletConfigFromCluster, which is really nested in the call of chains and it is kind of hard to validate at first sight..
the summary for the current state of the patch:
currently kubeadm does not remove old CM/RBACs during upgrade.
if the user sets the FG to true in the ClusterConfiguration before upgrade, kubeadm will try to read the new naming and fallback to the old naming (this is the current state of the patch). after upgrade kubeadm will write the relevant CM in the new location.
yes, if the FG is forced to false, during upgrade kubeadm will write to the old location, during join, reset, etc kubeadm will try to use the new name and if it fails it will fallback to the old name.
my eval is that testing the behavior in unit tests with the current state of the upgrade code is difficult.
|
@neolit123 I'm ok with this approach given that, as you confirmed above, we are covering all the use cases.
how dow you think to proceed about implementing E2E testing? merge this PR and the implements E2E? does this means that we are considering a rollback if E2E does not provide the expected signal before release? |
Yes. I plan to write the e2e as soon as this merges. Already did local
testing without kinder.
Will update the PR today.
|
Add the UnversionedKubeletConfigMap feature gate that can be used to control legacy vs new behavior for naming the default configmap used to store the KubeletConfiguration. Update related unit tests.
The function has been marked as deprecated for a long time and has been unused in the code base. Remove it.
Add means to parse the value of UnversionedKubletConfigMap feature gate if present and based on that decide what configmap to look for.
608d165
to
17cc064
Compare
made the changes requested in #105741 (review) |
/lgtm |
/hold cancel |
/retest |
1 similar comment
/retest |
The Kubernetes project has merge-blocking tests that are currently too flaky to consistently pass. This bot retests PRs for certain kubernetes repos according to the following rules:
You can:
/retest |
What this PR does / why we need it:
introduce a new kubeadm specific FG called UnversionedKubeletConfigMap.
this feature controls the old vs new formatting of the kubelet config map used for storing the KubeletConfiguration.
also:
Which issue(s) this PR fixes:
xref kubernetes/kubeadm#1582
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: