diff --git a/charts/operator-wandb/Chart.yaml b/charts/operator-wandb/Chart.yaml index d04b26c0..1f89a10d 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.17.3 +version: 0.17.4 appVersion: 1.0.0 icon: https://wandb.ai/logo.svg diff --git a/charts/operator-wandb/charts/parquet/templates/_helpers.tpl b/charts/operator-wandb/charts/parquet/templates/_helpers.tpl index ec31c105..7ba21d0c 100644 --- a/charts/operator-wandb/charts/parquet/templates/_helpers.tpl +++ b/charts/operator-wandb/charts/parquet/templates/_helpers.tpl @@ -87,6 +87,34 @@ Global values will override any chart-specific values. {{- end -}} {{- end -}} + +{{/* +Returns the extraEnv keys and values to inject into the parquet deployment. + +Global values will override any chart-specific values. +*/}} +{{- define "parquet.deploymentExtraEnv" -}} +{{- $allExtraEnv := default (dict) .local.deployment.extraEnv -}} +{{- range $key, $value := $allExtraEnv }} +- name: {{ $key }} + value: {{ $value | quote }} +{{- end -}} +{{- end -}} + + +{{/* +Returns the extraEnv keys and values to inject into the parquet backfill cronjob. + +Global values will override any chart-specific values. +*/}} +{{- define "parquet.cronJobExtraEnv" -}} +{{- $allExtraEnv := default (dict) .local.cronJob.extraEnv -}} +{{- range $key, $value := $allExtraEnv }} +- name: {{ $key }} + value: {{ $value | quote }} +{{- end -}} +{{- end -}} + {{/* Returns a list of _common_ labels to be shared across all app deployments and other shared objects. diff --git a/charts/operator-wandb/charts/parquet/templates/cron.yaml b/charts/operator-wandb/charts/parquet/templates/cron.yaml index d7e82892..903dd1f9 100644 --- a/charts/operator-wandb/charts/parquet/templates/cron.yaml +++ b/charts/operator-wandb/charts/parquet/templates/cron.yaml @@ -135,6 +135,7 @@ spec: fieldRef: fieldPath: status.hostIP {{- include "parquet.extraEnv" (dict "global" $.Values.global "local" .Values) | nindent 16 }} + {{- include "parquet.cronJobExtraEnv" (dict "global" $.Values.global "local" .Values) | nindent 16 }} {{- include "wandb.extraEnvFrom" (dict "root" $ "local" .) | nindent 16 }} serviceAccountName: {{ include "parquet.serviceAccountName" . }} volumes: diff --git a/charts/operator-wandb/charts/parquet/templates/deployment.yaml b/charts/operator-wandb/charts/parquet/templates/deployment.yaml index 7ada49d7..bed5f320 100644 --- a/charts/operator-wandb/charts/parquet/templates/deployment.yaml +++ b/charts/operator-wandb/charts/parquet/templates/deployment.yaml @@ -116,6 +116,7 @@ spec: {{- end }} {{- include "parquet.extraEnv" (dict "global" .Values.global "local" .Values) | nindent 12 }} + {{- include "parquet.deploymentExtraEnv" (dict "global" $.Values.global "local" .Values) | nindent 12 }} {{- include "wandb.extraEnvFrom" (dict "root" $ "local" .) | nindent 12 }} livenessProbe: diff --git a/charts/operator-wandb/charts/parquet/values.yaml b/charts/operator-wandb/charts/parquet/values.yaml index 547a3700..34c1a203 100644 --- a/charts/operator-wandb/charts/parquet/values.yaml +++ b/charts/operator-wandb/charts/parquet/values.yaml @@ -17,11 +17,13 @@ extraCors: [] common: labels: {} -deployment: {} +deployment: + extraEnv: {} cronJob: exportHistoryToParquet: enabled: false schedule: "11 * * * *" + extraEnv: {} serviceAccount: create: true annotations: {}