From e1c928f97e093604f3bf49041777bb39c5b46a6c Mon Sep 17 00:00:00 2001 From: Daniel Panzella Date: Thu, 26 Dec 2024 13:31:25 -0800 Subject: [PATCH] fix: multiple containers and default values --- charts/operator-wandb/Chart.lock | 6 +- charts/operator-wandb/values.yaml | 2 +- charts/wandb-base/templates/_containers.tpl | 18 +++--- charts/wandb-base/values.yaml | 64 ++++++++++----------- 4 files changed, 45 insertions(+), 45 deletions(-) diff --git a/charts/operator-wandb/Chart.lock b/charts/operator-wandb/Chart.lock index b2941e87..eb0985d9 100644 --- a/charts/operator-wandb/Chart.lock +++ b/charts/operator-wandb/Chart.lock @@ -55,6 +55,6 @@ dependencies: version: 0.1.0 - name: wandb-base repository: file://../wandb-base - version: 0.1.1 -digest: sha256:3c02029e1921428d7f45866291a8c42b79894505ee47864c54f34fcd847b2793 -generated: "2024-12-19T11:00:55.672581+05:30" + version: 0.2.0 +digest: sha256:4a8dbdef20db07f9ed7e39f3353aa265a310b025637b15e19d3f149f601894e0 +generated: "2024-12-26T13:14:12.979282-08:00" diff --git a/charts/operator-wandb/values.yaml b/charts/operator-wandb/values.yaml index bffd0908..39d96f4d 100644 --- a/charts/operator-wandb/values.yaml +++ b/charts/operator-wandb/values.yaml @@ -496,7 +496,7 @@ glue: "{{ .Release.Name }}-glue-secret": "secretRef" "{{ .Release.Name }}-glue-configmap": "configMapRef" containers: - - name: glue + glue: args: ["glue"] env: {} envFrom: {} diff --git a/charts/wandb-base/templates/_containers.tpl b/charts/wandb-base/templates/_containers.tpl index ac7545fb..adab8a42 100644 --- a/charts/wandb-base/templates/_containers.tpl +++ b/charts/wandb-base/templates/_containers.tpl @@ -2,8 +2,8 @@ wandb-base.containers should be passed a dict with key `containers` containing the map of containers and a key `root` containing the . from the calling context */}} -{{- define "wandb-base.containers" }} -{{- range $containerName, $containerSource := .containers}} +{{- define "wandb-base.containers" -}} +{{- range $containerName, $containerSource := .containers -}} {{- $container := dict }} {{- $_ := deepCopy $containerSource | merge $container }} {{- $_ = set $container "name" $containerName }} @@ -16,7 +16,7 @@ {{- end }} {{- end }} -{{- define "wandb-base.container" -}} +{{- define "wandb-base.container" }} - name: {{ .name }} {{- if .command }} command: @@ -70,19 +70,19 @@ {{- end }} {{- end }} -{{- define "wandb-base.env" }} -{{- range $key, $value := .env }} +{{- define "wandb-base.env" -}} +{{- range $key, $value := .env -}} {{- if kindIs "string" $value }} - name: {{ $key }} value: {{ $value | quote }} {{- else }} - name: {{ $key }} {{- toYaml $value | nindent 2 }} -{{- end }} -{{- end }} -{{- end }} +{{- end -}} +{{- end -}} +{{- end -}} -{{- define "wandb-base.envFrom" }} +{{- define "wandb-base.envFrom" -}} {{- range $key, $value := .envFrom }} - {{ $value }}: name: {{ $key }} diff --git a/charts/wandb-base/values.yaml b/charts/wandb-base/values.yaml index c3ab213d..ee646270 100644 --- a/charts/wandb-base/values.yaml +++ b/charts/wandb-base/values.yaml @@ -49,38 +49,38 @@ securityContext: initContainers: [] -containers: - nginx: - command: [] - args: [] - env: {} - envFrom: {} - securityContext: {} - image: {} - ports: - - containerPort: 80 - name: http - livenessProbe: - httpGet: - path: / - port: http - readinessProbe: - httpGet: - path: / - port: http - startupProbe: - httpGet: - path: / - port: http - lifecycle: {} - resources: - limits: - cpu: 100m - memory: 128Mi - requests: - cpu: 100m - memory: 128Mi - volumeMounts: [] +containers: {} +# nginx: +# command: [] +# args: [] +# env: {} +# envFrom: {} +# securityContext: {} +# image: {} +# ports: +# - containerPort: 80 +# name: http +# livenessProbe: +# httpGet: +# path: / +# port: http +# readinessProbe: +# httpGet: +# path: / +# port: http +# startupProbe: +# httpGet: +# path: / +# port: http +# lifecycle: {} +# resources: +# limits: +# cpu: 100m +# memory: 128Mi +# requests: +# cpu: 100m +# memory: 128Mi +# volumeMounts: [] jobs: {} # example: