Skip to content

Commit

Permalink
feat: Add support for Custom CA to controller manager (#206)
Browse files Browse the repository at this point in the history
  • Loading branch information
flamarion committed Aug 27, 2024
1 parent d4c99da commit 66934db
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: operator
description: A Helm chart for Weights & Biases operator
type: application
version: 1.2.4
version: 1.3.0
appVersion: "1.0.0"
maintainers:
- name: wandb
Expand Down
13 changes: 13 additions & 0 deletions charts/operator/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{{- if .Values.customCACerts }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "operator.fullname" . }}-ca-certs
data:
{{- range $index, $pem := .Values.customCACerts }}
customCA{{$index}}.crt: |-
{{- range splitList "\n" $pem }}
{{ . }}
{{- end }}
{{- end }}
{{- end }}
18 changes: 18 additions & 0 deletions charts/operator/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ spec:
fieldPath: spec.serviceAccountName
- name: AIRGAPPED
value: {{ .Values.airgapped | quote }}
{{- if .Values.customCACerts }}
- name: SSL_CERT_DIR
value: /certs
{{- end }}
livenessProbe:
httpGet:
path: /healthz
Expand All @@ -65,11 +69,25 @@ spec:
- name: {{ include "name" . }}-charts
mountPath: /charts
{{- end }}
{{- if .Values.customCACerts }}
{{- range $index, $v := .Values.customCACerts }}
volumeMounts:
- name: wandb-ca-certs
mountPath: /certs/customCA{{$index}}.crt
subPath: customCA{{$index}}.crt
{{- end }}
{{- end }}
{{- if .Values.airgapped }}
volumes:
- name: {{ include "name" . }}-charts
configMap:
name: {{ include "name" . }}-charts
{{- end }}
{{- if .Values.customCACerts }}
volumes:
- name: wandb-ca-certs
configMap:
name: {{ include "operator.fullname" . }}-ca-certs
{{- end }}
serviceAccountName: {{ include "manager.serviceAccount.name" . }}
terminationGracePeriodSeconds: 10
2 changes: 2 additions & 0 deletions charts/operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -202,3 +202,5 @@ airgapped: false
namespaceIsolation:
enabled: false
additionalNamespaces: []

customCACerts: []

0 comments on commit 66934db

Please sign in to comment.