-
-
Notifications
You must be signed in to change notification settings - Fork 64
/
Copy pathcronjob.yaml
49 lines (49 loc) · 1.36 KB
/
cronjob.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: medusa
spec:
schedule: "* * * * *"
concurrencyPolicy: Forbid
startingDeadlineSeconds: 600
jobTemplate:
spec:
template:
spec:
securityContext:
runAsUser: 1000
containers:
- name: medusa
image: ghcr.io/jonasvinther/medusa:latest
imagePullPolicy: IfNotPresent
command: ["./medusa", "export", "$(VAULT_PATH)", "-o", "/backup/backup.vault"]
env:
- name: VAULT_SKIP_VERIFY
valueFrom:
configMapKeyRef:
name: vault
key: vault_skip_verify
- name: VAULT_ADDR
valueFrom:
configMapKeyRef:
name: vault
key: vault-url
- name: VAULT_PATH
valueFrom:
configMapKeyRef:
name: vault
key: vault-path
- name: VAULT_TOKEN
valueFrom:
secretKeyRef:
name: vault
key: token
volumeMounts:
- name: backup
mountPath: /backup
restartPolicy: OnFailure
volumes:
- name: backup
hostPath:
path: /backup
type: DirectoryOrCreate