Improve backups

This commit is contained in:
Grant
2025-03-22 21:58:11 -06:00
parent bcaeafa455
commit b6edc128ad
6 changed files with 67 additions and 5 deletions

View File

@@ -1,3 +1,5 @@
# {{- if .Values.oneTimeBackup }}
apiVersion: k8up.io/v1
kind: Backup
metadata:
@@ -18,3 +20,4 @@ spec:
secretAccessKeySecretRef:
name: "{{ .Release.Name }}-credentials"
key: key
# {{- end }}

View File

@@ -0,0 +1,35 @@
# {{- if not .Values.oneTimeBackup }}
apiVersion: k8up.io/v1
kind: Schedule
metadata:
name: "{{ .Release.Name }}-schedule"
spec:
backend:
repoPasswordSecretRef:
name: "{{ .Release.Name }}-repopassword"
key: password
s3:
endpoint: "{{ .Values.endpoint }}"
bucket: "{{ .Values.bucket }}"
accessKeyIDSecretRef:
name: "{{ .Release.Name }}-credentials"
key: id
secretAccessKeySecretRef:
name: "{{ .Release.Name }}-credentials"
key: key
backup:
schedule: '@hourly-random'
failedJobsHistoryLimit: 2
successfulJobsHistoryLimit: 2
# optional
#promURL: https://prometheus-io-instance:8443
check:
schedule: '@daily-random'
# optional
#promURL: https://prometheus-io-instance:8443
prune:
schedule: '@weekly-ramdom'
retention:
keepLast: 5
keep Daily: 14
# {{- end }}

View File

@@ -5,3 +5,4 @@
# id:
# key:
oneTimeBackup: false