From 2fb83e5384b734e8ff7f2d341460ae25f6068caf Mon Sep 17 00:00:00 2001 From: Daniel Barnes Date: Thu, 19 Dec 2024 04:53:27 +0900 Subject: [PATCH 1/8] tweak name ref --- charts/operator-wandb/templates/redis.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/charts/operator-wandb/templates/redis.yaml b/charts/operator-wandb/templates/redis.yaml index 7330fa1e..10e2c393 100644 --- a/charts/operator-wandb/templates/redis.yaml +++ b/charts/operator-wandb/templates/redis.yaml @@ -1,9 +1,8 @@ -{{- 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: From f217763e342f1790656a21d002c0c728ce53c359 Mon Sep 17 00:00:00 2001 From: Daniel Barnes Date: Thu, 19 Dec 2024 04:56:02 +0900 Subject: [PATCH 2/8] redis secret name ref change --- charts/operator-wandb/charts/app/templates/deployment.yaml | 4 ++-- .../operator-wandb/charts/executor/templates/deployment.yaml | 4 ++-- .../charts/filestream/templates/deployment.yaml | 4 ++-- .../charts/flat-run-fields-updater/templates/deployment.yaml | 4 ++-- charts/operator-wandb/charts/parquet/templates/cron.yaml | 4 ++-- .../operator-wandb/charts/parquet/templates/deployment.yaml | 4 ++-- .../charts/redis-exporter/templates/deployment.yaml | 4 ++-- charts/operator-wandb/templates/_redis.tpl | 2 +- 8 files changed, 15 insertions(+), 15 deletions(-) diff --git a/charts/operator-wandb/charts/app/templates/deployment.yaml b/charts/operator-wandb/charts/app/templates/deployment.yaml index bcc074b1..5ce1ba76 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 @@ -333,7 +333,7 @@ spec: {{- if ne (include "wandb.redis.caCert" .) "" }} - name: {{ include "app.fullname" . }}-redis-ca secret: - secretName: "{{ include "wandb.redis.passwordSecret" . }}" + secretName: "{{ include "wandb.redis.secretName" . }}" 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..b98e9145 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 @@ -170,7 +170,7 @@ spec: {{- if ne (include "wandb.redis.caCert" .) "" }} - name: {{ include "executor.fullname" . }}-redis-ca secret: - secretName: "{{ include "wandb.redis.passwordSecret" . }}" + secretName: "{{ include "wandb.redis.secretName" . }}" 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..42cd4a66 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 @@ -178,7 +178,7 @@ spec: {{- if ne (include "wandb.redis.caCert" .) "" }} - name: {{ include "filestream.fullname" . }}-redis-ca secret: - secretName: "{{ include "wandb.redis.passwordSecret" . }}" + secretName: "{{ include "wandb.redis.secretName" . }}" 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..05c45244 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 @@ -190,7 +190,7 @@ spec: {{- if ne (include "wandb.redis.caCert" .) "" }} - name: {{ include "flat-run-fields-updater.fullname" . }}-redis-ca secret: - secretName: "{{ include "wandb.redis.passwordSecret" . }}" + secretName: "{{ include "wandb.redis.secretName" . }}" 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..6d9a9132 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 @@ -167,7 +167,7 @@ spec: {{- if ne (include "wandb.redis.caCert" .) "" }} - name: {{ include "parquet.fullname" . }}-redis-ca secret: - secretName: "{{ include "wandb.redis.passwordSecret" . }}" + secretName: "{{ include "wandb.redis.secretName" . }}" 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 9938010f..c3e2e0d7 100644 --- a/charts/operator-wandb/charts/parquet/templates/deployment.yaml +++ b/charts/operator-wandb/charts/parquet/templates/deployment.yaml @@ -117,7 +117,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 @@ -197,7 +197,7 @@ spec: {{- if ne (include "wandb.redis.caCert" .) "" }} - name: {{ include "parquet.fullname" . }}-redis-ca secret: - secretName: "{{ include "wandb.redis.passwordSecret" . }}" + secretName: "{{ include "wandb.redis.secretName" . }}" 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..742d11ef 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 @@ -90,7 +90,7 @@ spec: {{- if ne (include "wandb.redis.caCert" .) "" }} - name: {{ include "redis-exporter.fullname" . }}-redis-ca secret: - secretName: "{{ include "wandb.redis.passwordSecret" . }}" + secretName: "{{ include "wandb.redis.secretName" . }}" 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 -}} From 96cf4cee075536169c9b616c7467440bf4b9a725 Mon Sep 17 00:00:00 2001 From: Daniel Barnes Date: Thu, 19 Dec 2024 05:17:57 +0900 Subject: [PATCH 3/8] mount redis ca cert from configmap --- charts/operator-wandb/charts/app/templates/deployment.yaml | 4 ++-- .../charts/executor/templates/deployment.yaml | 4 ++-- .../charts/filestream/templates/deployment.yaml | 4 ++-- .../flat-run-fields-updater/templates/deployment.yaml | 4 ++-- charts/operator-wandb/charts/parquet/templates/cron.yaml | 4 ++-- .../operator-wandb/charts/parquet/templates/deployment.yaml | 4 ++-- .../charts/mysql-exporter/templates/deployment.yaml | 4 ++-- .../charts/redis-exporter/templates/deployment.yaml | 4 ++-- charts/operator-wandb/templates/redis.yaml | 2 +- charts/operator-wandb/values.yaml | 6 +++--- 10 files changed, 20 insertions(+), 20 deletions(-) diff --git a/charts/operator-wandb/charts/app/templates/deployment.yaml b/charts/operator-wandb/charts/app/templates/deployment.yaml index 5ce1ba76..65c8e117 100644 --- a/charts/operator-wandb/charts/app/templates/deployment.yaml +++ b/charts/operator-wandb/charts/app/templates/deployment.yaml @@ -332,8 +332,8 @@ spec: volumes: {{- if ne (include "wandb.redis.caCert" .) "" }} - name: {{ include "app.fullname" . }}-redis-ca - secret: - secretName: "{{ include "wandb.redis.secretName" . }}" + 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 b98e9145..b15ce58d 100644 --- a/charts/operator-wandb/charts/executor/templates/deployment.yaml +++ b/charts/operator-wandb/charts/executor/templates/deployment.yaml @@ -169,8 +169,8 @@ spec: volumes: {{- if ne (include "wandb.redis.caCert" .) "" }} - name: {{ include "executor.fullname" . }}-redis-ca - secret: - secretName: "{{ include "wandb.redis.secretName" . }}" + 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 42cd4a66..2ef68c5b 100644 --- a/charts/operator-wandb/charts/filestream/templates/deployment.yaml +++ b/charts/operator-wandb/charts/filestream/templates/deployment.yaml @@ -177,8 +177,8 @@ spec: volumes: {{- if ne (include "wandb.redis.caCert" .) "" }} - name: {{ include "filestream.fullname" . }}-redis-ca - secret: - secretName: "{{ include "wandb.redis.secretName" . }}" + 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 05c45244..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 @@ -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.secretName" . }}" + 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 6d9a9132..d34d897c 100644 --- a/charts/operator-wandb/charts/parquet/templates/cron.yaml +++ b/charts/operator-wandb/charts/parquet/templates/cron.yaml @@ -166,8 +166,8 @@ spec: volumes: {{- if ne (include "wandb.redis.caCert" .) "" }} - name: {{ include "parquet.fullname" . }}-redis-ca - secret: - secretName: "{{ include "wandb.redis.secretName" . }}" + 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 c3e2e0d7..50f885b1 100644 --- a/charts/operator-wandb/charts/parquet/templates/deployment.yaml +++ b/charts/operator-wandb/charts/parquet/templates/deployment.yaml @@ -196,8 +196,8 @@ spec: volumes: {{- if ne (include "wandb.redis.caCert" .) "" }} - name: {{ include "parquet.fullname" . }}-redis-ca - secret: - secretName: "{{ include "wandb.redis.secretName" . }}" + 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 742d11ef..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 @@ -89,8 +89,8 @@ spec: volumes: {{- if ne (include "wandb.redis.caCert" .) "" }} - name: {{ include "redis-exporter.fullname" . }}-redis-ca - secret: - secretName: "{{ include "wandb.redis.secretName" . }}" + configMap: + name: "{{ .Release.Name }}-redis-configmap" items: - key: REDIS_CA_CERT path: redis_ca.pem diff --git a/charts/operator-wandb/templates/redis.yaml b/charts/operator-wandb/templates/redis.yaml index 10e2c393..3855db6c 100644 --- a/charts/operator-wandb/templates/redis.yaml +++ b/charts/operator-wandb/templates/redis.yaml @@ -7,7 +7,6 @@ metadata: {{- include "wandb.commonLabels" . | nindent 4 }} data: REDIS_PASSWORD: {{ include "wandb.redis.password" . | b64enc }} - REDIS_CA_CERT: {{ include "wandb.redis.caCert" . | b64enc }} {{- end }} --- @@ -18,5 +17,6 @@ metadata: labels: {{- include "wandb.commonLabels" . | nindent 4 }} data: + REDIS_CA_CERT: {{ include "wandb.redis.caCert" . }} 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 e82e09e6..51aa46cc 100644 --- a/charts/operator-wandb/values.yaml +++ b/charts/operator-wandb/values.yaml @@ -476,7 +476,7 @@ glue: "wandb-mysql": "secretRef" "{{ .Release.Name }}-bucket-configmap": "configMapRef" "{{ .Release.Name }}-mysql-configmap": "configMapRef" - "{{ .Release.Name }}-redis-secret": "secretRef" + "{{ include \"wandb.redis.secretName\" . }}": "secretRef" "{{ .Release.Name }}-redis-configmap": "configMapRef" "{{ .Release.Name }}-global-secret": "secretRef" "{{ .Release.Name }}-gorilla-secret": "secretRef" @@ -528,8 +528,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 From e17b6c3ceedc66c94e3c6529fa76b13fbc02827b Mon Sep 17 00:00:00 2001 From: Daniel Barnes Date: Thu, 19 Dec 2024 06:06:35 +0900 Subject: [PATCH 4/8] fix template errors --- charts/operator-wandb/templates/redis.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/operator-wandb/templates/redis.yaml b/charts/operator-wandb/templates/redis.yaml index 3855db6c..fd88ffac 100644 --- a/charts/operator-wandb/templates/redis.yaml +++ b/charts/operator-wandb/templates/redis.yaml @@ -1,4 +1,4 @@ -{{- if not or .Values.redis.install .Values.global.redis.secret.secretName }} +{{- if not (or .Values.redis.install .Values.global.redis.secret.secretName) }} apiVersion: v1 kind: Secret metadata: @@ -17,6 +17,6 @@ metadata: labels: {{- include "wandb.commonLabels" . | nindent 4 }} data: - REDIS_CA_CERT: {{ include "wandb.redis.caCert" . }} + REDIS_CA_CERT: {{ include "wandb.redis.caCert" . | quote}} REDIS_PORT: "{{ include "wandb.redis.port" . }}" REDIS_HOST: "{{ include "wandb.redis.host" . }}" From 5ace73ee5f34705b209a2748e5a35ca35828d791 Mon Sep 17 00:00:00 2001 From: Daniel Barnes Date: Thu, 19 Dec 2024 06:12:48 +0900 Subject: [PATCH 5/8] revert glue secret ref --- charts/operator-wandb/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/operator-wandb/values.yaml b/charts/operator-wandb/values.yaml index 51aa46cc..3483b619 100644 --- a/charts/operator-wandb/values.yaml +++ b/charts/operator-wandb/values.yaml @@ -476,7 +476,7 @@ glue: "wandb-mysql": "secretRef" "{{ .Release.Name }}-bucket-configmap": "configMapRef" "{{ .Release.Name }}-mysql-configmap": "configMapRef" - "{{ include \"wandb.redis.secretName\" . }}": "secretRef" + "{{ .Release.Name }}-redis-secret": "secretRef" "{{ .Release.Name }}-redis-configmap": "configMapRef" "{{ .Release.Name }}-global-secret": "secretRef" "{{ .Release.Name }}-gorilla-secret": "secretRef" From 53683cde0b0741925f3a600a59f991ea37420ed4 Mon Sep 17 00:00:00 2001 From: Daniel Barnes Date: Thu, 19 Dec 2024 06:13:39 +0900 Subject: [PATCH 6/8] bump version --- charts/operator-wandb/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/operator-wandb/Chart.yaml b/charts/operator-wandb/Chart.yaml index 13006d9e..48a0dcc0 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.21.8 +version: 0.21.9 appVersion: 1.0.0 icon: https://wandb.ai/logo.svg From 510d2cce710b70527f5cd5792d14faa4d7dac5dd Mon Sep 17 00:00:00 2001 From: Daniel Barnes Date: Sat, 21 Dec 2024 04:50:52 +0900 Subject: [PATCH 7/8] version bump --- charts/operator-wandb/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/operator-wandb/Chart.yaml b/charts/operator-wandb/Chart.yaml index 48a0dcc0..a9545910 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.21.9 +version: 0.21.10 appVersion: 1.0.0 icon: https://wandb.ai/logo.svg From c7b406dc3bbc833418b3f319453bcc9b5e4bff6d Mon Sep 17 00:00:00 2001 From: Daniel Barnes Date: Sat, 11 Jan 2025 07:09:29 +0900 Subject: [PATCH 8/8] fix version --- charts/operator-wandb/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/operator-wandb/Chart.yaml b/charts/operator-wandb/Chart.yaml index a9545910..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.21.10 +version: 0.22.4 appVersion: 1.0.0 icon: https://wandb.ai/logo.svg