aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/sdnc/templates/pvc.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'kubernetes/sdnc/templates/pvc.yaml')
-rw-r--r--kubernetes/sdnc/templates/pvc.yaml20
1 files changed, 8 insertions, 12 deletions
diff --git a/kubernetes/sdnc/templates/pvc.yaml b/kubernetes/sdnc/templates/pvc.yaml
index aa9515b6b5..21c2dbc8cc 100644
--- a/kubernetes/sdnc/templates/pvc.yaml
+++ b/kubernetes/sdnc/templates/pvc.yaml
@@ -2,31 +2,27 @@
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
- name: {{ include "common.fullname" .}}-pvc-certs
+ name: {{ include "common.fullname" .}}-certs
namespace: {{ include "common.namespace" . }}
labels:
- app: {{ include "common.name" . }}-pvc-certs
+ app: {{ include "common.name" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
+ name: {{ include "common.fullname" . }}-certs
{{- if .Values.certpersistence.annotations }}
annotations:
{{ toYaml .Values.certpersistence.annotations | indent 4 }}
{{- end }}
spec:
- selector:
- matchLabels:
- app: {{ include "common.name" . }}-pv-certs
accessModes:
- {{ .Values.certpersistence.accessMode }}
resources:
requests:
storage: {{ .Values.certpersistence.size }}
-{{- if .Values.certpersistence.storageClass }}
-{{- if (eq "-" .Values.certpersistence.storageClass) }}
- storageClassName: ""
+{{- if eq "True" (include "common.needPV" .) }}
+ storageClassName: "{{ include "common.fullname" . }}-certs"
{{- else }}
- storageClassName: "{{ .Values.certpersistence.storageClass }}"
-{{- end }}
-{{- end }}
-{{- end -}} \ No newline at end of file
+ storageClassName: {{ include "common.storageClass" . }}
+ {{- end }}
+{{- end -}}