summaryrefslogtreecommitdiffstats
path: root/kubernetes/contrib/charts/netbox/charts/netbox-postgres/templates/pv.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'kubernetes/contrib/charts/netbox/charts/netbox-postgres/templates/pv.yaml')
-rwxr-xr-xkubernetes/contrib/charts/netbox/charts/netbox-postgres/templates/pv.yaml5
1 files changed, 3 insertions, 2 deletions
diff --git a/kubernetes/contrib/charts/netbox/charts/netbox-postgres/templates/pv.yaml b/kubernetes/contrib/charts/netbox/charts/netbox-postgres/templates/pv.yaml
index a19f5001e5..9b6ee1b59a 100755
--- a/kubernetes/contrib/charts/netbox/charts/netbox-postgres/templates/pv.yaml
+++ b/kubernetes/contrib/charts/netbox/charts/netbox-postgres/templates/pv.yaml
@@ -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 -}}