Rahul Tyagi | 44cc1ac | 2019-03-02 06:15:35 +0000 | [diff] [blame] | 1 | {{- if and .Values.certpersistence.enabled (not .Values.certpersistence.existingClaim) -}} |
| 2 | kind: PersistentVolumeClaim |
| 3 | apiVersion: v1 |
| 4 | metadata: |
| 5 | name: {{ include "common.fullname" .}}-pvc-certs |
| 6 | namespace: {{ include "common.namespace" . }} |
| 7 | labels: |
| 8 | app: {{ include "common.name" . }}-pvc-certs |
| 9 | chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" |
| 10 | release: "{{ .Release.Name }}" |
| 11 | heritage: "{{ .Release.Service }}" |
| 12 | {{- if .Values.certpersistence.annotations }} |
| 13 | annotations: |
| 14 | {{ toYaml .Values.certpersistence.annotations | indent 4 }} |
| 15 | {{- end }} |
| 16 | spec: |
| 17 | selector: |
| 18 | matchLabels: |
| 19 | app: {{ include "common.name" . }}-pv-certs |
| 20 | accessModes: |
| 21 | - {{ .Values.certpersistence.accessMode }} |
| 22 | resources: |
| 23 | requests: |
| 24 | storage: {{ .Values.certpersistence.size }} |
| 25 | {{- if .Values.certpersistence.storageClass }} |
| 26 | {{- if (eq "-" .Values.certpersistence.storageClass) }} |
| 27 | storageClassName: "" |
| 28 | {{- else }} |
| 29 | storageClassName: "{{ .Values.certpersistence.storageClass }}" |
| 30 | {{- end }} |
| 31 | {{- end }} |
| 32 | {{- end -}} |