From f398038575d167d406bab1d718adc4acb5de3f34 Mon Sep 17 00:00:00 2001 From: qmiinh <63024539+qmiinh@users.noreply.github.com> Date: Wed, 6 Dec 2023 14:38:44 +0700 Subject: [PATCH 1/5] fix: update path and type HostPath --- charts/psmdb-db/templates/cluster.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/charts/psmdb-db/templates/cluster.yaml b/charts/psmdb-db/templates/cluster.yaml index 396e03aa..0dcc0d31 100644 --- a/charts/psmdb-db/templates/cluster.yaml +++ b/charts/psmdb-db/templates/cluster.yaml @@ -191,8 +191,8 @@ spec: volumeSpec: {{- if $replset.volumeSpec.hostPath }} hostPath: - path: {{ $replset.volumeSpec.hostPath }} - type: Directory + path: {{ $replset.volumeSpec.hostPath.path }} + type: {{ $replset.volumeSpec.hostPath.type }} {{- else if $replset.volumeSpec.pvc }} persistentVolumeClaim: {{ $replset.volumeSpec.pvc | toYaml | indent 8 }} @@ -258,8 +258,8 @@ spec: volumeSpec: {{- if $replset.nonvoting.volumeSpec.hostPath }} hostPath: - path: {{ $replset.nonvoting.volumeSpec.hostPath }} - type: Directory + path: {{ $replset.nonvoting.volumeSpec.hostPath.path }} + type: {{ $replset.nonvoting.volumeSpec.hostPath.type }} {{- else if $replset.nonvoting.volumeSpec.pvc }} persistentVolumeClaim: {{ $replset.nonvoting.volumeSpec.pvc | toYaml | indent 10 }} @@ -413,8 +413,8 @@ spec: volumeSpec: {{- if .Values.sharding.configrs.volumeSpec.hostPath }} hostPath: - path: {{ .Values.sharding.configrs.volumeSpec.hostPath }} - type: Directory + path: {{ .Values.sharding.configrs.volumeSpec.hostPath.path }} + type: {{ .Values.sharding.configrs.volumeSpec.hostPath.tye }} {{- else if .Values.sharding.configrs.volumeSpec.pvc }} persistentVolumeClaim: {{ .Values.sharding.configrs.volumeSpec.pvc | toYaml | indent 10 }} From 9bb3770e3c8050b3fcc43f85618a65fcc59aa952 Mon Sep 17 00:00:00 2001 From: qmiinh <63024539+qmiinh@users.noreply.github.com> Date: Wed, 6 Dec 2023 14:41:41 +0700 Subject: [PATCH 2/5] fix: update path and type HostPath --- charts/psmdb-db/templates/cluster.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/psmdb-db/templates/cluster.yaml b/charts/psmdb-db/templates/cluster.yaml index 0dcc0d31..26351161 100644 --- a/charts/psmdb-db/templates/cluster.yaml +++ b/charts/psmdb-db/templates/cluster.yaml @@ -414,7 +414,7 @@ spec: {{- if .Values.sharding.configrs.volumeSpec.hostPath }} hostPath: path: {{ .Values.sharding.configrs.volumeSpec.hostPath.path }} - type: {{ .Values.sharding.configrs.volumeSpec.hostPath.tye }} + type: {{ .Values.sharding.configrs.volumeSpec.hostPath.type }} {{- else if .Values.sharding.configrs.volumeSpec.pvc }} persistentVolumeClaim: {{ .Values.sharding.configrs.volumeSpec.pvc | toYaml | indent 10 }} From 7f3711f42949b7aaefa044208f04442f7c761bf8 Mon Sep 17 00:00:00 2001 From: qmiinh <63024539+qmiinh@users.noreply.github.com> Date: Wed, 6 Dec 2023 21:23:25 +0700 Subject: [PATCH 3/5] feat: update default type hostPath to Directory --- charts/psmdb-db/templates/cluster.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/charts/psmdb-db/templates/cluster.yaml b/charts/psmdb-db/templates/cluster.yaml index 26351161..addbdfde 100644 --- a/charts/psmdb-db/templates/cluster.yaml +++ b/charts/psmdb-db/templates/cluster.yaml @@ -192,7 +192,11 @@ spec: {{- if $replset.volumeSpec.hostPath }} hostPath: path: {{ $replset.volumeSpec.hostPath.path }} + {{- if $replset.volumeSpec.hostPath.type }} type: {{ $replset.volumeSpec.hostPath.type }} + {{- else }} + type: Directory + {{- end }} {{- else if $replset.volumeSpec.pvc }} persistentVolumeClaim: {{ $replset.volumeSpec.pvc | toYaml | indent 8 }} @@ -259,7 +263,11 @@ spec: {{- if $replset.nonvoting.volumeSpec.hostPath }} hostPath: path: {{ $replset.nonvoting.volumeSpec.hostPath.path }} + {{- if $replset.nonvoting.volumeSpec.hostPath.type }} type: {{ $replset.nonvoting.volumeSpec.hostPath.type }} + {{- else }} + type: Directory + {{- end }} {{- else if $replset.nonvoting.volumeSpec.pvc }} persistentVolumeClaim: {{ $replset.nonvoting.volumeSpec.pvc | toYaml | indent 10 }} @@ -414,7 +422,11 @@ spec: {{- if .Values.sharding.configrs.volumeSpec.hostPath }} hostPath: path: {{ .Values.sharding.configrs.volumeSpec.hostPath.path }} + {{- if .Values.sharding.configrs.volumeSpec.hostPath.type }} type: {{ .Values.sharding.configrs.volumeSpec.hostPath.type }} + {{- else }} + type: Directory + {{- end }} {{- else if .Values.sharding.configrs.volumeSpec.pvc }} persistentVolumeClaim: {{ .Values.sharding.configrs.volumeSpec.pvc | toYaml | indent 10 }} From 34393d0dd442867e6496739b19175f1cb04a5f13 Mon Sep 17 00:00:00 2001 From: Tomislav Plavcic Date: Thu, 1 Feb 2024 10:18:04 +0100 Subject: [PATCH 4/5] Bump psmdb-db chart version to 1.15.3 --- charts/psmdb-db/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/psmdb-db/Chart.yaml b/charts/psmdb-db/Chart.yaml index 5f8fe7b6..5cd3a30d 100644 --- a/charts/psmdb-db/Chart.yaml +++ b/charts/psmdb-db/Chart.yaml @@ -3,7 +3,7 @@ appVersion: "1.15.0" description: A Helm chart for installing Percona Server MongoDB Cluster Databases using the PSMDB Operator. name: psmdb-db home: https://www.percona.com/doc/kubernetes-operator-for-psmongodb/index.html -version: 1.15.2 +version: 1.15.3 maintainers: - name: tplavcic email: tomislav.plavcic@percona.com From e2603b55b1714a7d77995a33666f3eebc5162eb8 Mon Sep 17 00:00:00 2001 From: Tomislav Plavcic Date: Thu, 1 Feb 2024 10:47:17 +0100 Subject: [PATCH 5/5] psmdb-db - Add info about hostPath.type option into readme and values --- charts/psmdb-db/README.md | 3 +++ charts/psmdb-db/values.yaml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/charts/psmdb-db/README.md b/charts/psmdb-db/README.md index 7b57f7ac..0fc8c12d 100644 --- a/charts/psmdb-db/README.md +++ b/charts/psmdb-db/README.md @@ -93,6 +93,7 @@ The chart can be customized using the following configurable parameters: | `replsets[0].volumeSpec.emptyDir` | ReplicaSet Pods emptyDir K8S storage | `{}` | | `replsets[0].volumeSpec.hostPath` | ReplicaSet Pods hostPath K8S storage | | | `replsets[0].volumeSpec.hostPath.path` | ReplicaSet Pods hostPath K8S storage path | `""` | +| `replsets[0].volumeSpec.hostPath.type` | Type for hostPath volume | `Directory` | | `replsets[0].volumeSpec.pvc` | ReplicaSet Pods PVC request parameters | | | `replsets[0].volumeSpec.pvc.annotations` | The Kubernetes annotations metadata for Persistent Volume Claim | `{}` | | `replsets[0].volumeSpec.pvc.labels` | The Kubernetes labels metadata for Persistent Volume Claim | `{}` | @@ -119,6 +120,7 @@ The chart can be customized using the following configurable parameters: | `replsets[0].nonvoting.volumeSpec.emptyDir` | Nonvoting Pods emptyDir K8S storage | `{}` | | `replsets[0].nonvoting.volumeSpec.hostPath` | Nonvoting Pods hostPath K8S storage | | | `replsets[0].nonvoting.volumeSpec.hostPath.path` | Nonvoting Pods hostPath K8S storage path | `""` | +| `replsets[0].nonvoting.volumeSpec.hostPath.type` | Type for hostPath volume | `Directory` | | `replsets[0].nonvoting.volumeSpec.pvc` | Nonvoting Pods PVC request parameters | | | `replsets[0].nonvoting.volumeSpec.pvc.annotations` | The Kubernetes annotations metadata for Persistent Volume Claim | `{}` | | `replsets[0].nonvoting.volumeSpec.pvc.labels` | The Kubernetes labels metadata for Persistent Volume Claim | `{}` | @@ -172,6 +174,7 @@ The chart can be customized using the following configurable parameters: | `sharding.configrs.resources.requests.memory` | Config ReplicaSet resource requests memory | `0.5G` | | `sharding.configrs.volumeSpec.hostPath` | Config ReplicaSet hostPath K8S storage | | | `sharding.configrs.volumeSpec.hostPath.path` | Config ReplicaSet hostPath K8S storage path | `""` | +| `sharding.configrs.volumeSpec.hostPath.type` | Type for hostPath volum | `Directory` | | `sharding.configrs.volumeSpec.emptyDir` | Config ReplicaSet Pods emptyDir K8S storage | | | `sharding.configrs.volumeSpec.pvc` | Config ReplicaSet Pods PVC request parameters | | | `sharding.configrs.volumeSpec.pvc.annotations` | The Kubernetes annotations metadata for Persistent Volume Claim | `{}` | diff --git a/charts/psmdb-db/values.yaml b/charts/psmdb-db/values.yaml index c36af1f8..23d68a76 100644 --- a/charts/psmdb-db/values.yaml +++ b/charts/psmdb-db/values.yaml @@ -196,6 +196,7 @@ replsets: # emptyDir: {} # hostPath: # path: /data + # type: Directory pvc: # annotations: # volume.beta.kubernetes.io/storage-class: example-hostpath @@ -252,6 +253,7 @@ replsets: # emptyDir: {} # hostPath: # path: /data + # type: Directory pvc: # annotations: # volume.beta.kubernetes.io/storage-class: example-hostpath