charts/velero-5.1.3/templates/backupstoragelocation.yaml
2024-02-09 21:56:31 +08:00

51 lines
1.3 KiB
YAML

{{- if .Values.backupsEnabled }}
{{- if typeIs "[]interface {}" .Values.configuration.backupStorageLocation }}
{{- range .Values.configuration.backupStorageLocation }}
---
apiVersion: velero.io/v1
kind: BackupStorageLocation
metadata:
name: {{ .name | default "default" }}
namespace: {{ $.Release.Namespace }}
labels:
app.kubernetes.io/name: {{ include "velero.name" $ }}
app.kubernetes.io/instance: {{ $.Release.Name }}
app.kubernetes.io/managed-by: {{ $.Release.Service }}
helm.sh/chart: {{ include "velero.chart" $ }}
spec:
{{- if not (empty .credential) }}
credential:
{{- with .credential.name }}
name: {{ . }}
{{- end }}
{{- with .credential.key }}
key: {{ . }}
{{- end }}
{{- end }}
provider: {{ .provider }}
accessMode: {{ .accessMode | default "ReadWrite" }}
{{- with .default }}
default: {{ . }}
{{- end }}
{{- with .validationFrequency }}
validationFrequency: {{ . }}
{{- end }}
objectStorage:
bucket: {{ .bucket | quote }}
{{- with .prefix }}
prefix: {{ . | quote }}
{{- end }}
{{- with .caCert }}
caCert: {{ . }}
{{- end }}
{{- with .config }}
config:
{{- range $key, $value := . }}
{{- $key | nindent 4 }}: {{ $value | quote }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}