From da088e6eaf165aadee05c18db40a0bd7f8259323 Mon Sep 17 00:00:00 2001 From: Deniz Erdogan Date: Mon, 2 Sep 2024 12:54:19 +0200 Subject: [PATCH] add pvc --- k8s/jobs/backUpSingleWiki.yaml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/k8s/jobs/backUpSingleWiki.yaml b/k8s/jobs/backUpSingleWiki.yaml index 7fc1d6026..b4e0cd246 100644 --- a/k8s/jobs/backUpSingleWiki.yaml +++ b/k8s/jobs/backUpSingleWiki.yaml @@ -13,8 +13,8 @@ spec: spec: volumes: - name: temporary-backup-pvc - persistentVolumeClaim: - claimName: temporary-backup-pvc + persistentVolumeClaim: + claimName: temporary-backup-pvc containers: - name: back-up-single-wiki image: mariadb:10.5 @@ -23,9 +23,10 @@ spec: - 'bash' - '-c' - | - mysqldump ${DATABASE_NAME} > /some/path/to/a/pv/file.sql + mysqldump ${DATABASE_NAME} > /backup/file.sql volumeMounts: - - mountPath: "" + - name: temporary-backup-pvc + mountPath: "/backup/" restartPolicy: OnFailure @@ -36,6 +37,7 @@ apiVersion: v1 kind: PersistentVolumeClaim metadata: name: temporary-backup-pvc + namespace: adhoc-jobs spec: storageClassName: standard accessModes: