{{- if .Values.backup.enabled }}
---
apiVersion: postgresql.cnpg.io/v1
kind: ScheduledBackup
metadata:
  name: {{ .Release.Name }}
spec:
  schedule: {{ .Values.backup.schedule | quote }}
  backupOwnerReference: self
  cluster:
    name: {{ .Release.Name }}
{{- end }}
