5f542e7632
We can host s3 compatible storage locally by deploying the stable/minio chart. Ran into https://github.com/coreos/etcd-operator/issues/1980 and therefore downgrade the backup and restore operator images to 0.8.3.
29 lines
954 B
YAML
29 lines
954 B
YAML
# cronjob that creates etcdbackups using the etcd backup serviceaccount
|
|
apiVersion: batch/v1beta1
|
|
kind: CronJob
|
|
metadata:
|
|
name: etcd-backup
|
|
spec:
|
|
suspend: {{ .Values.backupJob.suspend }}
|
|
schedule: {{ .Values.backupJob.schedule | quote }}
|
|
jobTemplate:
|
|
spec:
|
|
template:
|
|
spec:
|
|
serviceAccountName: {{ include "call-nested" (list . "etcd-operator" "etcd-operator.serviceAccountName") }}
|
|
containers:
|
|
- name: etcd-backup
|
|
image: lachlanevenson/k8s-kubectl
|
|
command:
|
|
- /bin/sh
|
|
- "-ec"
|
|
- |
|
|
sed -e "s|<NOW>|$(date '+%Y-%m-%d_%H:%M:%S')|g" /var/etcd_backup/backup_cr.yaml | kubectl create -f -
|
|
volumeMounts:
|
|
- name: backup-config
|
|
mountPath: /var/etcd_backup
|
|
restartPolicy: OnFailure
|
|
volumes:
|
|
- name: backup-config
|
|
configMap:
|
|
name: backup-config |