Skip to content

Commit f081c35

Browse files
committed
Made cert-manager a required dependency. Removed ability to supply custom certificates and not use cert-manager.
Signed-off-by: Aryan <gorwadearyan@gmail.com>
1 parent e6074aa commit f081c35

File tree

2 files changed

+4
-29
lines changed

2 files changed

+4
-29
lines changed

deployments/helm/k8s-nim-operator/templates/admission-controller.yaml

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ spec:
1919
app.kubernetes.io/instance: {{ .Release.Name }}
2020
{{- end }}
2121
---
22-
{{- if and .Values.operator.admissionController.enabled .Values.operator.admissionController.useCertManager }}
22+
{{- if .Values.operator.admissionController.enabled }}
2323
apiVersion: cert-manager.io/v1
2424
kind: Certificate
2525
metadata:
@@ -38,7 +38,7 @@ spec:
3838
secretName: {{ include "k8s-nim-operator.fullname" . }}-webhook-server-cert
3939
{{- end }}
4040
---
41-
{{- if and .Values.operator.admissionController.enabled .Values.operator.admissionController.useCertManager }}
41+
{{- if .Values.operator.admissionController.enabled }}
4242
apiVersion: cert-manager.io/v1
4343
kind: Issuer
4444
metadata:
@@ -56,10 +56,8 @@ apiVersion: admissionregistration.k8s.io/v1
5656
kind: ValidatingWebhookConfiguration
5757
metadata:
5858
name: {{ include "k8s-nim-operator.fullname" . }}-validating-webhook-configuration
59-
{{- if .Values.operator.admissionController.useCertManager }}
6059
annotations:
6160
cert-manager.io/inject-ca-from: {{ .Release.Namespace }}/{{ include "k8s-nim-operator.fullname" . }}-serving-cert
62-
{{- end }}
6361
labels:
6462
app.kubernetes.io/name: k8s-nim-operator
6563
app.kubernetes.io/managed-by: helm
@@ -71,9 +69,6 @@ webhooks:
7169
name: {{ include "k8s-nim-operator.fullname" . }}-webhook-service
7270
namespace: {{ .Release.Namespace }}
7371
path: /validate-apps-nvidia-com-v1alpha1-nimcache
74-
{{- if not .Values.operator.admissionController.useCertManager }}
75-
caBundle: {{ .Values.operator.admissionController.certificate.caCrt | b64enc | quote }}
76-
{{- end }}
7772
failurePolicy: Fail
7873
rules:
7974
- apiGroups: ["apps.nvidia.com"]
@@ -88,26 +83,11 @@ webhooks:
8883
name: {{ include "k8s-nim-operator.fullname" . }}-webhook-service
8984
namespace: {{ .Release.Namespace }}
9085
path: /validate-apps-nvidia-com-v1alpha1-nimservice
91-
{{- if not .Values.operator.admissionController.useCertManager }}
92-
caBundle: {{ .Values.operator.admissionController.certificate.caCrt | b64enc | quote }}
93-
{{- end }}
9486
failurePolicy: Fail
9587
rules:
9688
- apiGroups: ["apps.nvidia.com"]
9789
apiVersions: ["v1alpha1"]
9890
operations: ["CREATE", "UPDATE"]
9991
resources: ["nimservices"]
10092
sideEffects: None
101-
{{- end }}
102-
---
103-
{{- if and .Values.operator.admissionController.enabled (not .Values.operator.admissionController.useCertManager) }}
104-
apiVersion: v1
105-
kind: Secret
106-
metadata:
107-
name: webhook-server-cert
108-
namespace: {{ .Release.Namespace }}
109-
type: Opaque
110-
data:
111-
tls.crt: {{ .Values.operator.admissionController.certificate.tlsCrt | b64enc | quote }}
112-
tls.key: {{ .Values.operator.admissionController.certificate.tlsKey | b64enc | quote }}
11393
{{- end }}

deployments/helm/k8s-nim-operator/values.yaml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,9 @@ operator:
5454
drop:
5555
- ALL
5656
admissionController:
57-
# -- Deploy with admission controller.
57+
# Enable the admission controller.
58+
# Note: cert-manager must be installed beforehand, as it is required to generate the TLS certificates.
5859
enabled: false
59-
# -- Use cert-manager for generating self-signed certificate.
60-
useCertManager: true
61-
# certificate:
62-
# caCrt: |-
63-
# tlsCrt: |-
64-
# tlsKey: |-
6560

6661
metricsService:
6762
ports:

0 commit comments

Comments
 (0)