Loading assets/auto-deploy-app/templates/worker-deployment.yaml +2 −2 Original line number Diff line number Diff line Loading @@ -83,7 +83,7 @@ items: image: {{ template "imagename" $ }} command: {{- range $workerConfig.command }} - {{ . }} - {{ toYaml . }} {{- end }} imagePullPolicy: {{ $.Values.image.pullPolicy }} {{- if $.Values.application.secretName }} Loading Loading @@ -150,7 +150,7 @@ items: exec: command: {{- range $workerConfig.preStopCommand }} - {{ . }} - {{ toYaml . }} {{- end }} {{- end}} {{- end }} Loading assets/auto-deploy-app/test/templates/workerdeployment_test.go +23 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ func TestWorkerDeploymentTemplate(t *testing.T) { CaseName string Release string Values map[string]string StrValues map[string]string ExpectedErrorRegexp *regexp.Regexp Loading Loading @@ -50,6 +51,27 @@ 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", Loading Loading @@ -200,6 +222,7 @@ func TestWorkerDeploymentTemplate(t *testing.T) { options := &helm.Options{ SetValues: values, SetStrValues: tc.StrValues, KubectlOptions: k8s.NewKubectlOptions("", "", namespaceName), } Loading Loading
assets/auto-deploy-app/templates/worker-deployment.yaml +2 −2 Original line number Diff line number Diff line Loading @@ -83,7 +83,7 @@ items: image: {{ template "imagename" $ }} command: {{- range $workerConfig.command }} - {{ . }} - {{ toYaml . }} {{- end }} imagePullPolicy: {{ $.Values.image.pullPolicy }} {{- if $.Values.application.secretName }} Loading Loading @@ -150,7 +150,7 @@ items: exec: command: {{- range $workerConfig.preStopCommand }} - {{ . }} - {{ toYaml . }} {{- end }} {{- end}} {{- end }} Loading
assets/auto-deploy-app/test/templates/workerdeployment_test.go +23 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ func TestWorkerDeploymentTemplate(t *testing.T) { CaseName string Release string Values map[string]string StrValues map[string]string ExpectedErrorRegexp *regexp.Regexp Loading Loading @@ -50,6 +51,27 @@ 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", Loading Loading @@ -200,6 +222,7 @@ func TestWorkerDeploymentTemplate(t *testing.T) { options := &helm.Options{ SetValues: values, SetStrValues: tc.StrValues, KubectlOptions: k8s.NewKubectlOptions("", "", namespaceName), } Loading