forked from apecloud/kubeblocks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
backuprepo.yaml
34 lines (34 loc) · 1.07 KB
/
backuprepo.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{{- $spName := .Values.backupRepo.storageProvider }}
{{ if and $spName .Values.backupRepo.create }}
---
apiVersion: v1
kind: Secret
metadata:
name: {{ include "kubeblocks.fullname" . }}-backuprepo-secret
namespace: {{ .Release.Namespace }}
labels:
{{- include "kubeblocks.labels" . | nindent 4 }}
stringData:
{{- .Values.backupRepo.secrets | toYaml | nindent 2 }}
---
apiVersion: dataprotection.kubeblocks.io/v1alpha1
kind: BackupRepo
metadata:
name: {{ include "kubeblocks.fullname" . }}-backuprepo
labels:
{{- include "kubeblocks.labels" . | nindent 4 }}
{{- if .Values.backupRepo.default }}
annotations:
dataprotection.kubeblocks.io/is-default-repo: "true"
{{- end }}
spec:
storageProviderRef: {{ $spName }}
pvReclaimPolicy: {{ .Values.backupRepo.pvReclaimPolicy | default "Retain" }}
volumeCapacity: {{ .Values.backupRepo.volumeCapacity | default "100Gi" }}
config:
{{- .Values.backupRepo.config | toYaml | nindent 4 }}
credential:
name: {{ include "kubeblocks.fullname" . }}-backuprepo-secret
namespace: {{ .Release.Namespace }}
---
{{ end }}