diff --git a/infrastructure/backup/secrets/kustomization.yaml b/infrastructure/backup/common/kustomization.yaml similarity index 92% rename from infrastructure/backup/secrets/kustomization.yaml rename to infrastructure/backup/common/kustomization.yaml index 12529e1..74e6078 100644 --- a/infrastructure/backup/secrets/kustomization.yaml +++ b/infrastructure/backup/common/kustomization.yaml @@ -3,3 +3,4 @@ kind: Kustomization resources: - rclone-config.sealedsecret.yaml - restic-password.sealedsecret.yaml + - pvc.yaml \ No newline at end of file diff --git a/infrastructure/backup/common/pvc.yaml b/infrastructure/backup/common/pvc.yaml new file mode 100644 index 0000000..5c5db5a --- /dev/null +++ b/infrastructure/backup/common/pvc.yaml @@ -0,0 +1,25 @@ +apiVersion: v1 +kind: PersistentVolume +metadata: + name: backup-nfs-access +spec: + capacity: + storage: "1Mi" + accessModes: + - ReadOnlyOnce + nfs: + path: /kluster/ + server: 192.168.1.157 +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: backup-nfs-access +spec: + storageClassName: "" + accessModes: + - ReadOnlyOnce + resources: + requests: + storage: "1Mi" + volumeName: backup-nfs-access diff --git a/infrastructure/backup/secrets/rclone-config.sealedsecret.yaml b/infrastructure/backup/common/rclone-config.sealedsecret.yaml similarity index 100% rename from infrastructure/backup/secrets/rclone-config.sealedsecret.yaml rename to infrastructure/backup/common/rclone-config.sealedsecret.yaml diff --git a/infrastructure/backup/secrets/restic-password.sealedsecret.yaml b/infrastructure/backup/common/restic-password.sealedsecret.yaml similarity index 100% rename from infrastructure/backup/secrets/restic-password.sealedsecret.yaml rename to infrastructure/backup/common/restic-password.sealedsecret.yaml diff --git a/infrastructure/backup/postgres/cronjob.yaml b/infrastructure/backup/postgres/cronjob.yaml index 6e33892..9a9530b 100644 --- a/infrastructure/backup/postgres/cronjob.yaml +++ b/infrastructure/backup/postgres/cronjob.yaml @@ -20,9 +20,9 @@ spec: && chmod 600 /root/.pgpass && - pg_dumpall -U postgres -h postgrespostgres-postgresql.postgres > /backup/backup-$(date +"%m-%d-%Y-%H-%M").sql + pg_dumpall -U postgres -h postgres-postgresql.postgres > /backup/backup-$(date +"%m-%d-%Y-%H-%M").sql env: - - name: PGpostgress_passwordPASS + - name: postgress_password valueFrom: secretKeyRef: name: postgres-password diff --git a/kluster-deployments/backup/secrets.application.yaml b/kluster-deployments/backup/common.application.yaml similarity index 82% rename from kluster-deployments/backup/secrets.application.yaml rename to kluster-deployments/backup/common.application.yaml index 7f2633e..8f5395c 100644 --- a/kluster-deployments/backup/secrets.application.yaml +++ b/kluster-deployments/backup/common.application.yaml @@ -1,14 +1,14 @@ apiVersion: argoproj.io/v1alpha1 kind: Application metadata: - name: restic-secrets-application + name: restic-commons-application namespace: argocd spec: project: infrastructure source: repoURL: https://github.com/moll-re/k3s-infra.git targetRevision: main - path: infrastructure/backup/secrets + path: infrastructure/backup/common destination: server: https://kubernetes.default.svc namespace: backup diff --git a/kluster-deployments/backup/kustomization.yaml b/kluster-deployments/backup/kustomization.yaml index b1878ac..ee77eda 100644 --- a/kluster-deployments/backup/kustomization.yaml +++ b/kluster-deployments/backup/kustomization.yaml @@ -1,7 +1,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - - secrets.application.yaml + - common.application.yaml - backup.application.yaml - prune.application.yaml - postgres.backup.application.yaml