Skip to content

Fix kubelet-csr-approver deployment failes if kube_network_plugin=cni(generic)#11704

Merged
k8s-ci-robot merged 2 commits intokubernetes-sigs:masterfrom
M-JavadHeydarpour:fix-csr-approver-generic-cni
Nov 16, 2024
Merged

Fix kubelet-csr-approver deployment failes if kube_network_plugin=cni(generic)#11704
k8s-ci-robot merged 2 commits intokubernetes-sigs:masterfrom
M-JavadHeydarpour:fix-csr-approver-generic-cni

Conversation

@M-JavadHeydarpour
Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

This PR resolves issues with the kubelet-csr-approver deployment failing when kube_network_plugin=cni. The deployment fails because the node does not become ready until the CNI is manually installed after Kubespray playbooks have run. To address this, the PR modifies the Helm parameters as follows:

  • Sets wait and atomic to false when kube_network_plugin=cni to prevent the kubelet-csr-approver job from failing during deployment.

Which issue(s) this PR fixes:

Fixes #10320
Fixes #10491

Special notes for your reviewer:

  • The Helm parameters wait and atomic are conditionally set to false when using a CNI network plugin (kube_network_plugin == 'cni'), ensuring that kubelet-csr-approver does not stall if CNI is installed manually.
  • This change improves the deployment process in environments where CNI installation is handled outside the Kubespray playbooks.

Does this PR introduce a user-facing change?:

Modifies Helm parameters `wait` and `atomic` to be set to `false` when using `kube_network_plugin=cni` to prevent deployment issues with `kubelet-csr-approver`.

@k8s-ci-robot k8s-ci-robot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Nov 10, 2024
@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla bot commented Nov 10, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

@k8s-ci-robot k8s-ci-robot requested a review from mzaian November 10, 2024 17:12
@k8s-ci-robot k8s-ci-robot added the cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label Nov 10, 2024
@k8s-ci-robot k8s-ci-robot requested a review from VannTen November 10, 2024 17:12
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

Welcome @M-JavadHeydarpour!

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. 😃

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Nov 10, 2024
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

Hi @M-JavadHeydarpour. 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.

Details

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 size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Nov 10, 2024
@VannTen
Copy link
Copy Markdown
Contributor

VannTen commented Nov 10, 2024 via email

@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. cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Nov 10, 2024
Copy link
Copy Markdown
Contributor

@VannTen VannTen left a comment

Choose a reason for hiding this comment

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

One further nitpick.

Could you also squash your fix commits into the commits they are fixing (in your PR).
(Several commits are ok, but fix commits should not be in the final PR)

chart_ref: "{{ kubelet_csr_approver_chart_ref }}"
chart_version: "{{ kubelet_csr_approver_chart_version }}"
wait: true
wait: "{{ not (kube_network_plugin == 'cni') }}"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
wait: "{{ not (kube_network_plugin == 'cni') }}"
wait: "{{ kube_network_plugin != 'cni' }}"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Certainly! I’ve squashed the fix commits into the main commits as requested, so the final PR is now clean and organized without separate fix commits. Let me know if there’s anything else to adjust.

@tico88612
Copy link
Copy Markdown
Member

Hi @M-JavadHeydarpour

This is just a reminder for you: Your PR shouldn't contain any merge commits, or you will get a do-not-merge label.
Please use rebase instead of merge.

…to prevent kubelet-csr-approver installation failures
@VannTen
Copy link
Copy Markdown
Contributor

VannTen commented Nov 16, 2024 via email

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 16, 2024
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: M-JavadHeydarpour, VannTen

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details 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 Nov 16, 2024
@k8s-ci-robot k8s-ci-robot merged commit e8bdd47 into kubernetes-sigs:master Nov 16, 2024
@M-JavadHeydarpour M-JavadHeydarpour deleted the fix-csr-approver-generic-cni branch November 18, 2024 04:42
@tico88612
Copy link
Copy Markdown
Member

/kind bug

@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Nov 27, 2024
kpoxo6op pushed a commit to kpoxo6op/kubespray that referenced this pull request Dec 27, 2024
…(generic) (kubernetes-sigs#11704)

* Make Helm's 'atomic' parameter configurable from role variables

* Configure Helm with 'atomic' and 'wait' set to false for generic CNI to prevent kubelet-csr-approver installation failures
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.

kubelet-csr-approver not finish when network plugin is cni kubelet-csr-approver deployment fails if kube_network_plugin=cni

4 participants