From a3cbbb9e4dfb0a7755cd3a0937fa06335a825c80 Mon Sep 17 00:00:00 2001 From: j Date: Thu, 10 Jul 2025 22:24:21 +1000 Subject: [PATCH] Consolidate to see if flux doesnt one shot --- deployments/mariadb/backups.yaml | 46 -------------------------- deployments/mariadb/kustomization.yaml | 1 - deployments/mariadb/mariadb.yaml | 21 +++++++++++- 3 files changed, 20 insertions(+), 48 deletions(-) delete mode 100644 deployments/mariadb/backups.yaml 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