kubespray icon indicating copy to clipboard operation
kubespray copied to clipboard

Skip kube-proxy addon phase during kubeadm upgrade if disabled

Open rdavyd opened this issue 5 months ago • 7 comments

What type of PR is this?

/kind bug

What this PR does / why we need it:

v2.28.0 tag introduced a bug that deploys kube-proxy when it should be disabled. It can be explicitly disabled via kube_proxy_remove: true in group variables or if CNI like kube-router is used. Kubespray automatically calculates the list of disabled addons into kubeadm_init_phases_skip variable. This variable should be applied during upgrade procedure in the kubernetes/control-plane role which substantially changed in v2.28.0.

Which issue(s) this PR fixes:

Fixes #12303

Special notes for your reviewer:

Checked command options for kubeadm upgrade apply and kubeadm upgrade node Tested on environment specified in #12303

Does this PR introduce a user-facing change?:

NONE

rdavyd avatar Jun 14 '25 08:06 rdavyd

CLA Signed

The committers listed above are authorized under a signed CLA.

  • :white_check_mark: login: rdavyd / name: xat (b28dce4a28a78eec3332a210cbca30dd70311388)

Welcome @rdavyd!

It looks like this is your first PR to kubernetes-sigs/kubespray 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/kubespray has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. :smiley:

k8s-ci-robot avatar Jun 14 '25 08:06 k8s-ci-robot

Hi @rdavyd. 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 avatar Jun 14 '25 08:06 k8s-ci-robot

/ok-to-test

VannTen avatar Jun 14 '25 20:06 VannTen

Could you also add the skipPhases in the UpgradeConfig ? It's currently https://kubernetes.io/docs/reference/config-api/kubeadm-config.v1beta4/#kubeadm-k8s-io-v1beta4-UpgradeApplyConfiguration but it will be in the future. + a TODO on the skip-phase cli option to remove once the config field is supported.

VannTen avatar Jun 14 '25 20:06 VannTen

This looks fine :+1:, thanks ! Please squash into a single commit and we'll be good to merge. /approve

VannTen avatar Jun 16 '25 12:06 VannTen

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rdavyd, VannTen

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 avatar Jun 16 '25 12:06 k8s-ci-robot

Is this PR need to backport release-2.28?

tico88612 avatar Jun 18 '25 09:06 tico88612

Yeah, good point /cherrypick release-2.28

VannTen avatar Jun 18 '25 10:06 VannTen

@VannTen: once the present PR merges, I will cherry-pick it on top of release-2.28 in a new PR and assign it to you.

In response to this:

Yeah, good point /cherrypick release-2.28

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.

/lgtm

Thanks for the fix !

VannTen avatar Jun 18 '25 10:06 VannTen

@VannTen: new pull request created: #12320

In response to this:

Yeah, good point /cherrypick release-2.28

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.