zammad-docker-compose/kubernetes/56_statefulset_backup.yaml
2017-10-24 22:42:40 +02:00

38 lines
911 B
YAML

apiVersion: apps/v1beta1
kind: StatefulSet
metadata:
name: zammad-backup
namespace: zammad
labels:
component: backup
app: zammad
spec:
serviceName: zammad-backup
replicas: 1
template:
metadata:
labels:
component: backup
app: zammad
spec:
terminationGracePeriodSeconds: 10
volumes:
- name: zammad-home
persistentVolumeClaim:
claimName: zammad-home
- name: zammad-backup
persistentVolumeClaim:
claimName: zammad-backup
containers:
- name: zammad-backup
image: zammad/zammad-docker-compose:zammad-postgresql
command:
- /usr/local/bin/backup.sh
args:
- zammad-backup
imagePullPolicy: Always
volumeMounts:
- mountPath: /home/zammad
name: zammad-home
- mountPath: /var/tmp/zammad
name: zammad-backup