diff --git a/charts/pulsar/templates/autorecovery-statefulset.yaml b/charts/pulsar/templates/autorecovery-statefulset.yaml index ff9e67a..81327e1 100644 --- a/charts/pulsar/templates/autorecovery-statefulset.yaml +++ b/charts/pulsar/templates/autorecovery-statefulset.yaml @@ -61,6 +61,10 @@ spec: {{- with .Values.autorecovery.tolerations }} {{ toYaml . | indent 8 }} {{- end }} + {{- end }} + {{- if .Values.autorecovery.topologySpreadConstraints }} + topologySpreadConstraints: + {{- toYaml .Values.autorecovery.topologySpreadConstraints | nindent 8 }} {{- end }} affinity: {{- if and .Values.affinity.anti_affinity .Values.autorecovery.affinity.anti_affinity}} diff --git a/charts/pulsar/templates/bookkeeper-statefulset.yaml b/charts/pulsar/templates/bookkeeper-statefulset.yaml index 907292c..4c0e509 100644 --- a/charts/pulsar/templates/bookkeeper-statefulset.yaml +++ b/charts/pulsar/templates/bookkeeper-statefulset.yaml @@ -58,6 +58,10 @@ spec: {{- if .Values.bookkeeper.tolerations }} tolerations: {{ toYaml .Values.bookkeeper.tolerations | indent 8 }} + {{- end }} + {{- if .Values.bookkeeper.topologySpreadConstraints }} + topologySpreadConstraints: + {{- toYaml .Values.bookkeeper.topologySpreadConstraints | nindent 8 }} {{- end }} affinity: {{- if and .Values.affinity.anti_affinity .Values.bookkeeper.affinity.anti_affinity}} diff --git a/charts/pulsar/templates/broker-statefulset.yaml b/charts/pulsar/templates/broker-statefulset.yaml index dc4157a..4f48af5 100644 --- a/charts/pulsar/templates/broker-statefulset.yaml +++ b/charts/pulsar/templates/broker-statefulset.yaml @@ -79,6 +79,10 @@ spec: {{- if .Values.broker.tolerations }} tolerations: {{ toYaml .Values.broker.tolerations | indent 8 }} + {{- end }} + {{- if .Values.broker.topologySpreadConstraints }} + topologySpreadConstraints: + {{- toYaml .Values.broker.topologySpreadConstraints | nindent 8 }} {{- end }} affinity: {{- if and .Values.affinity.anti_affinity .Values.broker.affinity.anti_affinity}} diff --git a/charts/pulsar/templates/proxy-statefulset.yaml b/charts/pulsar/templates/proxy-statefulset.yaml index 747ac71..b9b26af 100644 --- a/charts/pulsar/templates/proxy-statefulset.yaml +++ b/charts/pulsar/templates/proxy-statefulset.yaml @@ -60,6 +60,10 @@ spec: {{- if .Values.proxy.tolerations }} tolerations: {{ toYaml .Values.proxy.tolerations | indent 8 }} + {{- end }} + {{- if .Values.proxy.topologySpreadConstraints }} + topologySpreadConstraints: + {{- toYaml .Values.proxy.topologySpreadConstraints | nindent 8 }} {{- end }} affinity: {{- if and .Values.affinity.anti_affinity .Values.proxy.affinity.anti_affinity}} diff --git a/charts/pulsar/templates/pulsar-manager-statefulset.yaml b/charts/pulsar/templates/pulsar-manager-statefulset.yaml index 6df4682..609db7e 100755 --- a/charts/pulsar/templates/pulsar-manager-statefulset.yaml +++ b/charts/pulsar/templates/pulsar-manager-statefulset.yaml @@ -53,6 +53,10 @@ spec: {{- if .Values.pulsar_manager.tolerations }} tolerations: {{ toYaml .Values.pulsar_manager.tolerations | indent 8 }} + {{- end }} + {{- if .Values.pulsar_manager.topologySpreadConstraints }} + topologySpreadConstraints: + {{- toYaml .Values.pulsar_manager.topologySpreadConstraints | nindent 8 }} {{- end }} terminationGracePeriodSeconds: {{ .Values.pulsar_manager.gracePeriod }} {{- if .Values.pulsar_manager.initContainers }} diff --git a/charts/pulsar/templates/toolset-statefulset.yaml b/charts/pulsar/templates/toolset-statefulset.yaml index a0f16fe..6f5ea82 100644 --- a/charts/pulsar/templates/toolset-statefulset.yaml +++ b/charts/pulsar/templates/toolset-statefulset.yaml @@ -56,6 +56,10 @@ spec: {{- if .Values.toolset.tolerations }} tolerations: {{ toYaml .Values.toolset.tolerations | indent 8 }} + {{- end }} + {{- if .Values.toolset.topologySpreadConstraints }} + topologySpreadConstraints: + {{- toYaml .Values.toolset.topologySpreadConstraints | nindent 8 }} {{- end }} terminationGracePeriodSeconds: {{ .Values.toolset.gracePeriod }} serviceAccountName: "{{ template "pulsar.fullname" . }}-{{ .Values.toolset.component }}" diff --git a/charts/pulsar/templates/zookeeper-statefulset.yaml b/charts/pulsar/templates/zookeeper-statefulset.yaml index d03b41c..844f7a8 100755 --- a/charts/pulsar/templates/zookeeper-statefulset.yaml +++ b/charts/pulsar/templates/zookeeper-statefulset.yaml @@ -57,6 +57,10 @@ spec: {{- if .Values.zookeeper.tolerations }} tolerations: {{ toYaml .Values.zookeeper.tolerations | indent 8 }} + {{- end }} + {{- if .Values.zookeeper.topologySpreadConstraints }} + topologySpreadConstraints: + {{- toYaml .Values.zookeeper.topologySpreadConstraints | nindent 8 }} {{- end }} affinity: {{- if and .Values.affinity.anti_affinity .Values.zookeeper.affinity.anti_affinity}} diff --git a/charts/pulsar/values.yaml b/charts/pulsar/values.yaml index 8fdb758..2b12cf7 100755 --- a/charts/pulsar/values.yaml +++ b/charts/pulsar/values.yaml @@ -358,6 +358,8 @@ zookeeper: # requiredDuringSchedulingIgnoredDuringExecution - rules must be met for pod to be scheduled (hard) requires at least one node per replica # preferredDuringSchedulingIgnoredDuringExecution - scheduler will try to enforce but not guranentee type: requiredDuringSchedulingIgnoredDuringExecution + # set topologySpreadConstraint to deploy pods across different zones + topologySpreadConstraints: [] annotations: {} tolerations: [] gracePeriod: 30 @@ -533,6 +535,8 @@ bookkeeper: # requiredDuringSchedulingIgnoredDuringExecution - rules must be met for pod to be scheduled (hard) requires at least one node per replica # preferredDuringSchedulingIgnoredDuringExecution - scheduler will try to enforce but not guranentee type: requiredDuringSchedulingIgnoredDuringExecution + # set topologySpreadConstraint to deploy pods across different zones + topologySpreadConstraints: [] annotations: {} tolerations: [] gracePeriod: 30 @@ -721,6 +725,8 @@ autorecovery: # requiredDuringSchedulingIgnoredDuringExecution - rules must be met for pod to be scheduled (hard) requires at least one node per replica # preferredDuringSchedulingIgnoredDuringExecution - scheduler will try to enforce but not guranentee type: requiredDuringSchedulingIgnoredDuringExecution + # set topologySpreadConstraint to deploy pods across different zones + topologySpreadConstraints: [] annotations: {} # tolerations: [] gracePeriod: 30 @@ -852,6 +858,8 @@ broker: # requiredDuringSchedulingIgnoredDuringExecution - rules must be met for pod to be scheduled (hard) requires at least one node per replica # preferredDuringSchedulingIgnoredDuringExecution - scheduler will try to enforce but not guranentee type: preferredDuringSchedulingIgnoredDuringExecution + # set topologySpreadConstraint to deploy pods across different zones + topologySpreadConstraints: [] annotations: {} tolerations: [] gracePeriod: 30 @@ -1090,6 +1098,8 @@ proxy: # requiredDuringSchedulingIgnoredDuringExecution - rules must be met for pod to be scheduled (hard) requires at least one node per replica # preferredDuringSchedulingIgnoredDuringExecution - scheduler will try to enforce but not guranentee type: requiredDuringSchedulingIgnoredDuringExecution + # set topologySpreadConstraint to deploy pods across different zones + topologySpreadConstraints: [] annotations: {} tolerations: [] gracePeriod: 30 @@ -1211,6 +1221,8 @@ toolset: restartPodsOnConfigMapChange: false # nodeSelector: # cloud.google.com/gke-nodepool: default-pool + # set topologySpreadConstraint to deploy pods across different zones + topologySpreadConstraints: [] annotations: {} tolerations: [] gracePeriod: 30 @@ -1345,6 +1357,8 @@ pulsar_manager: restartPodsOnConfigMapChange: false # nodeSelector: # cloud.google.com/gke-nodepool: default-pool + # set topologySpreadConstraint to deploy pods across different zones + topologySpreadConstraints: [] annotations: {} tolerations: [] gracePeriod: 30