Add topologyspreadconstraint to deploy pods in sts cross different az evenly (#526)
Signed-off-by: Wang, Shu <shu.wang@fmr.com>
This commit is contained in:
parent
5276bd69ad
commit
a45bc4bfe1
@ -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}}
|
||||
|
||||
@ -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}}
|
||||
|
||||
@ -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}}
|
||||
|
||||
@ -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}}
|
||||
|
||||
@ -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 }}
|
||||
|
||||
@ -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 }}"
|
||||
|
||||
@ -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}}
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user