Skip to content

Commit

Permalink
Fix extraEnvs not working
Browse files Browse the repository at this point in the history
  • Loading branch information
jsbroks committed Aug 30, 2023
1 parent 334ca34 commit 7b300f2
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 7 deletions.
2 changes: 1 addition & 1 deletion charts/operator-wandb/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: operator-wandb
description: A Helm chart for deploying W&B to Kubernetes
type: application
version: 0.5.3
version: 0.5.4
appVersion: 1.0.0
icon: https://wandb.ai/logo.svg

Expand Down
10 changes: 9 additions & 1 deletion charts/operator-wandb/charts/app/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,15 @@ spec:

- name: LOGGING_ENABLED
value: 'true'
{{- include "app.extraEnv" (dict "global" .Values.global "local" .) | nindent 12 }}

- name: AZURE_STORAGE_KEY
valueFrom:
secretKeyRef:
name: "{{ include "wandb.bucket.secret" . }}"
key: ACCESS_KEY
optional: true

{{- include "app.extraEnv" (dict "global" $.Values.global "local" .Values) | nindent 12 }}
{{- include "wandb.extraEnvFrom" (dict "root" $ "local" .) | nindent 12 }}
livenessProbe:
httpGet:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ spec:
value: {{ $.Release.Name }}
- name: INSTANCE_NAMESPACE
value: {{ $.Release.Namespace }}
{{- include "console.extraEnv" (dict "global" .Values.global "local" .) | nindent 12 }}
{{- include "console.extraEnv" (dict "global" .Values.global "local" .Values) | nindent 12 }}
{{- include "wandb.extraEnvFrom" (dict "root" $ "local" .) | nindent 12 }}
livenessProbe:
httpGet:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ spec:
secretKeyRef:
name: {{ include "wandb.mysql.passwordSecret" . }}
key: MYSQL_PASSWORD
{{- include "mysql.extraEnv" (dict "global" .Values.global "local" .) | nindent 12 }}
{{- include "mysql.extraEnv" (dict "global" .Values.global "local" .Values) | nindent 12 }}
{{- include "wandb.extraEnvFrom" (dict "root" $ "local" .) | nindent 12 }}
livenessProbe:
exec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ spec:
- name: LOGGING_ENABLED
value: 'true'

{{- include "parquet.extraEnv" (dict "global" .Values.global "local" .) | nindent 12 }}
{{- include "parquet.extraEnv" (dict "global" .Values.global "local" .Values) | nindent 12 }}
{{- include "wandb.extraEnvFrom" (dict "root" $ "local" .) | nindent 12 }}

resources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ spec:
containerPort: 6379
protocol: TCP
env:
{{- include "redis.extraEnv" (dict "global" .Values.global "local" .) | nindent 12 }}
{{- include "redis.extraEnv" (dict "global" .Values.global "local" .Values) | nindent 12 }}
{{- include "wandb.extraEnvFrom" (dict "root" $ "local" .) | nindent 12 }}
livenessProbe:
exec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ spec:
- name: WEAVE_AUTH_GRAPHQL_URL
value: {{ .Values.global.host }}/graphql

{{- include "weave.extraEnv" (dict "global" .Values.global "local" .) | nindent 12 }}
{{- include "weave.extraEnv" (dict "global" .Values.global "local" .Values) | nindent 12 }}
{{- include "wandb.extraEnvFrom" (dict "root" $ "local" .) | nindent 12 }}
livenessProbe:
httpGet:
Expand Down
6 changes: 6 additions & 0 deletions charts/operator-wandb/templates/_bucket.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{{/*
Return name of secret where bucket information is stored
*/}}
{{- define "wandb.bucket.secret" -}}
{{- print .Release.Name "-bucket" -}}
{{- end -}}
9 changes: 9 additions & 0 deletions charts/operator-wandb/templates/bucket.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: v1
kind: Secret
metadata:
name: {{ include "wandb.bucket.secret" . }}
labels:
{{- include "wandb.commonLabels" . | nindent 4 }}
data:
ACCESS_KEY: {{ .Values.global.bucket.accessKey | b64enc }}
SECRET_KEY: {{ .Values.global.bucket.secretKey | b64enc }}

0 comments on commit 7b300f2

Please sign in to comment.