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

Fix: remove --config option from kubeadm upgrade (#11350) #11352

Merged

Conversation

tmurakam
Copy link
Contributor

@tmurakam tmurakam commented Jul 5, 2024

We can't mix some options with --config for kubeadm upgrade. The --config on upgrade (with InitConfiguration/ClusterConfiguration) is deprecated, and should be removed.

What type of PR is this?
/kind bug

What this PR does / why we need it:
Fix upgrade issue of kubespray upgrade.
This removes --config option.

Which issue(s) this PR fixes:
Fixes #11350

Special notes for your reviewer:
I have no confidence of side effects of removing the --config options.
Please consider the effects. If it is not acceptable, please reject this PR.

Does this PR introduce a user-facing change?:

Disables reconfiguring the cluster during upgrade (remove --config option from kubeadm upgrade apply)

We can't mix some options with --config for kubeadm upgrade.
The --config on upgrade is deprecated, and should be removed.
@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jul 5, 2024
@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jul 5, 2024
@k8s-ci-robot
Copy link
Contributor

Hi @tmurakam. 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-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Jul 5, 2024
@tico88612
Copy link
Member

/ok-to-test

@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 Jul 5, 2024
@tico88612
Copy link
Member

Your PR didn't include that Kubeadm deprecates the --config parameter. I'm attaching a search to find it.

kubernetes/kubeadm#3054
https://github.com/kubernetes/kubernetes/pull/123068/files#diff-657870bffd956e3e3553db7dbb5cb725ea53922da959fcf869c2e31880df72c7L91

However, the documentation I found does not indicate that they are deprecated. For the time being, the v1.30 version can't use the --config parameter, but v1.31 can use UpgradeConfiguration for configuration (only available in apiVersion kubeadm.k8s.io/v1beta4).

related #10935

https://kubernetes.io/docs/reference/config-api/kubeadm-config.v1beta4/

@tmurakam
Copy link
Contributor Author

tmurakam commented Jul 5, 2024

@tico88612
You are right. The v1.31 will be able to use --config for UpgradeConfiguration of v1beta4.
I think using --config for InitConfiguration or ClusterConfiguration for upgrade is deprecated.
Updated the description of this PR.

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-none Denotes a PR that doesn't merit a release note. labels Jul 5, 2024
@MrFreezeex
Copy link
Member

In the issue in the kubeadm project it was said this as well:

you should drop your usage of --config on upgrade to 1.30 and 1.31 for non-v1beta4 APIs and use similar actions to reconfigure a kubeadm cluster:
https://kubernetes.io/docs/tasks/administer-cluster/kubeadm/kubeadm-reconfigure/

And I don't think we are applying/editing this cluster wide configmap anywhere which we should be doing if we can't use the local config anymore IIUC

@tmurakam
Copy link
Contributor Author

tmurakam commented Jul 29, 2024

@MrFreezeex @cyclinder
Could you please proceed with your review of this?

@tico88612
Copy link
Member

@yankay @ant31 Do we have a CI for upgrading the cluster?
If this PR is not handled and 2.26 is released in the future, upgrading the cluster will fail.

@tico88612
Copy link
Member

/label ci-extended

@k8s-ci-robot
Copy link
Contributor

@tico88612: The label(s) /label ci-extended cannot be applied. These labels are supported: api-review, tide/merge-method-merge, tide/merge-method-rebase, tide/merge-method-squash, team/katacoda, refactor. Is this label configured under labels -> additional_labels or labels -> restricted_labels in plugin.yaml?

In response to this:

/label ci-extended

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.

@k8s-ci-robot
Copy link
Contributor

@tico88612: The label(s) /label ci-extended cannot be applied. These labels are supported: api-review, tide/merge-method-merge, tide/merge-method-rebase, tide/merge-method-squash, team/katacoda, refactor. Is this label configured under labels -> additional_labels or labels -> restricted_labels in plugin.yaml?

In response to this:

/label ci-extended

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.

@tmurakam
Copy link
Contributor Author

I created a PR #11458 to add a CI job to test cluster upgrading.

@tico88612
Copy link
Member

Manual test successful.

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 18, 2024
ledroide added a commit to ledroide/kubespray that referenced this pull request Aug 20, 2024
ledroide added a commit to ledroide/kubespray that referenced this pull request Aug 20, 2024
@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 28, 2024
@yankay yankay removed the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 28, 2024
@yankay
Copy link
Member

yankay commented Aug 29, 2024

HI @ErikJiang

Would you please help to review it

@yankay
Copy link
Member

yankay commented Aug 29, 2024

Thanks @tmurakam
/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tmurakam, yankay

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 Aug 29, 2024
@k8s-ci-robot k8s-ci-robot merged commit c89ea7e into kubernetes-sigs:master Aug 29, 2024
39 checks passed
@tmurakam tmurakam deleted the feature/11350-fix-upgrade-config branch September 3, 2024 07:36
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. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cluster upgrade to v1.30.2 fails on "Upgrade first Control Plane"
5 participants