From a222db881fa9290a2a0f1c7a8bc10edeb71f196b Mon Sep 17 00:00:00 2001 From: Eric Shen Date: Wed, 5 Mar 2025 10:12:44 +0800 Subject: [PATCH] fix: duplicate pdb fields in the template (#1205) *(If this PR fixes a github issue, please add `Fixes #`.)* Fixes # *(or if this PR is one task of a github issue, please add `Master Issue: #` to link to the master issue.)* Master Issue: # ### Motivation *Explain here the context, and why you're making that change. What is the problem you're trying to solve.* ### Modifications *Describe the modifications you've done.* ### Verifying this change - [x] Make sure that the change passes the CI checks. *(Please pick either of the following options)* This change is a trivial rework / code cleanup without any test coverage. *(or)* This change is already covered by existing tests, such as *(please describe tests)*. *(or)* This change added tests and can be verified as follows: *(example:)* - *Added integration tests for end-to-end deployment with large payloads (10MB)* - *Extended integration test for recovery after broker failure* ### Documentation Check the box below. Need to update docs? - [ ] `doc-required` (If you need help on updating docs, create a doc issue) - [x] `no-need-doc` (Please explain why) - [ ] `doc` (If this PR contains doc changes) Signed-off-by: ericsyh (cherry picked from commit aca25890513decad0d4c156a55d67bfa5ba506f9) --- .../templates/bookkeeper/bookkeeper-cluster.yaml | 7 +++---- .../templates/zookeeper/zookeeper-cluster.yaml | 7 +++---- .../templates/bookkeeper/bookkeeper-cluster.yaml | 7 +++---- .../sn-platform/templates/zookeeper/zookeeper-cluster.yaml | 7 +++---- 4 files changed, 12 insertions(+), 16 deletions(-) diff --git a/charts/sn-platform-slim/templates/bookkeeper/bookkeeper-cluster.yaml b/charts/sn-platform-slim/templates/bookkeeper/bookkeeper-cluster.yaml index 7c0b680a..dc94eab7 100644 --- a/charts/sn-platform-slim/templates/bookkeeper/bookkeeper-cluster.yaml +++ b/charts/sn-platform-slim/templates/bookkeeper/bookkeeper-cluster.yaml @@ -261,10 +261,6 @@ spec: {{ toYaml . | indent 6 }} {{- end }} apiObjects: - {{- if not .Values.bookkeeper.pdb.autoCreate }} - pdb: - managed: {{ .Values.bookkeeper.pdb.autoCreate }} - {{- end }} clientService: {} headlessService: metadata: @@ -329,6 +325,9 @@ spec: metadata: name: "{{ template "pulsar.fullname" . }}-{{ .Values.autorecovery.component }}" pdb: + {{- if not .Values.bookkeeper.pdb.autoCreate }} + managed: {{ .Values.bookkeeper.pdb.autoCreate }} + {{- end }} metadata: name: "{{ template "pulsar.fullname" . }}-{{ .Values.bookkeeper.component }}" customization: diff --git a/charts/sn-platform-slim/templates/zookeeper/zookeeper-cluster.yaml b/charts/sn-platform-slim/templates/zookeeper/zookeeper-cluster.yaml index b9ceb836..3edcf79e 100644 --- a/charts/sn-platform-slim/templates/zookeeper/zookeeper-cluster.yaml +++ b/charts/sn-platform-slim/templates/zookeeper/zookeeper-cluster.yaml @@ -219,10 +219,6 @@ spec: {{ toYaml . | indent 6 }} {{- end }} apiObjects: - {{- if not .Values.zookeeper.pdb.autoCreate }} - pdb: - managed: {{ .Values.zookeeper.pdb.autoCreate }} - {{- end }} clientService: {} headlessService: metadata: @@ -253,6 +249,9 @@ spec: metadata: name: "{{ template "pulsar.fullname" . }}-{{ .Values.zookeeper.component }}" pdb: + {{- if not .Values.zookeeper.pdb.autoCreate }} + managed: {{ .Values.zookeeper.pdb.autoCreate }} + {{- end }} metadata: name: "{{ template "pulsar.fullname" . }}-{{ .Values.zookeeper.component }}" {{- if or .Values.zookeeper.reconfig.staticServerList .Values.zookeeper.advanced.customStartupCommand }} diff --git a/charts/sn-platform/templates/bookkeeper/bookkeeper-cluster.yaml b/charts/sn-platform/templates/bookkeeper/bookkeeper-cluster.yaml index 5dcb9c28..f2557645 100644 --- a/charts/sn-platform/templates/bookkeeper/bookkeeper-cluster.yaml +++ b/charts/sn-platform/templates/bookkeeper/bookkeeper-cluster.yaml @@ -261,10 +261,6 @@ spec: {{ toYaml . | indent 6 }} {{- end }} apiObjects: - {{- if not .Values.bookkeeper.pdb.autoCreate }} - pdb: - managed: {{ .Values.bookkeeper.pdb.autoCreate }} - {{- end }} clientService: {} headlessService: metadata: @@ -329,6 +325,9 @@ spec: metadata: name: "{{ template "pulsar.fullname" . }}-{{ .Values.autorecovery.component }}" pdb: + {{- if not .Values.bookkeeper.pdb.autoCreate }} + managed: {{ .Values.bookkeeper.pdb.autoCreate }} + {{- end }} metadata: name: "{{ template "pulsar.fullname" . }}-{{ .Values.bookkeeper.component }}" customization: diff --git a/charts/sn-platform/templates/zookeeper/zookeeper-cluster.yaml b/charts/sn-platform/templates/zookeeper/zookeeper-cluster.yaml index b9ceb836..3edcf79e 100644 --- a/charts/sn-platform/templates/zookeeper/zookeeper-cluster.yaml +++ b/charts/sn-platform/templates/zookeeper/zookeeper-cluster.yaml @@ -219,10 +219,6 @@ spec: {{ toYaml . | indent 6 }} {{- end }} apiObjects: - {{- if not .Values.zookeeper.pdb.autoCreate }} - pdb: - managed: {{ .Values.zookeeper.pdb.autoCreate }} - {{- end }} clientService: {} headlessService: metadata: @@ -253,6 +249,9 @@ spec: metadata: name: "{{ template "pulsar.fullname" . }}-{{ .Values.zookeeper.component }}" pdb: + {{- if not .Values.zookeeper.pdb.autoCreate }} + managed: {{ .Values.zookeeper.pdb.autoCreate }} + {{- end }} metadata: name: "{{ template "pulsar.fullname" . }}-{{ .Values.zookeeper.component }}" {{- if or .Values.zookeeper.reconfig.staticServerList .Values.zookeeper.advanced.customStartupCommand }}