Skip to content

Commit

Permalink
add alibabacloud provider env
Browse files Browse the repository at this point in the history
Signed-off-by: haoshuwei <[email protected]>
  • Loading branch information
haoshuwei committed Dec 24, 2019
1 parent 07a9eae commit 96c8cfe
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion charts/velero/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 4 additions & 2 deletions charts/velero/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
11 changes: 7 additions & 4 deletions charts/velero/templates/restic-daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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" . }}
Expand All @@ -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 }}
Expand Down Expand Up @@ -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" }}
Expand Down

0 comments on commit 96c8cfe

Please sign in to comment.