From 96c8cfe9644e5f5234e15f78c50793338dff00a9 Mon Sep 17 00:00:00 2001 From: haoshuwei Date: Tue, 24 Dec 2019 20:57:33 +0800 Subject: [PATCH] add alibabacloud provider env Signed-off-by: haoshuwei --- charts/velero/Chart.yaml | 2 +- charts/velero/templates/deployment.yaml | 6 ++++-- charts/velero/templates/restic-daemonset.yaml | 11 +++++++---- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/charts/velero/Chart.yaml b/charts/velero/Chart.yaml index cb86bb1b..9fc04dea 100644 --- a/charts/velero/Chart.yaml +++ b/charts/velero/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 appVersion: 1.2.0 description: A Helm chart for velero name: velero -version: 2.7.5 +version: 2.7.6 home: https://github.com/vmware-tanzu/velero icon: https://cdn-images-1.medium.com/max/1600/1*-9mb3AKnKdcL_QD3CMnthQ.png sources: diff --git a/charts/velero/templates/deployment.yaml b/charts/velero/templates/deployment.yaml index 88e54e60..1b0f0325 100644 --- a/charts/velero/templates/deployment.yaml +++ b/charts/velero/templates/deployment.yaml @@ -100,13 +100,15 @@ spec: fieldRef: apiVersion: v1 fieldPath: metadata.namespace - {{- if and .Values.credentials.useSecret (or (eq $provider "aws") (or (eq $provider "gcp") (eq $provider "azure"))) }} + {{- if and .Values.credentials.useSecret (or (eq $provider "aws") (or (eq $provider "gcp") (eq $provider "azure")) (eq $provider "alibabacloud")) }} {{- if eq $provider "aws" }} - name: AWS_SHARED_CREDENTIALS_FILE {{- else if eq $provider "gcp"}} - name: GOOGLE_APPLICATION_CREDENTIALS - {{- else }} + {{- else if eq $provider "azure" }} - name: AZURE_CREDENTIALS_FILE + {{- else }} + - name: ALIBABA_CLOUD_CREDENTIALS_FILE {{- end }} value: /credentials/cloud {{- end }} diff --git a/charts/velero/templates/restic-daemonset.yaml b/charts/velero/templates/restic-daemonset.yaml index 4ba41e57..6179021c 100644 --- a/charts/velero/templates/restic-daemonset.yaml +++ b/charts/velero/templates/restic-daemonset.yaml @@ -35,7 +35,7 @@ spec: priorityClassName: {{ include "velero.restic.priorityClassName" . }} {{- end }} volumes: - {{- if and .Values.credentials.useSecret (or (eq $provider "aws") (eq $provider "gcp")) }} + {{- if and .Values.credentials.useSecret (or (eq $provider "aws") (eq $provider "gcp") (eq $provider "alibabacloud")) }} - name: cloud-credentials secret: secretName: {{ include "velero.secretName" . }} @@ -58,7 +58,7 @@ spec: - restic - server volumeMounts: - {{- if and .Values.credentials.useSecret (or (eq $provider "aws") (eq $provider "gcp")) }} + {{- if and .Values.credentials.useSecret (or (eq $provider "aws") (eq $provider "gcp") (eq $provider "alibabacloud")) }} - name: cloud-credentials mountPath: /credentials {{- end }} @@ -86,13 +86,16 @@ spec: fieldPath: spec.nodeName - name: VELERO_SCRATCH_DIR value: /scratch - {{- if and .Values.credentials.useSecret (or (eq $provider "aws") (eq $provider "gcp")) }} + {{- if and .Values.credentials.useSecret (or (eq $provider "aws") (eq $provider "gcp") (eq $provider "alibabacloud")) }} {{- if eq $provider "aws" }} - name: AWS_SHARED_CREDENTIALS_FILE value: /credentials/cloud - {{- else }} + {{- else if eq $provider "gcp" }} - name: GOOGLE_APPLICATION_CREDENTIALS value: /credentials/cloud + {{- else }} + - name: ALIBABA_CLOUD_CREDENTIALS_FILE + value: /credentials/cloud {{- end }} {{- end }} {{- if eq $provider "minio" }}