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 missing ClusterRole, ClusterRoleBinding, and ServiceAccount for Custom Cert Mode in Helm Chart #6188

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

seanlaii
Copy link
Contributor

@seanlaii seanlaii commented Mar 7, 2025

What type of PR is this?
/kind bug

What this PR does / why we need it:
When installing Karmada using the Helm chart with certs.mode set to custom, the required ClusterRole, ClusterRoleBinding, and ServiceAccount are not created: https://github.com/karmada-io/karmada/blob/master/charts/karmada/templates/pre-install-job.yaml#L449-L498.
These resources are essential for the static-resource-job, post-delete-job, and post-install-job to function correctly.

To resolve this issue, the installation of these resources has been moved outside the certificate mode conditional check, ensuring they are created regardless of the selected certificate mode.

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

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

None

@karmada-bot karmada-bot added the kind/bug Categorizes issue or PR as related to a bug. label Mar 7, 2025
@karmada-bot karmada-bot requested review from calvin0327 and jrkeen March 7, 2025 04:24
@karmada-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign a7i for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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

@karmada-bot karmada-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Mar 7, 2025
@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 47.97%. Comparing base (824bd8d) to head (b9256e8).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #6188   +/-   ##
=======================================
  Coverage   47.97%   47.97%           
=======================================
  Files         674      674           
  Lines       55841    55841           
=======================================
+ Hits        26788    26789    +1     
+ Misses      27305    27304    -1     
  Partials     1748     1748           
Flag Coverage Δ
unittests 47.97% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@seanlaii
Copy link
Contributor Author

seanlaii commented Mar 7, 2025

Hi @zhzhuang-zju and @RainbowMango , please help review this PR when you have time. Thank you so much!

@zhzhuang-zju
Copy link
Contributor

/lgtm
thanks, @seanlaii, I'm wondering if tests can cover this scenario. I don't mean in this PR, but rather in the subsequent reinforcement.

@karmada-bot karmada-bot added the lgtm Indicates that a PR is ready to be merged. label Mar 8, 2025
@seanlaii
Copy link
Contributor Author

seanlaii commented Mar 9, 2025

Hi @zhzhuang-zju , agree! I could add a Chart test for custom cert mode in the subsequent reinforcement.

@RainbowMango
Copy link
Member

cc @a7i to take another look and approval?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing serviceaccount causes karmada-static-resource-job failure when using Custom Certificate Mode
5 participants