Skip to content

Commit

Permalink
added templates for backup and restore files
Browse files Browse the repository at this point in the history
  • Loading branch information
tarunsinghot committed Dec 10, 2024
1 parent f9b6ea5 commit 0328412
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 17 deletions.
10 changes: 0 additions & 10 deletions charts/psmdb-operator-db/backup.yaml

This file was deleted.

7 changes: 0 additions & 7 deletions charts/psmdb-operator-db/restore.yaml

This file was deleted.

12 changes: 12 additions & 0 deletions charts/psmdb-operator-db/templates/backup.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{{- if .Values.backup.enabled }}
apiVersion: psmdb.percona.com/v1
kind: PerconaServerMongoDBBackup
metadata:
finalizers:
- delete-backup
name: {{ .Values.backup.name }}
spec:
clusterName: {{ .Values.backup.clusterName }}
storageName: {{ .Values.backup.storageName }}
type: {{ .Values.backup.type }}
{{- end }}
9 changes: 9 additions & 0 deletions charts/psmdb-operator-db/templates/restore.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{{- if .Values.restore.enabled }}
apiVersion: psmdb.percona.com/v1
kind: PerconaServerMongoDBRestore
metadata:
name: {{ .Values.restore.name }}
spec:
clusterName: {{ .Values.restore.clusterName }}
backupName: {{ .Values.restore.backupName }}
{{- end }}
13 changes: 13 additions & 0 deletions charts/psmdb-operator-db/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -780,3 +780,16 @@ psmdb-db:
# PMM_SERVER_API_KEY: apikey
# # PMM_SERVER_USER: admin
# # PMM_SERVER_PASSWORD: admin

backup:
enabled: false
name: backup
clusterName: mdb-db-psmdb-db
storageName: azure-blob
type: logical

restore:
enabled: false
name: restore1
clusterName: mdb-db-psmdb-db
backupName: backup

0 comments on commit 0328412

Please sign in to comment.