blob: aed3d161d3da47ff3488642c87299fbbd19561db [file] [log] [blame]
Rahul Tyagi44cc1ac2019-03-02 06:15:35 +00001{{- if and .Values.certpersistence.enabled (not .Values.certpersistence.existingClaim) -}}
2kind: PersistentVolumeClaim
3apiVersion: v1
4metadata:
Sylvain Desbureaux25e01d52019-12-09 11:06:39 +01005 name: {{ include "common.fullname" .}}-certs
Rahul Tyagi44cc1ac2019-03-02 06:15:35 +00006 namespace: {{ include "common.namespace" . }}
7 labels:
Sylvain Desbureaux25e01d52019-12-09 11:06:39 +01008 app: {{ include "common.name" . }}
Rahul Tyagi44cc1ac2019-03-02 06:15:35 +00009 chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010010 release: "{{ include "common.release" . }}"
Rahul Tyagi44cc1ac2019-03-02 06:15:35 +000011 heritage: "{{ .Release.Service }}"
Sylvain Desbureaux25e01d52019-12-09 11:06:39 +010012 name: {{ include "common.fullname" . }}-certs
Rahul Tyagi44cc1ac2019-03-02 06:15:35 +000013{{- if .Values.certpersistence.annotations }}
14 annotations:
15{{ toYaml .Values.certpersistence.annotations | indent 4 }}
16{{- end }}
17spec:
Rahul Tyagi44cc1ac2019-03-02 06:15:35 +000018 accessModes:
19 - {{ .Values.certpersistence.accessMode }}
20 resources:
21 requests:
22 storage: {{ .Values.certpersistence.size }}
Sylvain Desbureaux25e01d52019-12-09 11:06:39 +010023{{- if eq "True" (include "common.needPV" .) }}
24 storageClassName: "{{ include "common.fullname" . }}-certs"
Rahul Tyagi44cc1ac2019-03-02 06:15:35 +000025{{- else }}
Sylvain Desbureaux25e01d52019-12-09 11:06:39 +010026 storageClassName: {{ include "common.storageClass" . }}
27 {{- end }}
28{{- end -}}