Skip to content

Commit 349cc08

Browse files
authored
Fix image pull secrets list arguments in the chart (#4164)
1 parent aa14f50 commit 349cc08

File tree

3 files changed

+6
-10
lines changed

3 files changed

+6
-10
lines changed

charts/gha-runner-scale-set-controller/templates/_helpers.tpl

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -129,11 +129,3 @@ Create the name of the service account to use
129129
{{- define "gha-runner-scale-set-controller.leaderElectionRoleBinding" -}}
130130
{{- include "gha-runner-scale-set-controller.fullname" . }}-leader-election
131131
{{- end }}
132-
133-
{{- define "gha-runner-scale-set-controller.imagePullSecretsNames" -}}
134-
{{- $names := list }}
135-
{{- range $k, $v := . }}
136-
{{- $names = append $names $v.name }}
137-
{{- end }}
138-
{{- $names | join ","}}
139-
{{- end }}

charts/gha-runner-scale-set-controller/templates/deployment.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ spec:
5454
- "--leader-election-id={{ include "gha-runner-scale-set-controller.fullname" . }}"
5555
{{- end }}
5656
{{- with .Values.imagePullSecrets }}
57-
- "--auto-scaler-image-pull-secrets={{ include "gha-runner-scale-set-controller.imagePullSecretsNames" . }}"
57+
{{- range . }}
58+
- "--auto-scaler-image-pull-secrets={{- .name -}}"
59+
{{- end }}
5860
{{- end }}
5961
{{- with .Values.flags.logLevel }}
6062
- "--log-level={{ . }}"

charts/gha-runner-scale-set-controller/tests/template_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,8 @@ func TestTemplate_ControllerDeployment_ForwardImagePullSecrets(t *testing.T) {
683683

684684
expectedArgs := []string{
685685
"--auto-scaling-runner-set-only",
686-
"--auto-scaler-image-pull-secrets=dockerhub,ghcr",
686+
"--auto-scaler-image-pull-secrets=dockerhub",
687+
"--auto-scaler-image-pull-secrets=ghcr",
687688
"--log-level=debug",
688689
"--log-format=text",
689690
"--update-strategy=immediate",
@@ -1079,6 +1080,7 @@ func TestDeployment_excludeLabelPropagationPrefixes(t *testing.T) {
10791080
assert.Contains(t, container.Args, "--exclude-label-propagation-prefix=prefix.com/")
10801081
assert.Contains(t, container.Args, "--exclude-label-propagation-prefix=complete.io/label")
10811082
}
1083+
10821084
func TestNamespaceOverride(t *testing.T) {
10831085
t.Parallel()
10841086

0 commit comments

Comments
 (0)