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

kubeadm: add --feature-gates flag for kubeadm upgrade node #118316

Merged
merged 1 commit into from
May 29, 2023

Conversation

SataQiu
Copy link
Member

@SataQiu SataQiu commented May 29, 2023

What type of PR is this?

/kind bug
/kind feature

What this PR does / why we need it:

kubeadm: add --feature-gates flag for kubeadm upgrade node

Which issue(s) this PR fixes:

Ref kubernetes/kubeadm#2346

Special notes for your reviewer:

This flag is needed to upgrade a cluster with UpgradeAddonsBeforeControlPlane feature gate enabled.
Also align with kubeadm upgrade apply/plan.

Does this PR introduce a user-facing change?

None

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/bug Categorizes issue or PR as related to a bug. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. kind/feature Categorizes issue or PR as related to a new feature. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels May 29, 2023
@k8s-ci-robot k8s-ci-robot added area/kubeadm sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels May 29, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: SataQiu

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 May 29, 2023
Copy link
Member

@neolit123 neolit123 left a comment

Choose a reason for hiding this comment

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

/lgtm
/priority important-soon

@k8s-ci-robot k8s-ci-robot added priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. and removed needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels May 29, 2023
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 29, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 22e3472c1e0ff2731e653dbea3a3758cd6e7ee71

@k8s-ci-robot k8s-ci-robot merged commit 320d915 into kubernetes:master May 29, 2023
12 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.28 milestone May 29, 2023
@pacoxu
Copy link
Member

pacoxu commented May 30, 2023

/lgtm
/triage accepted

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels May 30, 2023
@SataQiu
Copy link
Member Author

SataQiu commented May 30, 2023

Sorry. After a further analysis, I find that kubeadm upgrade apply will update the featureGates field of kube-system/kubeadm-config ConfigMap, and kubeadm upgrade node should use the configuration loaded from cluster rather than the --feature-gates flag, so this flag doesn't seem to be necessary.
I think it's better to revert this, what do you think? @neolit123

@pacoxu
Copy link
Member

pacoxu commented May 30, 2023

Sorry. After a further analysis, I find that kubeadm upgrade apply will update the featureGates field of kube-system/kubeadm-config ConfigMap, and kubeadm upgrade node should use the configuration loaded from cluster rather than the --feature-gates flag, so this flag doesn't seem to be necessary.

I think it's better to revert this, what do you think? @neolit123

but this can override that if specified. No harm?

@SataQiu
Copy link
Member Author

SataQiu commented May 30, 2023

but this can override that if specified. No harm?

It shouldn't hurt too much, but we need to consider whether forcing kubeadm upgrade node use the cluster configuration is necessary. It looks like we only support --feature-gates flag in init and upgrade apply/plan, join and reset will only use the cluster configuration. Not sure if this breaks some principles.

IMO, kubeadm upgrade node should respect the featureGates set by kubeadm upgrade apply.
What do you think? @pacoxu @neolit123

@pacoxu
Copy link
Member

pacoxu commented May 30, 2023

For NonRoot FG, this can allow user to have a control-plane using not-root and another one using root. For this case, it makes a little sense.

For upgrade-addon-after-control-plane FG, you can choose when to upgrade kube-proxy/coredns. But it is not that necessary IMO.

@neolit123
Copy link
Member

neolit123 commented May 30, 2023

i was wandering if this is right or not.
we again face the node specific config problem.
currently feature gates are only cluster wide in clusterconfiguration. this means we should revert.

if there are node specific feature gates we must store them somewhere per node. this is missing design bits in the api and kep work.

if we keep this override per "upgrade node" it becomes weird.

@pacoxu
Copy link
Member

pacoxu commented May 30, 2023

currently feature gates are only cluster wide in clusterconfiguration. this means we should revert.

So clusterconfiguration says it is a cluster-wide configuration that should not be overwritten.
Agree.

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. and removed release-note Denotes a PR that will be considered when it comes time to generate release notes. labels May 31, 2023
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. area/kubeadm cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. release-note-none Denotes a PR that doesn't merit a release note. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants