Skip to content

Commit

Permalink
resolve comments- add support to allow both at the same time
Browse files Browse the repository at this point in the history
  • Loading branch information
velotioaastha committed Nov 8, 2024
1 parent 5dbc4c2 commit 400ecac
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
18 changes: 10 additions & 8 deletions charts/operator-wandb/charts/app/templates/_deployment.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,11 @@ spec:
mountPath: /etc/ssl/certs/redis_ca.pem
subPath: redis_ca.pem
{{- end }}
{{- if .Values.global.configMapName }}
- name: wandb-ca-certs
{{- if .Values.global.caCertsConfigMap }}
- name: wandb-ca-certs-user
mountPath: /usr/local/share/ca-certificates/
{{- else if .Values.global.customCACerts }}
{{- end }}
{{- if .Values.global.customCACerts }}
{{- range $index, $v := .Values.global.customCACerts }}
- name: wandb-ca-certs
mountPath: /usr/local/share/ca-certificates/customCA{{$index}}.crt
Expand Down Expand Up @@ -305,13 +306,14 @@ spec:
- key: REDIS_CA_CERT
path: redis_ca.pem
{{- end }}
{{- if .Values.global.configMapName }}
- name: wandb-ca-certs
{{- if .Values.global.caCertsConfigMap }}
- name: wandb-ca-certs-user
configMap:
name: {{ .Values.global.configMapName }}
{{- else if .Values.global.customCACerts }}
name: {{ .Values.global.caCertsConfigMap }}
{{- end }}
{{- if .Values.global.customCACerts }}
- name: wandb-ca-certs
configMap:
name: {{ include "wandb.fullname" . }}-ca-certs
{{- end }}
{{- end }}
{{- end }}
2 changes: 1 addition & 1 deletion charts/operator-wandb/charts/app/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if and (not .Values.global.configMapName) .Values.global.customCACerts }}
{{- if .Values.global.customCACerts }}
apiVersion: v1
kind: ConfigMap
metadata:
Expand Down
4 changes: 2 additions & 2 deletions charts/operator-wandb/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ global:

# List of custom CA certificates in PEM format.
customCACerts: []
# Name of ConfigMap containing .crt files for custom CA certificates.
configMapName: ""
# Name of a ConfigMap containing additional .crt files for CA certificates.
caCertsConfigMap: ""

weave-trace:
enabled: false
Expand Down

0 comments on commit 400ecac

Please sign in to comment.