Skip to content

Commit f1d786a

Browse files
committed
fix(helm): keep workflow pod templates unchanged
1 parent cc7626e commit f1d786a

3 files changed

Lines changed: 8 additions & 33 deletions

File tree

deployments/charts/osmo/templates/configs.yaml

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -69,20 +69,8 @@ data:
6969
{{- toYaml $cfg.pools | nindent 6 }}
7070
{{- end }}
7171
{{- if $cfg.podTemplates }}
72-
{{- $podTemplates := deepCopy $cfg.podTemplates }}
73-
{{- if gt (len .Values.imagePullSecrets) 0 }}
74-
{{- range $_, $podTemplate := $podTemplates }}
75-
{{- if kindIs "map" $podTemplate }}
76-
{{- $spec := index $podTemplate "spec" | default dict }}
77-
{{- if and (kindIs "map" $spec) (not (hasKey $spec "imagePullSecrets")) }}
78-
{{- $_ := set $spec "imagePullSecrets" $.Values.imagePullSecrets }}
79-
{{- $_ := set $podTemplate "spec" $spec }}
80-
{{- end }}
81-
{{- end }}
82-
{{- end }}
83-
{{- end }}
8472
pod_templates:
85-
{{- toYaml $podTemplates | nindent 6 }}
73+
{{- toYaml $cfg.podTemplates | nindent 6 }}
8674
{{- end }}
8775
{{- if $cfg.resourceValidations }}
8876
resource_validations:

deployments/charts/osmo/tests/test_osmo_charts.sh

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -662,30 +662,19 @@ test_control_umbrella() {
662662
"init: nvcr.io/nvstaging/osmo/init-container:$quickstart_runtime_tag"
663663
require_contains "$TEST_DIRECTORY/quickstart-runtime-config.yaml" \
664664
"client: nvcr.io/nvstaging/osmo/client:$quickstart_runtime_tag"
665-
require_contains "$TEST_DIRECTORY/quickstart-runtime-config.yaml" \
665+
require_not_contains "$TEST_DIRECTORY/quickstart-runtime-config.yaml" \
666666
"imagePullSecrets:"
667-
require_contains "$TEST_DIRECTORY/quickstart-runtime-config.yaml" \
668-
"name: osmo-nvcr-pull"
669667
resource_document "$TEST_DIRECTORY/quickstart-runtime.yaml" Deployment \
670668
osmo-api >"$TEST_DIRECTORY/quickstart-runtime-api.yaml"
671669
require_contains "$TEST_DIRECTORY/quickstart-runtime-api.yaml" \
672670
"image: nvcr.io/nvstaging/osmo/service:$quickstart_runtime_tag"
671+
require_contains "$TEST_DIRECTORY/quickstart-runtime-api.yaml" \
672+
"imagePullSecrets:"
673+
require_contains "$TEST_DIRECTORY/quickstart-runtime-api.yaml" \
674+
"name: osmo-nvcr-pull"
673675
require_occurrences "$TEST_DIRECTORY/quickstart-runtime.yaml" \
674676
"image: nvcr.io/nvstaging/osmo/service:$quickstart_runtime_tag" 2
675677

676-
helm_template_with_backend quick-start-workflow-pull-secret "$charts_copy/osmo" \
677-
--namespace osmo \
678-
--api-versions postgresql.cnpg.io/v1 \
679-
-f "$charts_copy/osmo/profiles/quickstart.yaml" \
680-
--set-string 'imagePullSecrets[0].name=sentinel-pull-secret' \
681-
>"$TEST_DIRECTORY/quickstart-workflow-pull-secret.yaml"
682-
resource_document "$TEST_DIRECTORY/quickstart-workflow-pull-secret.yaml" ConfigMap \
683-
osmo-api-config >"$TEST_DIRECTORY/quickstart-workflow-pull-secret-config.yaml"
684-
require_contains "$TEST_DIRECTORY/quickstart-workflow-pull-secret-config.yaml" \
685-
"name: sentinel-pull-secret"
686-
require_not_contains "$TEST_DIRECTORY/quickstart-workflow-pull-secret-config.yaml" \
687-
"name: osmo-nvcr-pull"
688-
689678
helm_template_with_backend quick-start "$charts_copy/osmo" \
690679
--namespace osmo \
691680
--api-versions postgresql.cnpg.io/v1 \

deployments/charts/osmo/values.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,10 +139,8 @@ imageRepository: nvidia/osmo
139139
# service-specific image.tag or runtimeImage.tag takes precedence.
140140
imageTag: latest
141141

142-
# Pull credential Secret references for OSMO-owned pods. They are also used as
143-
# defaults for workflow pod templates that do not define their own list.
144-
# Configure third-party dependency pull credentials in the dependency's native
145-
# values block.
142+
# Pull credential Secret references for OSMO-owned pods. Configure third-party
143+
# dependency pull credentials in the dependency's native values block.
146144
imagePullSecrets: []
147145

148146
# Runtime image overrides for submitted workflows. Leave a field empty to

0 commit comments

Comments
 (0)