From cfda4ac1a66b55b68c1a11f66034e3e480cf30e0 Mon Sep 17 00:00:00 2001 From: thr Date: Wed, 25 Sep 2024 07:55:09 +0200 Subject: [PATCH 1/3] extraVolumeMounts and extraVolumes implemented --- .../helm/templates/statefulset.yaml | 24 ++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/mywebmethodsserver/helm/templates/statefulset.yaml b/mywebmethodsserver/helm/templates/statefulset.yaml index a5281ba..868901e 100644 --- a/mywebmethodsserver/helm/templates/statefulset.yaml +++ b/mywebmethodsserver/helm/templates/statefulset.yaml @@ -145,11 +145,26 @@ spec: mountPath: {{ get $value "path" }} {{- end }} {{- end }} + {{- if .Values.extraVolumeMounts }} + {{- if eq "string" (printf "%T" .Values.extraVolumeMounts) }} + {{- tpl .Values.extraVolumeMounts . | nindent 10 }} + {{- else }} + {{- toYaml .Values.extraVolumeMounts | nindent 10 }} + {{- end }} + {{- end }} resources: {{- toYaml .Values.resources | nindent 12 }} - {{ if .Values.extraContainers }} + {{- if .Values.extraContainers }} {{- toYaml .Values.extraContainers | nindent 8 }} {{- end }} + volumes: + {{- if .Values.extraVolumes }} + {{- if eq "string" (printf "%T" .Values.extraVolumes) }} + {{- tpl .Values.extraVolumes . | nindent 8 }} + {{- else }} + {{- toYaml .Values.extraVolumes | nindent 8 }} + {{- end }} + {{- end }} {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} @@ -169,13 +184,6 @@ spec: tolerations: {{- toYaml . | nindent 8 }} {{- end }} - {{- if .Values.extraVolumeMounts }} - {{- if eq "string" (printf "%T" .Values.extraVolumeMounts) }} - {{- tpl .Values.extraVolumeMounts . | nindent 6 }} - {{- else }} - {{- toYaml .Values.extraVolumeMounts | nindent 6 }} - {{- end }} - {{- end }} volumeClaimTemplates: {{- if .Values.storage.enabled }} {{ $defaultVolumeNotMapped := true }} From c52cd4cf6ae7903f68000e5bfac39dd1495aa50d Mon Sep 17 00:00:00 2001 From: thr Date: Wed, 25 Sep 2024 07:56:06 +0200 Subject: [PATCH 2/3] extraVolumeMounts and extraVolumes implemented --- mywebmethodsserver/helm/README.md.gotmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mywebmethodsserver/helm/README.md.gotmpl b/mywebmethodsserver/helm/README.md.gotmpl index 34e201e..48fd336 100644 --- a/mywebmethodsserver/helm/README.md.gotmpl +++ b/mywebmethodsserver/helm/README.md.gotmpl @@ -49,6 +49,6 @@ helm install wm-mws mywebmethodsserver | `1.0.2` | `storage.enabled` added in `values.yaml`. For backward reason is this value set to `true` as default. `false` doesn't create and mount any PV. (You can test this feature if you don't want to deploy any own MWS application. MWS is more stateless and has only the database as stateful dependency.) | | `1.0.2` | `containerName` added in `values.yaml`. Default is the Chart name. (Use `helm repo update` to get latest Helm Chart version.) | | `1.0.3` | `tpl` function support in `affinity` value added. `topologySpreadConstraints` support added. | -| `1.0.4` | `priorityClassName` support added. Implementation of `extraConfigMaps` added. | +| `1.0.4` | `priorityClassName` support added. Implementation of `extraConfigMaps`, `extraVolumeMounts` and `extraVolumes` added. | {{ template "chart.valuesSection" . }} From 88305fb2c0c39d019da17a50f755a92eb85aa1fe Mon Sep 17 00:00:00 2001 From: thr Date: Wed, 25 Sep 2024 07:57:42 +0200 Subject: [PATCH 3/3] extraVolumeMounts and extraVolumes implemented and updating helm/README.me from values.yaml --- mywebmethodsserver/helm/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mywebmethodsserver/helm/README.md b/mywebmethodsserver/helm/README.md index ddde54d..a835ebc 100644 --- a/mywebmethodsserver/helm/README.md +++ b/mywebmethodsserver/helm/README.md @@ -49,7 +49,7 @@ helm install wm-mws mywebmethodsserver | `1.0.2` | `storage.enabled` added in `values.yaml`. For backward reason is this value set to `true` as default. `false` doesn't create and mount any PV. (You can test this feature if you don't want to deploy any own MWS application. MWS is more stateless and has only the database as stateful dependency.) | | `1.0.2` | `containerName` added in `values.yaml`. Default is the Chart name. (Use `helm repo update` to get latest Helm Chart version.) | | `1.0.3` | `tpl` function support in `affinity` value added. `topologySpreadConstraints` support added. | -| `1.0.4` | `priorityClassName` support added. Implementation of `extraConfigMaps` added. | +| `1.0.4` | `priorityClassName` support added. Implementation of `extraConfigMaps`, `extraVolumeMounts` and `extraVolumes` added. | ## Values