Skip to content

Commit

Permalink
bugfix: add pod anti affinity to master sts to make HA available
Browse files Browse the repository at this point in the history
Signed-off-by: trafalgarzzz <trafalgarz@outlook.com>
  • Loading branch information
TrafalgarZZZ committed Dec 24, 2024
1 parent 614fb6c commit 85fd925
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 22 deletions.
23 changes: 12 additions & 11 deletions charts/jindocache/templates/master/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,18 @@ spec:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
labelSelector:
matchExpressions:
- key: role
operator: In
values:
- jindofs-master
- key: release
operator: In
values:
- {{ .Release.Name | quote }}
topologyKey: kubernetes.io/hostname
podAffinityTerm:
labelSelector:
matchExpressions:
- key: role
operator: In
values:
- jindofs-master
- key: release
operator: In
values:
- {{ .Release.Name | quote }}
topologyKey: kubernetes.io/hostname
nodeSelector:
{{- if .Values.master.nodeSelector }}
{{ toYaml .Values.master.nodeSelector | trim | indent 8 }}
Expand Down
23 changes: 12 additions & 11 deletions charts/jindofsx/templates/master/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,18 @@ spec:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
labelSelector:
matchExpressions:
- key: role
operator: In
values:
- jindofs-master
- key: release
operator: In
values:
- {{ .Release.Name | quote }}
topologyKey: kubernetes.io/hostname
podAffinityTerm:
labelSelector:
matchExpressions:
- key: role
operator: In
values:
- jindofs-master
- key: release
operator: In
values:
- {{ .Release.Name | quote }}
topologyKey: kubernetes.io/hostname
nodeSelector:
{{- if .Values.master.nodeSelector }}
{{ toYaml .Values.master.nodeSelector | trim | indent 8 }}
Expand Down

0 comments on commit 85fd925

Please sign in to comment.