Skip to content

Commit

Permalink
fix primary
Browse files Browse the repository at this point in the history
  • Loading branch information
deer-wmde committed Sep 2, 2024
1 parent a2665f9 commit 1f5e975
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions k8s/jobs/singleWikiBackup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ fi

# This creates the PVC (if it doesn't exist) for backups to be saved to
# It will not be automatically deleted so you may need to clean this up when you are done
kubectl apply -f backUpSingleWikiPvc.yaml
kubectl apply -f singleWikiBackupPvc.yaml

kubectl create -f backUpSingleWiki.yaml -o=json --dry-run=client |\
kubectl create -f singleWikiBackup.yaml -o=json --dry-run=client |\
jq ".spec.template.spec.containers[0].env += [{\"name\": \"DATABASE_NAME\", \"value\": \"${DATABASE_NAME}\"}]" |\
kubectl create -f -
2 changes: 1 addition & 1 deletion k8s/jobs/singleWikiRestore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ if [[ -z "$DATABASE_NAME" ]]; then
exit 1
fi

kubectl create -f restoreSingleWiki.yaml -o=json --dry-run=client |\
kubectl create -f singleWikiRestore.yaml -o=json --dry-run=client |\
jq ".spec.template.spec.containers[0].env += [{\"name\": \"DATABASE_NAME\", \"value\": \"${DATABASE_NAME}\"}]" |\
kubectl create -f -
2 changes: 1 addition & 1 deletion k8s/jobs/singleWikiRestore.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ spec:
- 'bash'
- '-c'
- |
mysql --host sql-mariadb-secondary.default.svc.cluster.local ${DATABASE_NAME} < /backup/${DATABASE_NAME}.sql
mysql --host sql-mariadb-primary.default.svc.cluster.local ${DATABASE_NAME} < /backup/${DATABASE_NAME}.sql
volumeMounts:
- name: temporary-backup-pvc
mountPath: "/backup/"
Expand Down

0 comments on commit 1f5e975

Please sign in to comment.