fix backups
This commit is contained in:
		| @@ -3,3 +3,4 @@ kind: Kustomization | |||||||
| resources: | resources: | ||||||
|   - rclone-config.sealedsecret.yaml |   - rclone-config.sealedsecret.yaml | ||||||
|   - restic-password.sealedsecret.yaml |   - restic-password.sealedsecret.yaml | ||||||
|  |   - pvc.yaml | ||||||
							
								
								
									
										25
									
								
								infrastructure/backup/common/pvc.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								infrastructure/backup/common/pvc.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -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 | ||||||
| @@ -20,9 +20,9 @@ spec: | |||||||
|                 && |                 && | ||||||
|                 chmod 600 /root/.pgpass |                 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: |             env: | ||||||
|             - name: PGpostgress_passwordPASS |             - name: postgress_password | ||||||
|               valueFrom: |               valueFrom: | ||||||
|                 secretKeyRef: |                 secretKeyRef: | ||||||
|                   name: postgres-password |                   name: postgres-password | ||||||
|   | |||||||
| @@ -1,14 +1,14 @@ | |||||||
| apiVersion: argoproj.io/v1alpha1 | apiVersion: argoproj.io/v1alpha1 | ||||||
| kind: Application | kind: Application | ||||||
| metadata: | metadata: | ||||||
|   name: restic-secrets-application |   name: restic-commons-application | ||||||
|   namespace: argocd |   namespace: argocd | ||||||
| spec: | spec: | ||||||
|   project: infrastructure |   project: infrastructure | ||||||
|   source: |   source: | ||||||
|     repoURL: https://github.com/moll-re/k3s-infra.git |     repoURL: https://github.com/moll-re/k3s-infra.git | ||||||
|     targetRevision: main |     targetRevision: main | ||||||
|     path: infrastructure/backup/secrets |     path: infrastructure/backup/common | ||||||
|   destination: |   destination: | ||||||
|     server: https://kubernetes.default.svc |     server: https://kubernetes.default.svc | ||||||
|     namespace: backup |     namespace: backup | ||||||
| @@ -1,7 +1,7 @@ | |||||||
| apiVersion: kustomize.config.k8s.io/v1beta1 | apiVersion: kustomize.config.k8s.io/v1beta1 | ||||||
| kind: Kustomization | kind: Kustomization | ||||||
| resources: | resources: | ||||||
|   - secrets.application.yaml |   - common.application.yaml | ||||||
|   - backup.application.yaml |   - backup.application.yaml | ||||||
|   - prune.application.yaml |   - prune.application.yaml | ||||||
|   - postgres.backup.application.yaml |   - postgres.backup.application.yaml | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user