Fix image pull secrets list arguments in the chart
This commit is contained in:
		
							parent
							
								
									aa14f50e45
								
							
						
					
					
						commit
						3417034501
					
				|  | @ -129,11 +129,3 @@ Create the name of the service account to use | ||||||
| {{- define "gha-runner-scale-set-controller.leaderElectionRoleBinding" -}} | {{- define "gha-runner-scale-set-controller.leaderElectionRoleBinding" -}} | ||||||
| {{- include "gha-runner-scale-set-controller.fullname" . }}-leader-election | {{- include "gha-runner-scale-set-controller.fullname" . }}-leader-election | ||||||
| {{- end }} | {{- end }} | ||||||
| 
 |  | ||||||
| {{- define "gha-runner-scale-set-controller.imagePullSecretsNames" -}} |  | ||||||
| {{- $names := list }} |  | ||||||
| {{- range $k, $v := . }} |  | ||||||
|   {{- $names = append $names $v.name }} |  | ||||||
| {{- end }} |  | ||||||
| {{- $names | join ","}} |  | ||||||
| {{- end }} |  | ||||||
|  |  | ||||||
|  | @ -54,7 +54,9 @@ spec: | ||||||
|         - "--leader-election-id={{ include "gha-runner-scale-set-controller.fullname" . }}" |         - "--leader-election-id={{ include "gha-runner-scale-set-controller.fullname" . }}" | ||||||
|         {{- end }} |         {{- end }} | ||||||
|         {{- with .Values.imagePullSecrets }} |         {{- with .Values.imagePullSecrets }} | ||||||
|         - "--auto-scaler-image-pull-secrets={{ include "gha-runner-scale-set-controller.imagePullSecretsNames" . }}" |         {{- range . }} | ||||||
|  |         - "--auto-scaler-image-pull-secrets={{- .name -}}" | ||||||
|  |         {{- end }} | ||||||
|         {{- end }} |         {{- end }} | ||||||
|         {{- with .Values.flags.logLevel }} |         {{- with .Values.flags.logLevel }} | ||||||
|         - "--log-level={{ . }}" |         - "--log-level={{ . }}" | ||||||
|  |  | ||||||
|  | @ -683,7 +683,8 @@ func TestTemplate_ControllerDeployment_ForwardImagePullSecrets(t *testing.T) { | ||||||
| 
 | 
 | ||||||
| 	expectedArgs := []string{ | 	expectedArgs := []string{ | ||||||
| 		"--auto-scaling-runner-set-only", | 		"--auto-scaling-runner-set-only", | ||||||
| 		"--auto-scaler-image-pull-secrets=dockerhub,ghcr", | 		"--auto-scaler-image-pull-secrets=dockerhub", | ||||||
|  | 		"--auto-scaler-image-pull-secrets=ghcr", | ||||||
| 		"--log-level=debug", | 		"--log-level=debug", | ||||||
| 		"--log-format=text", | 		"--log-format=text", | ||||||
| 		"--update-strategy=immediate", | 		"--update-strategy=immediate", | ||||||
|  | @ -1079,6 +1080,7 @@ func TestDeployment_excludeLabelPropagationPrefixes(t *testing.T) { | ||||||
| 	assert.Contains(t, container.Args, "--exclude-label-propagation-prefix=prefix.com/") | 	assert.Contains(t, container.Args, "--exclude-label-propagation-prefix=prefix.com/") | ||||||
| 	assert.Contains(t, container.Args, "--exclude-label-propagation-prefix=complete.io/label") | 	assert.Contains(t, container.Args, "--exclude-label-propagation-prefix=complete.io/label") | ||||||
| } | } | ||||||
|  | 
 | ||||||
| func TestNamespaceOverride(t *testing.T) { | func TestNamespaceOverride(t *testing.T) { | ||||||
| 	t.Parallel() | 	t.Parallel() | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue