Skip to content

Commit

Permalink
fix: multiple containers and default values
Browse files Browse the repository at this point in the history
  • Loading branch information
danielpanzella committed Dec 26, 2024
1 parent 94b30b5 commit e1c928f
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 45 deletions.
6 changes: 3 additions & 3 deletions charts/operator-wandb/Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
2 changes: 1 addition & 1 deletion charts/operator-wandb/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ glue:
"{{ .Release.Name }}-glue-secret": "secretRef"
"{{ .Release.Name }}-glue-configmap": "configMapRef"
containers:
- name: glue
glue:
args: ["glue"]
env: {}
envFrom: {}
Expand Down
18 changes: 9 additions & 9 deletions charts/wandb-base/templates/_containers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -16,7 +16,7 @@
{{- end }}
{{- end }}

{{- define "wandb-base.container" -}}
{{- define "wandb-base.container" }}
- name: {{ .name }}
{{- if .command }}
command:
Expand Down Expand Up @@ -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 }}
Expand Down
64 changes: 32 additions & 32 deletions charts/wandb-base/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit e1c928f

Please sign in to comment.