more complex waves
parent
1b451f9318
commit
3a58cead36
|
|
@ -15,6 +15,8 @@ apiVersion: apps/v1
|
||||||
kind: StatefulSet
|
kind: StatefulSet
|
||||||
metadata:
|
metadata:
|
||||||
name: etcd
|
name: etcd
|
||||||
|
annotations:
|
||||||
|
argocd.argoproj.io/sync-wave: "1"
|
||||||
spec:
|
spec:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
selector:
|
selector:
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
apiVersion: batch/v1
|
apiVersion: batch/v1
|
||||||
kind: Job
|
kind: Job
|
||||||
metadata:
|
metadata:
|
||||||
generateName: wave-1-etcd-backup-
|
generateName: presync-wave-1-etcd-backup-
|
||||||
annotations:
|
annotations:
|
||||||
argocd.argoproj.io/hook: PreSync
|
argocd.argoproj.io/hook: PreSync
|
||||||
argocd.argoproj.io/sync-wave: "1"
|
argocd.argoproj.io/sync-wave: "1"
|
||||||
|
|
@ -30,35 +30,3 @@ spec:
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: etcd-backups
|
claimName: etcd-backups
|
||||||
|
|
||||||
---
|
|
||||||
apiVersion: batch/v1
|
|
||||||
kind: Job
|
|
||||||
metadata:
|
|
||||||
generateName: wave-2-migrate-
|
|
||||||
annotations:
|
|
||||||
argocd.argoproj.io/hook: PreSync
|
|
||||||
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
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,32 @@
|
||||||
|
---
|
||||||
|
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
|
||||||
|
|
||||||
Loading…
Reference in New Issue