Skip to content
This repository was archived by the owner on Oct 15, 2025. It is now read-only.

Commit 1319ed3

Browse files
Update charts/llm-d/templates/modelservice/_helpers.tpl
non global pull-secrets as well Co-authored-by: Tom Coufal <7453394+tumido@users.noreply.github.com>
1 parent f13de68 commit 1319ed3

1 file changed

Lines changed: 23 additions & 2 deletions

File tree

charts/llm-d/templates/modelservice/_helpers.tpl

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,27 @@ Return the proper Docker Image Registry Secret Names
7272
{{- end -}}
7373

7474

75-
{{- define "modelservice.imagePullSecretsString" -}}
76-
{{- join "," .Values.global.imagePullSecrets | quote -}}
75+
{{- define "common.images.renderImagePullSecretsString" -}}
76+
{{- $pullSecrets := list }}
77+
{{- $context := .context }}
78+
79+
{{- range (($context.Values.global).imagePullSecrets) -}}
80+
{{- if kindIs "map" . -}}
81+
{{- $pullSecrets = append $pullSecrets (include "common.tplvalues.render" (dict "value" .name "context" $context)) -}}
82+
{{- else -}}
83+
{{- $pullSecrets = append $pullSecrets (include "common.tplvalues.render" (dict "value" . "context" $context)) -}}
84+
{{- end -}}
85+
{{- end -}}
86+
87+
{{- range .images -}}
88+
{{- range .pullSecrets -}}
89+
{{- if kindIs "map" . -}}
90+
{{- $pullSecrets = append $pullSecrets (include "common.tplvalues.render" (dict "value" .name "context" $context)) -}}
91+
{{- else -}}
92+
{{- $pullSecrets = append $pullSecrets (include "common.tplvalues.render" (dict "value" . "context" $context)) -}}
93+
{{- end -}}
94+
{{- end -}}
95+
{{- end -}}
96+
97+
{{- join "," ($pullSecrets | uniq) | quote }}
7798
{{- end }}

0 commit comments

Comments
 (0)