Browse Source

fix: remove arg of deployment when no arg specified

Signed-off-by: KeisukeYamashita <19yamashita15@gmail.com>
KeisukeYamashita 5 years ago
parent
commit
1e60bedb6f
1 changed files with 2 additions and 0 deletions
  1. 2 0
      deploy/charts/external-secrets/templates/deployment.yaml

+ 2 - 0
deploy/charts/external-secrets/templates/deployment.yaml

@@ -38,6 +38,7 @@ spec:
           {{- end }}
           image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
           imagePullPolicy: {{ .Values.image.pullPolicy }}
+          {{- if or (.Values.leaderElect) (.Values.extraArgs) }}
           args:
           {{- if .Values.leaderElect }}
           - --enable-leader-election=true
@@ -49,6 +50,7 @@ spec:
           - --{{ $key }}
             {{- end }}
           {{- end }}
+          {{- end }}
           ports:
             - containerPort: {{ .Values.prometheus.service.port }}
               protocol: TCP