Skip to content

Commit

Permalink
restore
Browse files Browse the repository at this point in the history
  • Loading branch information
james-otten committed Aug 8, 2024
1 parent d292d10 commit c34207d
Showing 1 changed file with 52 additions and 54 deletions.
106 changes: 52 additions & 54 deletions bookstack-helm/templates/restore.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,58 +4,56 @@ metadata:
name: restorejob
namespace: {{ .Values.meshwiki_app_namespace }}
spec:
jobTemplate:
template:
spec:
template:
spec:
containers:
- name: restorejob
image: "{{ .Values.db_image.repository }}:{{ .Values.db_image.tag }}"
imagePullPolicy: {{ .Values.db_image.pullPolicy }}
command:
- /bin/bash
- /restore.sh
volumeMounts:
- name: backup-script
mountPath: /restore.sh
subPath: restore.sh
readOnly: true
env:
- name: DB_HOST
valueFrom:
configMapKeyRef:
name: wikiconfig
key: DB_HOST
- name: DB_USER
valueFrom:
secretKeyRef:
name: wiki-secrets
key: db-username
- name: DB_PASS
valueFrom:
secretKeyRef:
name: wiki-secrets
key: db-password
- name: RESTORE_S3_URL
valueFrom:
secretKeyRef:
name: wiki-secrets
key: restore-s3-url
- name: AWS_ACCESS_KEY_ID
valueFrom:
secretKeyRef:
name: wiki-secrets
key: access-key-id
- name: AWS_SECRET_ACCESS_KEY
valueFrom:
secretKeyRef:
name: wiki-secrets
key: secret-access-key
restartPolicy: OnFailure
volumes:
- name: backup-script
configMap:
name: backup-script
items:
- key: restore.sh
path: restore.sh
containers:
- name: restorejob
image: "{{ .Values.db_image.repository }}:{{ .Values.db_image.tag }}"
imagePullPolicy: {{ .Values.db_image.pullPolicy }}
command:
- /bin/bash
- /restore.sh
volumeMounts:
- name: backup-script
mountPath: /restore.sh
subPath: restore.sh
readOnly: true
env:
- name: DB_HOST
valueFrom:
configMapKeyRef:
name: wikiconfig
key: DB_HOST
- name: DB_USER
valueFrom:
secretKeyRef:
name: wiki-secrets
key: db-username
- name: DB_PASS
valueFrom:
secretKeyRef:
name: wiki-secrets
key: db-password
- name: RESTORE_S3_URL
valueFrom:
secretKeyRef:
name: wiki-secrets
key: restore-s3-url
- name: AWS_ACCESS_KEY_ID
valueFrom:
secretKeyRef:
name: wiki-secrets
key: access-key-id
- name: AWS_SECRET_ACCESS_KEY
valueFrom:
secretKeyRef:
name: wiki-secrets
key: secret-access-key
restartPolicy: OnFailure
volumes:
- name: backup-script
configMap:
name: backup-script
items:
- key: restore.sh
path: restore.sh

0 comments on commit c34207d

Please sign in to comment.