diff --git a/charts/operator-wandb/Chart.yaml b/charts/operator-wandb/Chart.yaml index 9c27c015..390d2c9b 100644 --- a/charts/operator-wandb/Chart.yaml +++ b/charts/operator-wandb/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: operator-wandb description: A Helm chart for deploying W&B to Kubernetes type: application -version: 0.22.3 +version: 0.22.4 appVersion: 1.0.0 icon: https://wandb.ai/logo.svg diff --git a/charts/operator-wandb/charts/app/templates/deployment.yaml b/charts/operator-wandb/charts/app/templates/deployment.yaml index e298b6d8..6d830e7a 100644 --- a/charts/operator-wandb/charts/app/templates/deployment.yaml +++ b/charts/operator-wandb/charts/app/templates/deployment.yaml @@ -156,7 +156,7 @@ spec: - name: REDIS_PASSWORD valueFrom: secretKeyRef: - name: {{ include "wandb.redis.passwordSecret" . }} + name: {{ include "wandb.redis.secretName" . }} optional: true key: {{ .Values.global.redis.secret.secretKey }} - name: REDIS_PORT @@ -336,8 +336,8 @@ spec: volumes: {{- if ne (include "wandb.redis.caCert" .) "" }} - name: {{ include "app.fullname" . }}-redis-ca - secret: - secretName: "{{ include "wandb.redis.passwordSecret" . }}" + configMap: + name: "{{ .Release.Name }}-redis-configmap" items: - key: REDIS_CA_CERT path: redis_ca.pem diff --git a/charts/operator-wandb/charts/executor/templates/deployment.yaml b/charts/operator-wandb/charts/executor/templates/deployment.yaml index 268a2235..b15ce58d 100644 --- a/charts/operator-wandb/charts/executor/templates/deployment.yaml +++ b/charts/operator-wandb/charts/executor/templates/deployment.yaml @@ -107,7 +107,7 @@ spec: - name: REDIS_PASSWORD valueFrom: secretKeyRef: - name: {{ include "wandb.redis.passwordSecret" . }} + name: {{ include "wandb.redis.secretName" . }} optional: true key: {{ .Values.global.redis.secret.secretKey }} - name: REDIS_PORT @@ -169,8 +169,8 @@ spec: volumes: {{- if ne (include "wandb.redis.caCert" .) "" }} - name: {{ include "executor.fullname" . }}-redis-ca - secret: - secretName: "{{ include "wandb.redis.passwordSecret" . }}" + configMap: + name: "{{ .Release.Name }}-redis-configmap" items: - key: REDIS_CA_CERT path: redis_ca.pem diff --git a/charts/operator-wandb/charts/filestream/templates/deployment.yaml b/charts/operator-wandb/charts/filestream/templates/deployment.yaml index 8634f7b1..2ef68c5b 100644 --- a/charts/operator-wandb/charts/filestream/templates/deployment.yaml +++ b/charts/operator-wandb/charts/filestream/templates/deployment.yaml @@ -129,7 +129,7 @@ spec: - name: REDIS_PASSWORD valueFrom: secretKeyRef: - name: {{ include "wandb.redis.passwordSecret" . }} + name: {{ include "wandb.redis.secretName" . }} optional: true key: REDIS_PASSWORD - name: REDIS_PORT @@ -177,8 +177,8 @@ spec: volumes: {{- if ne (include "wandb.redis.caCert" .) "" }} - name: {{ include "filestream.fullname" . }}-redis-ca - secret: - secretName: "{{ include "wandb.redis.passwordSecret" . }}" + configMap: + name: "{{ .Release.Name }}-redis-configmap" items: - key: REDIS_CA_CERT path: redis_ca.pem diff --git a/charts/operator-wandb/charts/flat-run-fields-updater/templates/deployment.yaml b/charts/operator-wandb/charts/flat-run-fields-updater/templates/deployment.yaml index 5e8d2022..6712b5a4 100644 --- a/charts/operator-wandb/charts/flat-run-fields-updater/templates/deployment.yaml +++ b/charts/operator-wandb/charts/flat-run-fields-updater/templates/deployment.yaml @@ -153,7 +153,7 @@ spec: - name: REDIS_PASSWORD valueFrom: secretKeyRef: - name: {{ include "wandb.redis.passwordSecret" . }} + name: {{ include "wandb.redis.secretName" . }} optional: true key: REDIS_PASSWORD - name: REDIS_PORT @@ -189,8 +189,8 @@ spec: volumes: {{- if ne (include "wandb.redis.caCert" .) "" }} - name: {{ include "flat-run-fields-updater.fullname" . }}-redis-ca - secret: - secretName: "{{ include "wandb.redis.passwordSecret" . }}" + configMap: + name: "{{ .Release.Name }}-redis-configmap" items: - key: REDIS_CA_CERT path: redis_ca.pem diff --git a/charts/operator-wandb/charts/parquet/templates/cron.yaml b/charts/operator-wandb/charts/parquet/templates/cron.yaml index 1ea5c87d..d34d897c 100644 --- a/charts/operator-wandb/charts/parquet/templates/cron.yaml +++ b/charts/operator-wandb/charts/parquet/templates/cron.yaml @@ -104,7 +104,7 @@ spec: - name: REDIS_PASSWORD valueFrom: secretKeyRef: - name: {{ include "wandb.redis.passwordSecret" . }} + name: {{ include "wandb.redis.secretName" . }} key: REDIS_PASSWORD {{- end }} - name: REDIS_PORT @@ -166,8 +166,8 @@ spec: volumes: {{- if ne (include "wandb.redis.caCert" .) "" }} - name: {{ include "parquet.fullname" . }}-redis-ca - secret: - secretName: "{{ include "wandb.redis.passwordSecret" . }}" + configMap: + name: "{{ .Release.Name }}-redis-configmap" items: - key: REDIS_CA_CERT path: redis_ca.pem diff --git a/charts/operator-wandb/charts/parquet/templates/deployment.yaml b/charts/operator-wandb/charts/parquet/templates/deployment.yaml index 96332cc5..8ce2281b 100644 --- a/charts/operator-wandb/charts/parquet/templates/deployment.yaml +++ b/charts/operator-wandb/charts/parquet/templates/deployment.yaml @@ -132,7 +132,7 @@ spec: - name: REDIS_PASSWORD valueFrom: secretKeyRef: - name: {{ include "wandb.redis.passwordSecret" . }} + name: {{ include "wandb.redis.secretName" . }} optional: true key: REDIS_PASSWORD - name: REDIS_PORT @@ -231,8 +231,8 @@ spec: {{- end }} {{- if ne (include "wandb.redis.caCert" .) "" }} - name: {{ include "parquet.fullname" . }}-redis-ca - secret: - secretName: "{{ include "wandb.redis.passwordSecret" . }}" + configMap: + name: "{{ .Release.Name }}-redis-configmap" items: - key: REDIS_CA_CERT path: redis_ca.pem diff --git a/charts/operator-wandb/charts/prometheus/charts/mysql-exporter/templates/deployment.yaml b/charts/operator-wandb/charts/prometheus/charts/mysql-exporter/templates/deployment.yaml index 34839bcb..f1c40619 100644 --- a/charts/operator-wandb/charts/prometheus/charts/mysql-exporter/templates/deployment.yaml +++ b/charts/operator-wandb/charts/prometheus/charts/mysql-exporter/templates/deployment.yaml @@ -90,8 +90,8 @@ spec: volumes: {{- if ne (include "wandb.redis.caCert" .) "" }} - name: {{ include "mysql-exporter.fullname" . }}-redis-ca - secret: - secretName: "{{ include "wandb.redis.passwordSecret" . }}" + configMap: + name: "{{ .Release.Name }}-redis-configmap" items: - key: REDIS_CA_CERT path: redis_ca.pem diff --git a/charts/operator-wandb/charts/prometheus/charts/redis-exporter/templates/deployment.yaml b/charts/operator-wandb/charts/prometheus/charts/redis-exporter/templates/deployment.yaml index 34ed6d19..2118a5ce 100644 --- a/charts/operator-wandb/charts/prometheus/charts/redis-exporter/templates/deployment.yaml +++ b/charts/operator-wandb/charts/prometheus/charts/redis-exporter/templates/deployment.yaml @@ -58,7 +58,7 @@ spec: - name: REDIS_PASSWORD valueFrom: secretKeyRef: - name: {{ include "wandb.redis.passwordSecret" . }} + name: {{ include "wandb.redis.secretName" . }} optional: true key: REDIS_PASSWORD - name: REDIS_PORT @@ -89,8 +89,8 @@ spec: volumes: {{- if ne (include "wandb.redis.caCert" .) "" }} - name: {{ include "redis-exporter.fullname" . }}-redis-ca - secret: - secretName: "{{ include "wandb.redis.passwordSecret" . }}" + configMap: + name: "{{ .Release.Name }}-redis-configmap" items: - key: REDIS_CA_CERT path: redis_ca.pem diff --git a/charts/operator-wandb/templates/_redis.tpl b/charts/operator-wandb/templates/_redis.tpl index 9c29f6e2..de747e05 100644 --- a/charts/operator-wandb/templates/_redis.tpl +++ b/charts/operator-wandb/templates/_redis.tpl @@ -1,7 +1,7 @@ {{/* Return name of secret where redis information is stored */}} -{{- define "wandb.redis.passwordSecret" -}} +{{- define "wandb.redis.secretName" -}} {{- if .Values.global.redis.secret.secretName -}} {{ .Values.global.redis.secret.secretName }} {{- else -}} diff --git a/charts/operator-wandb/templates/redis.yaml b/charts/operator-wandb/templates/redis.yaml index 7330fa1e..fd88ffac 100644 --- a/charts/operator-wandb/templates/redis.yaml +++ b/charts/operator-wandb/templates/redis.yaml @@ -1,14 +1,12 @@ -{{- if not .Values.redis.install }} -{{- $secretName := (include "wandb.redis.passwordSecret" .) }} +{{- if not (or .Values.redis.install .Values.global.redis.secret.secretName) }} apiVersion: v1 kind: Secret metadata: - name: "{{ $secretName }}" + name: "{{ .Release.Name }}-redis-secret" labels: {{- include "wandb.commonLabels" . | nindent 4 }} data: REDIS_PASSWORD: {{ include "wandb.redis.password" . | b64enc }} - REDIS_CA_CERT: {{ include "wandb.redis.caCert" . | b64enc }} {{- end }} --- @@ -19,5 +17,6 @@ metadata: labels: {{- include "wandb.commonLabels" . | nindent 4 }} data: + REDIS_CA_CERT: {{ include "wandb.redis.caCert" . | quote}} REDIS_PORT: "{{ include "wandb.redis.port" . }}" REDIS_HOST: "{{ include "wandb.redis.host" . }}" diff --git a/charts/operator-wandb/values.yaml b/charts/operator-wandb/values.yaml index df71ce0d..cf8de90a 100644 --- a/charts/operator-wandb/values.yaml +++ b/charts/operator-wandb/values.yaml @@ -550,8 +550,8 @@ glue: name: '{{ .Values.global.caCertsConfigMap | default "noCertProvided" }}' optional: true - name: redis-ca - secret: - secretName: "{{ .Release.Name }}-redis-secret" + configMap: + name: "{{ .Release.Name }}-redis-configmap" items: - key: REDIS_CA_CERT path: redis_ca.pem