-
Notifications
You must be signed in to change notification settings - Fork 3.3k
improvement(helm): update GPU device plugin and add cert-manager issuers #3036
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
Merged
+191
−37
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
3c6f4e8
improvement(helm): update GPU device plugin and add cert-manager issuers
waleedlatif1 549edba
fix(helm): address code review feedback for GPU plugin and cert-manager
waleedlatif1 43a8785
fix(helm): remove duplicate nodeSelector, add hook for CA issuer orde…
waleedlatif1 be8abee
fix(helm): remove incorrect hook, CA issuer auto-reconciles
waleedlatif1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,84 @@ | ||
| {{- if .Values.certManager.enabled }} | ||
| {{- /* | ||
| cert-manager Issuer Bootstrap Pattern | ||
|
|
||
| PREREQUISITE: cert-manager must be installed in your cluster before enabling this. | ||
| The root CA Certificate is created in the namespace specified by certManager.rootCA.namespace | ||
| (defaults to "cert-manager"). Ensure this namespace exists and cert-manager is running there. | ||
|
|
||
| Install cert-manager: https://cert-manager.io/docs/installation/ | ||
|
|
||
| This implements the recommended pattern from cert-manager documentation: | ||
| 1. A self-signed ClusterIssuer (for bootstrapping the root CA only) | ||
| 2. A root CA Certificate (self-signed, used to sign other certificates) | ||
| 3. A CA ClusterIssuer (uses the root CA to sign certificates) | ||
|
|
||
| Reference: https://cert-manager.io/docs/configuration/selfsigned/ | ||
| */ -}} | ||
|
|
||
| --- | ||
| # 1. Self-Signed ClusterIssuer (Bootstrap Only) | ||
| # This issuer is used ONLY to create the root CA certificate. | ||
| # It should NOT be used directly for application certificates. | ||
| apiVersion: cert-manager.io/v1 | ||
| kind: ClusterIssuer | ||
| metadata: | ||
| name: {{ .Values.certManager.selfSignedIssuer.name }} | ||
| labels: | ||
| {{- include "sim.labels" . | nindent 4 }} | ||
| app.kubernetes.io/component: cert-manager | ||
| spec: | ||
| selfSigned: {} | ||
|
|
||
| --- | ||
| # 2. Root CA Certificate | ||
| # This certificate is signed by the self-signed issuer and becomes the root of trust. | ||
| # The secret created here will be used by the CA issuer to sign certificates. | ||
| # NOTE: This must be created in the cert-manager namespace (or the namespace specified | ||
| # in certManager.rootCA.namespace). Ensure cert-manager is installed there first. | ||
| apiVersion: cert-manager.io/v1 | ||
| kind: Certificate | ||
| metadata: | ||
| name: {{ .Values.certManager.rootCA.certificateName }} | ||
| namespace: {{ .Values.certManager.rootCA.namespace | default "cert-manager" }} # Must match cert-manager's cluster-resource-namespace | ||
| labels: | ||
| {{- include "sim.labels" . | nindent 4 }} | ||
| app.kubernetes.io/component: cert-manager | ||
| spec: | ||
| isCA: true | ||
| commonName: {{ .Values.certManager.rootCA.commonName }} | ||
| secretName: {{ .Values.certManager.rootCA.secretName }} | ||
| duration: {{ .Values.certManager.rootCA.duration | default "87600h" }} | ||
| renewBefore: {{ .Values.certManager.rootCA.renewBefore | default "2160h" }} | ||
| privateKey: | ||
| algorithm: {{ .Values.certManager.rootCA.privateKey.algorithm | default "RSA" }} | ||
| size: {{ .Values.certManager.rootCA.privateKey.size | default 4096 }} | ||
| subject: | ||
| organizations: | ||
| {{- if .Values.certManager.rootCA.subject.organizations }} | ||
| {{- toYaml .Values.certManager.rootCA.subject.organizations | nindent 6 }} | ||
| {{- else }} | ||
| - {{ .Release.Name }} | ||
| {{- end }} | ||
| issuerRef: | ||
| name: {{ .Values.certManager.selfSignedIssuer.name }} | ||
| kind: ClusterIssuer | ||
| group: cert-manager.io | ||
|
|
||
| --- | ||
| # 3. CA ClusterIssuer | ||
| # This is the issuer that should be used by applications to obtain certificates. | ||
| # It signs certificates using the root CA created above. | ||
| # NOTE: This issuer may briefly show "not ready" on first install while cert-manager | ||
| # processes the Certificate above and creates the secret. It will auto-reconcile. | ||
| apiVersion: cert-manager.io/v1 | ||
| kind: ClusterIssuer | ||
| metadata: | ||
| name: {{ .Values.certManager.caIssuer.name }} | ||
| labels: | ||
| {{- include "sim.labels" . | nindent 4 }} | ||
| app.kubernetes.io/component: cert-manager | ||
| spec: | ||
| ca: | ||
| secretName: {{ .Values.certManager.rootCA.secretName }} | ||
| {{- end }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Invalid config structure for NVIDIA device plugin settings
Medium Severity
The ConfigMap places
passDeviceSpecsanddeviceListStrategyunder aplugin:section, but the NVIDIA k8s-device-plugin config schema expects these settings under theflags:section. The original code passed these as CLI arguments (--pass-device-specs=true,--device-list-strategy=envvar), which map to theflags:section in config file format. With the current structure, the device plugin may ignore these settings and use default values instead, potentially causing GPU device passthrough and enumeration issues.