Skip to content

Commit

Permalink
add pvc
Browse files Browse the repository at this point in the history
  • Loading branch information
deer-wmde committed Sep 2, 2024
1 parent f280a25 commit da088e6
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions k8s/jobs/backUpSingleWiki.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand All @@ -36,6 +37,7 @@ apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: temporary-backup-pvc
namespace: adhoc-jobs
spec:
storageClassName: standard
accessModes:
Expand Down

0 comments on commit da088e6

Please sign in to comment.