PVC 'manually' added for mongodb

This commit is contained in:
plm 2024-11-29 16:35:05 +01:00
parent 98ef81fe2d
commit fd81d1b020
2 changed files with 18 additions and 0 deletions

View File

@ -32,6 +32,9 @@ mongodb:
persistence:
enabled: true
storageClass: kind-sc
existingClaim: mongo-pvc
accessModes:
- ReadWriteOnce
size: 100Mi
persistentVolumeClaimRetentionPolicy:
enabled: true

View File

@ -0,0 +1,15 @@
{{- if .Values.mongodb.enabled }}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ index .Values.mongodb.persistence.existingClaim }}
namespace: {{ .Release.Namespace }}
annotations:
helm.sh/resource-policy: keep
spec:
accessModes: {{ .Values.mongodb.persistence.accessModes }}
resources:
requests:
storage: {{ index .Values.mongodb.persistence.size }}
storageClassName: {{ index .Values.mongodb.persistence.storageClass }}
{{- end }}