Commit 5c8753cf authored by Hugo "ThePooN" Denizart's avatar Hugo "ThePooN" Denizart
Browse files

fix: remove loops on worker commands

parent 7465858e
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -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:
+0 −23
Original line number Diff line number Diff line
@@ -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),
			}