33 lines
692 B
YAML
33 lines
692 B
YAML
---
|
|
apiVersion: batch/v1
|
|
kind: Job
|
|
metadata:
|
|
generateName: sync-wave-2-migrate-
|
|
annotations:
|
|
argocd.argoproj.io/hook: Sync
|
|
argocd.argoproj.io/sync-wave: "2"
|
|
spec:
|
|
backoffLimit: 3
|
|
template:
|
|
spec:
|
|
restartPolicy: Never
|
|
containers:
|
|
- name: migrate
|
|
image: {{ .Values.migrate.repo }}:{{ .Values.migrate.tag }}
|
|
volumeMounts:
|
|
- mountPath: /data
|
|
name: data
|
|
subPath: etcd
|
|
command:
|
|
- etcdctl
|
|
- --endpoints=http://etcd:2379
|
|
- snap
|
|
- save
|
|
- /data/snap-{{ now | unixEpoch }}
|
|
|
|
volumes:
|
|
- name: data
|
|
persistentVolumeClaim:
|
|
claimName: etcd-backups
|
|
|