diff --git a/helm/diffcalc-api/templates/pvc.yaml b/helm/diffcalc-api/templates/pvc.yaml new file mode 100644 index 0000000..2190aa9 --- /dev/null +++ b/helm/diffcalc-api/templates/pvc.yaml @@ -0,0 +1,18 @@ +{{ if .Values.mongodb.persistence.createNew }} +kind: PersistentVolumeClaim +apiVersion: v1 +metadata: + name: {{ .Values.mongodb.persistence.existingClaim}} + annotations: + "helm.sh/hook": pre-install + "helm.sh/hook-weight": "-5" + "helm.sh/hook-delete-policy": before-hook-creation +spec: + {{- with .Values.mongodb.persistence.accessModes }} + accessModes: + {{- toYaml . | nindent 4 }} + {{- end }} + resources: + requests: + storage: {{ .Values.mongodb.persistence.size }} +{{ end }} diff --git a/helm/diffcalc-api/values.yaml b/helm/diffcalc-api/values.yaml index 45b8f4c..82aae9d 100644 --- a/helm/diffcalc-api/values.yaml +++ b/helm/diffcalc-api/values.yaml @@ -25,10 +25,12 @@ serviceAccount: podAnnotations: {} -podSecurityContext: {} +podSecurityContext: + {} # fsGroup: 2000 -securityContext: {} +securityContext: + {} # capabilities: # drop: # - ALL @@ -43,7 +45,8 @@ service: ingress: enabled: false className: "" - annotations: {} + annotations: + {} # kubernetes.io/ingress.class: nginx # kubernetes.io/tls-acme: "true" hosts: @@ -56,7 +59,8 @@ ingress: # hosts: # - chart-example.local -resources: {} +resources: + {} # We usually recommend not to specify default resources and to leave this as a conscious # choice for the user. This also increases chances charts run on environments with little # resources, such as Minikube. If you do want to specify resources, uncomment the following @@ -94,6 +98,9 @@ mongodb: cpu: 2 requests: cpu: 1 + persistence: + existingClaim: diffcalc-mongo-volume + createNew: false logging: level: "WARN"