budibase/charts/budibase/templates/couchdb-backup.yaml

50 lines
1.3 KiB
YAML

{{- if .Values.services.couchdb.backup.enabled }}
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app.kubernetes.io/name: couchdb-backup
name: couchdb-backup
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: couchdb-backup
strategy:
type: Recreate
template:
metadata:
labels:
app.kubernetes.io/name: couchdb-backup
spec:
containers:
- env:
- name: SOURCE
value: {{ .Values.services.couchdb.url }}
- name: TARGET
value: {{ .Values.services.couchdb.backup.target | quote }}
- name: RUN_EVERY_SECS
value: {{ .Values.services.couchdb.backup.interval | quote }}
- name: VERBOSE
value: "true"
image: redgeoff/replicate-couchdb-cluster
imagePullPolicy: Always
name: couchdb-backup
{{ with .Values.services.couchdb.backup.resources }}
resources:
{{- toYaml . | nindent 10 }}
{{ end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{ if .Values.schedulerName }}
schedulerName: {{ .Values.schedulerName | quote }}
{{ end }}
status: {}
{{- end }}