blob: ebf4ba1c06f136d4414dba8370af5f5e76a5ffc5 [file] [log] [blame]
{{- if and .Values.backup.enabled .Values.backup.persistence.enabled }}
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: {{ include "influxdb.fullname" . }}-backup
labels:
{{- include "influxdb.labels" . | nindent 4 }}
spec:
accessModes:
- {{ .Values.backup.persistence.accessMode | quote }}
resources:
requests:
storage: {{ .Values.backup.persistence.size | quote }}
{{- if .Values.backup.persistence.storageClass }}
{{- if (eq "-" .Values.backup.persistence.storageClass) }}
storageClassName: ""
{{- else }}
storageClassName: "{{ .Values.backup.persistence.storageClass }}"
{{- end }}
{{- end }}
{{- end }}