Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add more granular extraEnvs for parquet #203

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.17.3
version: 0.17.4
appVersion: 1.0.0
icon: https://wandb.ai/logo.svg

Expand Down
28 changes: 28 additions & 0 deletions charts/operator-wandb/charts/parquet/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions charts/operator-wandb/charts/parquet/templates/cron.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 3 additions & 1 deletion charts/operator-wandb/charts/parquet/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@ extraCors: []

common:
labels: {}
deployment: {}
deployment:
extraEnv: {}
cronJob:
exportHistoryToParquet:
enabled: false
schedule: "11 * * * *"
extraEnv: {}
serviceAccount:
create: true
annotations: {}
Expand Down
Loading