From 76f9fe5f8be514448f2d4f92df8c0c5784104cfe Mon Sep 17 00:00:00 2001 From: ericsyh Date: Fri, 1 Dec 2023 14:47:50 +0800 Subject: [PATCH 1/3] fix: expose the zk and bk accessModes config in values Signed-off-by: ericsyh --- .../templates/bookkeeper/bookkeeper-cluster.yaml | 8 ++++++-- .../templates/zookeeper/zookeeper-cluster.yaml | 8 ++++++-- charts/sn-platform-slim/values.yaml | 12 ++++++++++-- 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/charts/sn-platform-slim/templates/bookkeeper/bookkeeper-cluster.yaml b/charts/sn-platform-slim/templates/bookkeeper/bookkeeper-cluster.yaml index bcab0af8..ad686f71 100644 --- a/charts/sn-platform-slim/templates/bookkeeper/bookkeeper-cluster.yaml +++ b/charts/sn-platform-slim/templates/bookkeeper/bookkeeper-cluster.yaml @@ -130,7 +130,9 @@ spec: numDirsPerVolume: {{ .Values.bookkeeper.volumes.journal.numDirsPerVolume | default 1 }} volumeClaimTemplate: accessModes: - - ReadWriteOnce + {{- range .Values.bookkeeper.volumes.journal.accessModes }} + - {{ . | quote }} + {{- end }} resources: requests: storage: {{ .Values.bookkeeper.volumes.journal.size }} @@ -140,7 +142,9 @@ spec: numDirsPerVolume: {{ .Values.bookkeeper.volumes.ledgers.numDirsPerVolume | default 1 }} volumeClaimTemplate: accessModes: - - ReadWriteOnce + {{- range .Values.bookkeeper.volumes.ledgers.accessModes }} + - {{ . | quote }} + {{- end }} resources: requests: storage: {{ .Values.bookkeeper.volumes.ledgers.size }} diff --git a/charts/sn-platform-slim/templates/zookeeper/zookeeper-cluster.yaml b/charts/sn-platform-slim/templates/zookeeper/zookeeper-cluster.yaml index bf97589d..1a1ec709 100644 --- a/charts/sn-platform-slim/templates/zookeeper/zookeeper-cluster.yaml +++ b/charts/sn-platform-slim/templates/zookeeper/zookeeper-cluster.yaml @@ -163,14 +163,18 @@ spec: persistence: data: accessModes: - - ReadWriteOnce + {{- range .Values.zookeeper.volumes.data.accessModes }} + - {{ . | quote }} + {{- end }} resources: requests: storage: {{ .Values.zookeeper.volumes.data.size }} {{- include "pulsar.zookeeper.data.storage.class" . | nindent 6 }} dataLog: accessModes: - - ReadWriteOnce + {{- range .Values.zookeeper.volumes.dataLog.accessModes }} + - {{ . | quote }} + {{- end }} resources: requests: {{- if .Values.zookeeper.volumes.useSeparateDiskForTxlog }} diff --git a/charts/sn-platform-slim/values.yaml b/charts/sn-platform-slim/values.yaml index 0241b689..8b9a8123 100644 --- a/charts/sn-platform-slim/values.yaml +++ b/charts/sn-platform-slim/values.yaml @@ -638,6 +638,8 @@ zookeeper: data: name: data size: 50Gi + accessModes: + - ReadWriteOnce # storageClassName: "" ## If the storage class is left undefined when using persistence ## the default storage class for the cluster will be used. @@ -656,6 +658,8 @@ zookeeper: dataLog: name: datalog size: 10Gi + accessModes: + - ReadWriteOnce # storageClassName: "" ## If the storage class is left undefined when using persistence ## the default storage class for the cluster will be used. @@ -859,6 +863,8 @@ bookkeeper: numDirsPerVolume: 1 name: journal size: 10Gi + accessModes: + - ReadWriteOnce # storageClassName: "" ## If the storage class is left undefined when using persistence ## the default storage class for the cluster will be used. @@ -875,11 +881,13 @@ bookkeeper: # extraParameters: # iopsPerGB: "50" ledgers: - name: ledgers - size: 50Gi # It determines the directory of ledgers data numVolumes: 1 numDirsPerVolume: 1 + name: ledgers + size: 50Gi + accessModes: + - ReadWriteOnce # storageClassName: "" ## If the storage class is left undefined when using persistence ## the default storage class for the cluster will be used. From 44c5e75fc7fa34d345ac23251e5e5f0d4c557f3c Mon Sep 17 00:00:00 2001 From: ericsyh Date: Fri, 1 Dec 2023 14:56:52 +0800 Subject: [PATCH 2/3] apply to sn-platform chart Signed-off-by: ericsyh --- .../templates/zookeeper/zookeeper-cluster.yaml | 12 ++++++------ .../templates/bookkeeper/bookkeeper-cluster.yaml | 8 ++++++-- .../templates/zookeeper/zookeeper-cluster.yaml | 10 +++++++--- charts/sn-platform/values.yaml | 12 ++++++++++-- 4 files changed, 29 insertions(+), 13 deletions(-) diff --git a/charts/sn-platform-slim/templates/zookeeper/zookeeper-cluster.yaml b/charts/sn-platform-slim/templates/zookeeper/zookeeper-cluster.yaml index 1a1ec709..dfb7c7f8 100644 --- a/charts/sn-platform-slim/templates/zookeeper/zookeeper-cluster.yaml +++ b/charts/sn-platform-slim/templates/zookeeper/zookeeper-cluster.yaml @@ -163,18 +163,18 @@ spec: persistence: data: accessModes: - {{- range .Values.zookeeper.volumes.data.accessModes }} - - {{ . | quote }} - {{- end }} + {{- range .Values.zookeeper.volumes.data.accessModes }} + - {{ . | quote }} + {{- end }} resources: requests: storage: {{ .Values.zookeeper.volumes.data.size }} {{- include "pulsar.zookeeper.data.storage.class" . | nindent 6 }} dataLog: accessModes: - {{- range .Values.zookeeper.volumes.dataLog.accessModes }} - - {{ . | quote }} - {{- end }} + {{- range .Values.zookeeper.volumes.dataLog.accessModes }} + - {{ . | quote }} + {{- end }} resources: requests: {{- if .Values.zookeeper.volumes.useSeparateDiskForTxlog }} diff --git a/charts/sn-platform/templates/bookkeeper/bookkeeper-cluster.yaml b/charts/sn-platform/templates/bookkeeper/bookkeeper-cluster.yaml index bcab0af8..79cb0b52 100644 --- a/charts/sn-platform/templates/bookkeeper/bookkeeper-cluster.yaml +++ b/charts/sn-platform/templates/bookkeeper/bookkeeper-cluster.yaml @@ -130,7 +130,9 @@ spec: numDirsPerVolume: {{ .Values.bookkeeper.volumes.journal.numDirsPerVolume | default 1 }} volumeClaimTemplate: accessModes: - - ReadWriteOnce + {{- range .Values.bookkeeper.volumes.journal.accessModes }} + - {{ . | quote }} + {{- end }} resources: requests: storage: {{ .Values.bookkeeper.volumes.journal.size }} @@ -140,7 +142,9 @@ spec: numDirsPerVolume: {{ .Values.bookkeeper.volumes.ledgers.numDirsPerVolume | default 1 }} volumeClaimTemplate: accessModes: - - ReadWriteOnce + {{- range .Values.bookkeeper.volumes.journal.accessModes }} + - {{ . | quote }} + {{- end }} resources: requests: storage: {{ .Values.bookkeeper.volumes.ledgers.size }} diff --git a/charts/sn-platform/templates/zookeeper/zookeeper-cluster.yaml b/charts/sn-platform/templates/zookeeper/zookeeper-cluster.yaml index bf97589d..5fbac314 100644 --- a/charts/sn-platform/templates/zookeeper/zookeeper-cluster.yaml +++ b/charts/sn-platform/templates/zookeeper/zookeeper-cluster.yaml @@ -163,14 +163,18 @@ spec: persistence: data: accessModes: - - ReadWriteOnce - resources: + {{- range .Values.zookeeper.volumes.data.accessModes }} + - {{ . | quote }} + {{- end }} + resources: requests: storage: {{ .Values.zookeeper.volumes.data.size }} {{- include "pulsar.zookeeper.data.storage.class" . | nindent 6 }} dataLog: accessModes: - - ReadWriteOnce + {{- range .Values.zookeeper.volumes.dataLog.accessModes }} + - {{ . | quote }} + {{- end }} resources: requests: {{- if .Values.zookeeper.volumes.useSeparateDiskForTxlog }} diff --git a/charts/sn-platform/values.yaml b/charts/sn-platform/values.yaml index f71b6d8e..7fe02d20 100644 --- a/charts/sn-platform/values.yaml +++ b/charts/sn-platform/values.yaml @@ -713,6 +713,8 @@ zookeeper: data: name: data size: 50Gi + accessModes: + - ReadWriteOnce # storageClassName: "" ## If the storage class is left undefined when using persistence ## the default storage class for the cluster will be used. @@ -731,6 +733,8 @@ zookeeper: dataLog: name: datalog size: 10Gi + accessModes: + - ReadWriteOnce # storageClassName: "" ## If the storage class is left undefined when using persistence ## the default storage class for the cluster will be used. @@ -934,6 +938,8 @@ bookkeeper: numDirsPerVolume: 1 name: journal size: 10Gi + accessModes: + - ReadWriteOnce # storageClassName: "" ## If the storage class is left undefined when using persistence ## the default storage class for the cluster will be used. @@ -950,11 +956,13 @@ bookkeeper: # extraParameters: # iopsPerGB: "50" ledgers: - name: ledgers - size: 50Gi # It determines the directory of ledgers data numVolumes: 1 numDirsPerVolume: 1 + name: ledgers + size: 50Gi + accessModes: + - ReadWriteOnce # storageClassName: "" ## If the storage class is left undefined when using persistence ## the default storage class for the cluster will be used. From e4674ede942e2aaa750d89e2e1a2b601dc01fea3 Mon Sep 17 00:00:00 2001 From: ericsyh Date: Fri, 1 Dec 2023 14:59:12 +0800 Subject: [PATCH 3/3] fix lint Signed-off-by: ericsyh --- charts/sn-platform-slim/values.yaml | 8 ++++---- charts/sn-platform/values.yaml | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/charts/sn-platform-slim/values.yaml b/charts/sn-platform-slim/values.yaml index 8b9a8123..043106c8 100644 --- a/charts/sn-platform-slim/values.yaml +++ b/charts/sn-platform-slim/values.yaml @@ -638,7 +638,7 @@ zookeeper: data: name: data size: 50Gi - accessModes: + accessModes: - ReadWriteOnce # storageClassName: "" ## If the storage class is left undefined when using persistence @@ -658,7 +658,7 @@ zookeeper: dataLog: name: datalog size: 10Gi - accessModes: + accessModes: - ReadWriteOnce # storageClassName: "" ## If the storage class is left undefined when using persistence @@ -863,7 +863,7 @@ bookkeeper: numDirsPerVolume: 1 name: journal size: 10Gi - accessModes: + accessModes: - ReadWriteOnce # storageClassName: "" ## If the storage class is left undefined when using persistence @@ -886,7 +886,7 @@ bookkeeper: numDirsPerVolume: 1 name: ledgers size: 50Gi - accessModes: + accessModes: - ReadWriteOnce # storageClassName: "" ## If the storage class is left undefined when using persistence diff --git a/charts/sn-platform/values.yaml b/charts/sn-platform/values.yaml index 7fe02d20..6509ae7b 100644 --- a/charts/sn-platform/values.yaml +++ b/charts/sn-platform/values.yaml @@ -713,7 +713,7 @@ zookeeper: data: name: data size: 50Gi - accessModes: + accessModes: - ReadWriteOnce # storageClassName: "" ## If the storage class is left undefined when using persistence @@ -733,7 +733,7 @@ zookeeper: dataLog: name: datalog size: 10Gi - accessModes: + accessModes: - ReadWriteOnce # storageClassName: "" ## If the storage class is left undefined when using persistence @@ -938,7 +938,7 @@ bookkeeper: numDirsPerVolume: 1 name: journal size: 10Gi - accessModes: + accessModes: - ReadWriteOnce # storageClassName: "" ## If the storage class is left undefined when using persistence @@ -961,7 +961,7 @@ bookkeeper: numDirsPerVolume: 1 name: ledgers size: 50Gi - accessModes: + accessModes: - ReadWriteOnce # storageClassName: "" ## If the storage class is left undefined when using persistence