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

chore: helm chart support scheduler webhook cert-manager #951

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

chinaran
Copy link
Contributor

What type of PR is this?

/kind feature

What this PR does / why we need it:

cert-manager streamlines and automates TLS certificate management in Kubernetes, enhancing security and reducing operational complexity for webhook authentication.

Does this PR introduce a user-facing change?:

No.

Signed-off-by: 王然 <ranwang@alauda.io>
Signed-off-by: 王然 <ranwang@alauda.io>
Copy link

codecov bot commented Mar 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Flag Coverage Δ
unittests 64.60% <ø> (+17.62%) ⬆️

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

see 10 files with indirect coverage changes

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

@wawa0210 wawa0210 requested a review from Copilot March 22, 2025 03:20
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for using cert-manager to generate TLS certificates for the HAMi scheduler webhook while preserving the existing kube-webhook-certgen option.

  • Added Helm chart templates (Certificate and Issuer) for cert-manager support.
  • Updated the webhook configuration and documentation to include cert-manager based TLS certificate generation.
  • Updated conditional logic in job-patch related resources to only render when patch mode is enabled and cert-manager is disabled.

Reviewed Changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
charts/hami/templates/scheduler/certmanager.yaml Adds cert-manager Certificate and Issuer resources conditional on certManager.enabled.
charts/hami/templates/scheduler/webhook.yaml Conditionally injects annotations for cert-manager CA injection.
docs/config.md, docs/config_cn.md Updates configuration docs to document cert-manager TLS certificate options.
charts/hami/values.yaml Introduces scheduler.certManager.enabled flag and adjusts patch configuration.
charts/hami/templates/scheduler/job-patch/* Wraps various job-patch resources with conditional logic to disable them when cert-manager is enabled.

@@ -24,3 +25,4 @@ rules:
resourceNames:
- {{ include "hami-vgpu.fullname" . }}-admission
{{- end }}
Copy link
Preview

Copilot AI Mar 22, 2025

Choose a reason for hiding this comment

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

An extra closing template directive is present. Remove the redundant '{{- end }}' at line 28 to properly close the single if block opened at line 1.

Suggested change
{{- end }}

Copilot is powered by AI, so mistakes are possible. Review output carefully before use.

Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant