{{- if and .Values.nginx.persistence.enabled (.Values.nginx.enabled) (eq (int .Values.nginx.replicaCount) 1) }} {{- if (not .Values.nginx.persistence.existingClaim) }} kind: PersistentVolumeClaim apiVersion: v1 metadata: name: {{ template "artifactory-ha.nginx.fullname" . }} labels: app: {{ template "artifactory-ha.name" . }} chart: {{ template "artifactory-ha.chart" . }} release: {{ .Release.Name }} heritage: {{ .Release.Service }} spec: accessModes: - {{ .Values.nginx.persistence.accessMode | quote }} resources: requests: storage: {{ .Values.nginx.persistence.size | quote }} {{- if .Values.nginx.persistence.storageClassName }} {{- if (eq "-" .Values.nginx.persistence.storageClassName) }} storageClassName: "" {{- else }} storageClassName: "{{ .Values.nginx.persistence.storageClassName }}" {{- end }} {{- end }} {{- end }} {{- end }}