From 9fb7862021f0afae9b76086d20ea29729d7d8626 Mon Sep 17 00:00:00 2001 From: Darin Spivey Date: Thu, 19 Mar 2026 09:54:59 -0400 Subject: [PATCH] fix: Add chart control for `updateStrategy` to brokers and proxies A user can control the `updateStrategy` for the pods of bookies and zookeeper. However, the values for brokers and proxies is hardcoded. Being able to control this value via the Helm chart is crucial to being able to do smooth chart upgrades to a fully-running cluster. For example, setting the strategy to `OnDelete` would allow a user to control which order the pods are restarted after an upgrade. Fixes: #667 --- charts/pulsar/templates/broker-statefulset.yaml | 3 +-- charts/pulsar/templates/proxy-statefulset.yaml | 3 +-- charts/pulsar/values.yaml | 4 ++++ 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/charts/pulsar/templates/broker-statefulset.yaml b/charts/pulsar/templates/broker-statefulset.yaml index 785fa726..534db046 100644 --- a/charts/pulsar/templates/broker-statefulset.yaml +++ b/charts/pulsar/templates/broker-statefulset.yaml @@ -38,8 +38,7 @@ spec: matchLabels: {{- include "pulsar.matchLabels" . | nindent 6 }} component: {{ .Values.broker.component }} - updateStrategy: - type: RollingUpdate + updateStrategy: {{ .Values.broker.updateStrategy | toYaml | nindent 4 }} {{- /* When functions are enabled, podManagementPolicy must be OrderedReady to ensure that other started brokers are available via DNS for the function worker to connect to. diff --git a/charts/pulsar/templates/proxy-statefulset.yaml b/charts/pulsar/templates/proxy-statefulset.yaml index a08af202..9c220e07 100644 --- a/charts/pulsar/templates/proxy-statefulset.yaml +++ b/charts/pulsar/templates/proxy-statefulset.yaml @@ -36,8 +36,7 @@ spec: matchLabels: {{- include "pulsar.matchLabels" . | nindent 6 }} component: {{ .Values.proxy.component }} - updateStrategy: - type: RollingUpdate + updateStrategy: {{ .Values.proxy.updateStrategy | toYaml | nindent 4 }} podManagementPolicy: Parallel template: metadata: diff --git a/charts/pulsar/values.yaml b/charts/pulsar/values.yaml index 8a7e3dd9..ef04379e 100755 --- a/charts/pulsar/values.yaml +++ b/charts/pulsar/values.yaml @@ -1109,6 +1109,8 @@ broker: behavior: ~ # The podManagementPolicy cannot be modified for an existing deployment. If you need to change this value, you will need to manually delete the existing broker StatefulSet and then redeploy the chart. podManagementPolicy: + updateStrategy: + type: RollingUpdate initContainers: [] # This is how Victoria Metrics or Prometheus discovers this component podMonitor: @@ -1370,6 +1372,8 @@ proxy: maxReplicas: 3 metrics: ~ behavior: ~ + updateStrategy: + type: RollingUpdate initContainers: [] # This is how Victoria Metrics or Prometheus discovers this component podMonitor: