diff --git a/assets/auto-deploy-app/templates/worker-deployment.yaml b/assets/auto-deploy-app/templates/worker-deployment.yaml index 4f90068e123c983a7844d95886073b137546d6bf..ca556a86815bcd500b7d5f94c50abc7c1addd7e1 100644 --- a/assets/auto-deploy-app/templates/worker-deployment.yaml +++ b/assets/auto-deploy-app/templates/worker-deployment.yaml @@ -82,9 +82,7 @@ items: - name: {{ $.Chart.Name }}-{{ $workerName }} image: {{ template "imagename" $ }} command: - {{- range $workerConfig.command }} - - {{ toYaml . }} - {{- end }} +{{ toYaml $workerConfig.command | indent 10 }} imagePullPolicy: {{ $.Values.image.pullPolicy }} {{- if $.Values.application.secretName }} envFrom: @@ -149,9 +147,7 @@ items: preStop: exec: command: - {{- range $workerConfig.preStopCommand }} - - {{ toYaml . }} - {{- end }} +{{ toYaml $workerConfig.preStopCommand | indent 16 }} {{- end}} {{- end }} resources: diff --git a/assets/auto-deploy-app/test/templates/workerdeployment_test.go b/assets/auto-deploy-app/test/templates/workerdeployment_test.go index f0d091485172fb789932c201d48e41ef72a8f222..c90b605ae60791db9c0ae082b2532897795defd5 100644 --- a/assets/auto-deploy-app/test/templates/workerdeployment_test.go +++ b/assets/auto-deploy-app/test/templates/workerdeployment_test.go @@ -19,7 +19,6 @@ func TestWorkerDeploymentTemplate(t *testing.T) { CaseName string Release string Values map[string]string - StrValues map[string]string ExpectedErrorRegexp *regexp.Regexp @@ -51,27 +50,6 @@ func TestWorkerDeploymentTemplate(t *testing.T) { ExpectedStrategyType: appsV1.DeploymentStrategyType(""), }, }, - }, { - CaseName: "handle-numbers", - Release: "production", - StrValues: map[string]string{ - "workers.worker1.command[0]": "echo", - "workers.worker1.command[1]": "1", - "workers.worker2.command[0]": "echo", - "workers.worker2.command[1]": "2", - }, - ExpectedName: "production", - ExpectedRelease: "production", - ExpectedDeployments: []workerDeploymentTestCase{ - { - ExpectedName: "production-worker1", - ExpectedCmd: []string{"echo", "1"}, - }, - { - ExpectedName: "production-worker2", - ExpectedCmd: []string{"echo", "2"}, - }, - }, }, { // See https://github.com/helm/helm/issues/6006 CaseName: "long release name", @@ -222,7 +200,6 @@ func TestWorkerDeploymentTemplate(t *testing.T) { options := &helm.Options{ SetValues: values, - SetStrValues: tc.StrValues, KubectlOptions: k8s.NewKubectlOptions("", "", namespaceName), }