blob: 21c2dbc8cc1867168c48be43723be9f3033ffbad [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 }}"
10 release: "{{ .Release.Name }}"
11 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 -}}