Skip to content
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

Feature DynamicKubeletConfig is deprecated in 1.22 and will not move to GA #7938

Conversation

cristicalin
Copy link
Contributor

Flag --dynamic-config-dir has been deprecated, Feature DynamicKubeletConfig is deprecated in 1.22 and will not move to GA. It is planned to be removed from Kubernetes in the version 1.23. Please use alternative ways to update kubelet configuration.

What type of PR is this?
/kind bug

What this PR does / why we need it:
This PR addressed the deprecation of kubelet dynamic configuration in K8S 1.22 and ensures this feature is not accidentally enabled beyond 1.22 which could cause the kubelet to fail to start or worse break kubernetes upgrades.

Which issue(s) this PR fixes:

Fixes #7937

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

Flag --dynamic-config-dir has been deprecated, Feature DynamicKubeletConfig is deprecated in 1.22 and will not move to GA. It is planned to be removed from Kubernetes in the version 1.23. Please use alternative ways to update kubelet configuration.

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Sep 4, 2021
@k8s-ci-robot
Copy link
Contributor

Hi @cristicalin. 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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

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/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Sep 4, 2021
@cristicalin cristicalin force-pushed the dynamic_kubelet_configuration_not_GA branch from 3b793e4 to 08426f3 Compare September 4, 2021 17:33
@champtar
Copy link
Contributor

champtar commented Sep 4, 2021

Should we fail instead of silently removing the flag ?

@cristicalin
Copy link
Contributor Author

Currently an upgrade attempt fails in an ugly way, see the related issue. Do we have any sanity checks before proceeding where we can implement this check early on?

I have another check in mind with regard to verifying various version compatibilities where we support multiple versions (i.e. calico, cillium and so on). We could add a sanity check task/role early on in kubespray that would prevent running when incompatibilities are found and issue relevant warnings.

@cristicalin
Copy link
Contributor Author

I answered my own question, we do have settings validation in roles/kubernetes/preinstall/tasks/0020-verify-settings.yml. The last commit adds a check in this validation task to avoid proceeding with changes if dynamic_kubelet_configuration is set to true and kubernetes is 1.22 or above.

/cc @champtar

Copy link
Member

@floryut floryut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/ok-to-test
Why commenting the setting in test and not removing it though ?

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Sep 6, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cristicalin, floryut

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 6, 2021
@cristicalin
Copy link
Contributor Author

Why commenting the setting in test and not removing it though ?

To keep it around for historical reasons? I can remove it if you think it's cleaner that way.

@cristicalin cristicalin force-pushed the dynamic_kubelet_configuration_not_GA branch from fb510fc to ce10b5f Compare September 7, 2021 05:28
@cristicalin
Copy link
Contributor Author

I removed the commented lines in the tests files instead of just commenting them.

@oomichi
Copy link
Contributor

oomichi commented Sep 7, 2021

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 7, 2021
@k8s-ci-robot k8s-ci-robot merged commit d57ddf0 into kubernetes-sigs:master Sep 7, 2021
@floryut floryut mentioned this pull request Sep 8, 2021
LuckySB pushed a commit to southbridgeio/kubespray that referenced this pull request Oct 23, 2021
…to GA (kubernetes-sigs#7938)

* Feature DynamicKubeletConfig is deprecated in 1.22 and will not move to GA

* Add check for dynamic_kubelet_configuration with kube >= 1.22
sakuraiyuta pushed a commit to sakuraiyuta/kubespray that referenced this pull request Apr 16, 2022
…to GA (kubernetes-sigs#7938)

* Feature DynamicKubeletConfig is deprecated in 1.22 and will not move to GA

* Add check for dynamic_kubelet_configuration with kube >= 1.22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

etcd upgrade failure from kubernetes 1.21.4 -> 1.22.1
5 participants