diff --git a/deployments/mariadb/backups.yaml b/deployments/mariadb/backups.yaml deleted file mode 100644 index 48fd101..0000000 --- a/deployments/mariadb/backups.yaml +++ /dev/null @@ -1,46 +0,0 @@ ---- -apiVersion: v1 -kind: PersistentVolume -metadata: - name: mariadb-backup-pv -spec: - capacity: - storage: 10Gi - accessModes: - - ReadWriteOnce - storageClassName: manual - hostPath: - path: /dpool/backups/mariadb ---- -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: mariadb-backup-pvc - namespace: home-server -spec: - accessModes: - - ReadWriteOnce - storageClassName: manual - resources: - requests: - storage: 10Gi ---- -apiVersion: k8s.mariadb.com/v1alpha1 -kind: Backup -metadata: - name: backup-local - namespace: home-server -spec: - mariaDbRef: - name: nextcloud-db - schedule: - cron: "0 1 * * *" - maxRetention: 168h - volumeMounts: - - mountPath: /backups - name: backup-volume - volumes: - - name: backup-volume - hostPath: - path: /dpool/backups/mariadb - type: DirectoryOrCreate diff --git a/deployments/mariadb/kustomization.yaml b/deployments/mariadb/kustomization.yaml index 69fbba4..da9cfdb 100644 --- a/deployments/mariadb/kustomization.yaml +++ b/deployments/mariadb/kustomization.yaml @@ -4,4 +4,3 @@ kind: Kustomization resources: - mariadb.yaml - - backups.yaml diff --git a/deployments/mariadb/mariadb.yaml b/deployments/mariadb/mariadb.yaml index 04febe6..c43b691 100644 --- a/deployments/mariadb/mariadb.yaml +++ b/deployments/mariadb/mariadb.yaml @@ -57,4 +57,23 @@ spec: values: metrics: enabled: true - +--- +apiVersion: k8s.mariadb.com/v1alpha1 +kind: Backup +metadata: + name: backup-local + namespace: home-server +spec: + mariaDbRef: + name: nextcloud-db + schedule: + cron: "0 1 * * *" + maxRetention: 168h + volumeMounts: + - mountPath: /backups + name: backup-volume + volumes: + - name: backup-volume + hostPath: + path: /dpool/backups/mariadb + type: DirectoryOrCreate