Merge "Revert "basic auth for so-monitoring""
[oom.git] / kubernetes / contrib / charts / netbox / charts / netbox-postgres / templates / pv.yaml
index a19f500..9b6ee1b 100755 (executable)
@@ -15,7 +15,7 @@
 */}}
 
 {{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}}
-{{- if not .Values.persistence.storageClass -}}
+{{- if eq "True" (include "common.needPV" .) -}}
 kind: PersistentVolume
 apiVersion: v1
 metadata:
@@ -33,7 +33,8 @@ spec:
   accessModes:
     - {{ .Values.persistence.accessMode }}
   persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }}
+  storageClassName: "{{ include "common.fullname" . }}-data"
   hostPath:
     path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }}
 {{- end -}}
-{{- end -}}
\ No newline at end of file
+{{- end -}}