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: |
Sylvain Desbureaux | 25e01d5 | 2019-12-09 11:06:39 +0100 | [diff] [blame] | 5 | name: {{ include "common.fullname" .}}-certs |
Rahul Tyagi | 44cc1ac | 2019-03-02 06:15:35 +0000 | [diff] [blame] | 6 | namespace: {{ include "common.namespace" . }} |
| 7 | labels: |
Sylvain Desbureaux | 25e01d5 | 2019-12-09 11:06:39 +0100 | [diff] [blame] | 8 | app: {{ include "common.name" . }} |
Rahul Tyagi | 44cc1ac | 2019-03-02 06:15:35 +0000 | [diff] [blame] | 9 | chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 10 | release: "{{ include "common.release" . }}" |
Rahul Tyagi | 44cc1ac | 2019-03-02 06:15:35 +0000 | [diff] [blame] | 11 | heritage: "{{ .Release.Service }}" |
Sylvain Desbureaux | 25e01d5 | 2019-12-09 11:06:39 +0100 | [diff] [blame] | 12 | name: {{ include "common.fullname" . }}-certs |
Rahul Tyagi | 44cc1ac | 2019-03-02 06:15:35 +0000 | [diff] [blame] | 13 | {{- if .Values.certpersistence.annotations }} |
| 14 | annotations: |
| 15 | {{ toYaml .Values.certpersistence.annotations | indent 4 }} |
| 16 | {{- end }} |
| 17 | spec: |
Rahul Tyagi | 44cc1ac | 2019-03-02 06:15:35 +0000 | [diff] [blame] | 18 | accessModes: |
| 19 | - {{ .Values.certpersistence.accessMode }} |
| 20 | resources: |
| 21 | requests: |
| 22 | storage: {{ .Values.certpersistence.size }} |
Sylvain Desbureaux | 25e01d5 | 2019-12-09 11:06:39 +0100 | [diff] [blame] | 23 | {{- if eq "True" (include "common.needPV" .) }} |
| 24 | storageClassName: "{{ include "common.fullname" . }}-certs" |
Rahul Tyagi | 44cc1ac | 2019-03-02 06:15:35 +0000 | [diff] [blame] | 25 | {{- else }} |
Sylvain Desbureaux | 25e01d5 | 2019-12-09 11:06:39 +0100 | [diff] [blame] | 26 | storageClassName: {{ include "common.storageClass" . }} |
| 27 | {{- end }} |
| 28 | {{- end -}} |