diff --git a/charts/app-mendix/Chart.yaml b/charts/app-mendix/Chart.yaml index 1afd20e..2317a3c 100644 --- a/charts/app-mendix/Chart.yaml +++ b/charts/app-mendix/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: app-mendix -version: 3.0.0 +version: 3.0.1 description: Mendix Application Chart. icon: https://cinaq.github.io/helm-charts/icons/mendix-logo.png maintainers: diff --git a/charts/app-mendix/templates/pv.yaml b/charts/app-mendix/templates/pv.yaml new file mode 100644 index 0000000..c919941 --- /dev/null +++ b/charts/app-mendix/templates/pv.yaml @@ -0,0 +1,17 @@ +{{ if .Values.nfsVolume.enabled }} +--- +apiVersion: v1 +kind: PersistentVolume +metadata: + name: {{ template "app-mendix.fullname" . }} + labels: + {{- include "app-mendix.labels" . | nindent 4 }} +spec: + capacity: + storage: {{ .Values.nfsVolume.storage }} + accessModes: + - ReadWriteMany + nfs: + server: {{ .Values.nfsVolume.server }} + path: {{ .Values.nfsVolume.path }} +{{ end }} \ No newline at end of file diff --git a/charts/app-mendix/templates/pvc.yaml b/charts/app-mendix/templates/pvc.yaml new file mode 100644 index 0000000..989805c --- /dev/null +++ b/charts/app-mendix/templates/pvc.yaml @@ -0,0 +1,16 @@ +{{ if .Values.nfsVolume.enabled }} +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: {{ template "app-mendix.fullname" . }} + labels: + {{- include "app-mendix.labels" . | nindent 4 }} +spec: + accessModes: + - ReadWriteMany + resources: + requests: + storage: {{ .Values.nfsVolume.storage }} + storageClassName: "" +{{ end }} \ No newline at end of file diff --git a/charts/app-mendix/templates/statefulset.yaml b/charts/app-mendix/templates/statefulset.yaml index ff9fd56..7e61ca4 100644 --- a/charts/app-mendix/templates/statefulset.yaml +++ b/charts/app-mendix/templates/statefulset.yaml @@ -114,6 +114,17 @@ spec: {{- end }} resources: {{- toYaml .Values.resources | nindent 12 }} + {{- if .Values.nfsVolume.enabled }} + volumeMounts: + - name: {{ .Values.nfsVolume.name }} + mountPath: /opt/mendix/build/data/files/ + {{- end }} + {{- if .Values.nfsVolume.enabled }} + volumes: + - name: {{ .Values.nfsVolume.name }} + persistentVolumeClaim: + claimName: {{ template "app-mendix.fullname" . }} + {{- end }} {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} diff --git a/charts/app-mendix/values.yaml b/charts/app-mendix/values.yaml index f919c9e..e9cf61b 100644 --- a/charts/app-mendix/values.yaml +++ b/charts/app-mendix/values.yaml @@ -136,4 +136,11 @@ metrics: enabled: true runtimeLoginMetricsEnabled: true # example: http://loki-stack:3100/loki/api/v1/push - trendsForwarderUrl: "" \ No newline at end of file + trendsForwarderUrl: "" + +nfsVolume: + enabled: false + name: mendix-nfs + server: 172.19.0.6 + path: /mnt/mendixdata + storage: 10Gi