diff --git a/stable/velero/Chart.yaml b/stable/velero/Chart.yaml index 4c5ad7bb14..e929045abc 100644 --- a/stable/velero/Chart.yaml +++ b/stable/velero/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 appVersion: 1.0.0 description: A Helm chart for velero name: velero -version: 2.0.2 +version: 2.0.3 home: https://github.com/heptio/velero icon: https://cdn-images-1.medium.com/max/1600/1*-9mb3AKnKdcL_QD3CMnthQ.png sources: diff --git a/stable/velero/templates/deployment.yaml b/stable/velero/templates/deployment.yaml index d94f955e85..a061703b53 100644 --- a/stable/velero/templates/deployment.yaml +++ b/stable/velero/templates/deployment.yaml @@ -78,22 +78,26 @@ spec: mountPath: /credentials - name: scratch mountPath: /scratch + {{- end }} + {{- if (or (and .Values.credentials.useSecret (or (eq $provider "aws") (eq $provider "gcp"))) .Values.configuration.extraEnvVars) }} env: - {{- if eq $provider "aws" }} - - name: AWS_SHARED_CREDENTIALS_FILE - {{- else }} - - name: GOOGLE_APPLICATION_CREDENTIALS {{- end }} + {{- if and .Values.credentials.useSecret (or (eq $provider "aws") (eq $provider "gcp")) }} + {{- if eq $provider "aws" }} + - name: AWS_SHARED_CREDENTIALS_FILE + {{- else }} + - name: GOOGLE_APPLICATION_CREDENTIALS + {{- end }} value: /credentials/cloud - name: VELERO_SCRATCH_DIR value: /scratch - {{ with .Values.configuration.extraEnvVars }} + {{- end }} + {{- with .Values.configuration.extraEnvVars }} {{- range $key, $value := . }} - name: {{ default "none" $key }} value: {{ default "none" $value }} {{- end }} {{- end }} - {{- end }} {{- if .Values.initContainers }} initContainers: {{- toYaml .Values.initContainers | nindent 8 }}