From b1ba7434ea7e1bd55145b42569ed21e12be59b8e Mon Sep 17 00:00:00 2001 From: Vaibhav Paralikar Date: Fri, 6 Sep 2019 15:04:57 +0530 Subject: [PATCH] Fixing restic env issue #15998 (#16004) * Fixing restic env issue #15998 Signed-off-by: Vaibhav Paralikar * Bumpped chart version Signed-off-by: Vaibhav Paralikar * Update to gate AWS env variable initialisation Signed-off-by: Vaibhav Paralikar --- stable/velero/Chart.yaml | 2 +- stable/velero/templates/restic-daemonset.yaml | 15 ++++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/stable/velero/Chart.yaml b/stable/velero/Chart.yaml index 0b7a8e7aac..fb7449bf75 100644 --- a/stable/velero/Chart.yaml +++ b/stable/velero/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 appVersion: 1.1.0 description: A Helm chart for velero name: velero -version: 2.1.4 +version: 2.1.5 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/restic-daemonset.yaml b/stable/velero/templates/restic-daemonset.yaml index c7266e86d8..9c2a1b3b77 100644 --- a/stable/velero/templates/restic-daemonset.yaml +++ b/stable/velero/templates/restic-daemonset.yaml @@ -77,13 +77,14 @@ spec: fieldPath: spec.nodeName - name: VELERO_SCRATCH_DIR value: /scratch - {{- if eq $provider "aws" }} - - name: AWS_SHARED_CREDENTIALS_FILE - value: /credentials/cloud - {{- end }} - {{- if eq $provider "gcp" }} - - name: GOOGLE_APPLICATION_CREDENTIALS - value: /credentials/cloud + {{- if and .Values.credentials.useSecret (or (eq $provider "aws") (eq $provider "gcp")) }} + {{- if eq $provider "aws" }} + - name: AWS_SHARED_CREDENTIALS_FILE + value: /credentials/cloud + {{- else }} + - name: GOOGLE_APPLICATION_CREDENTIALS + value: /credentials/cloud + {{- end }} {{- end }} {{- if eq $provider "minio" }} - name: AWS_SHARED_CREDENTIALS_FILE