{{- if .Values.persistence.enabled }} apiVersion: extensions/v1beta1 kind: PersistentVolumeClaim apiVersion: v1 metadata: name: {{ .Values.mysql.persistence.claim }} annotations: {{- if .Values.persistence.retain }} volume.beta.kubernetes.io/storage-class: "nfs-provisioner-retain" {{- else }} volume.beta.kubernetes.io/storage-class: "nfs-provisioner" {{- end }} spec: accessModes: - ReadWriteMany resources: requests: {{- if eq .Values.opal.type.kind "small" }} storage: {{ .Values.mysql.type.small.persistence.size }} {{- else if eq .Values.opal.type.kind "medium" }} storage: {{ .Values.mysql.type.medium.persistence.size }} {{- else }} storage: {{ .Values.mysql.type.large.persistence.size }} {{- end }} {{- end }}