mirror of https://github.com/openkruise/charts.git
make kruise deployment spread across availability zone (#124)
Signed-off-by: 守辰 <shouchen.zz@alibaba-inc.com>
This commit is contained in:
parent
6b875eefa1
commit
e111262f53
|
|
@ -98,6 +98,15 @@ spec:
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- mountPath: /etc/kruise-game
|
- mountPath: /etc/kruise-game
|
||||||
name: provider-config
|
name: provider-config
|
||||||
|
topologySpreadConstraints:
|
||||||
|
- labelSelector:
|
||||||
|
matchLabels:
|
||||||
|
control-plane: {{ .Values.kruiseGame.fullname }}
|
||||||
|
matchLabelKeys:
|
||||||
|
- pod-template-hash
|
||||||
|
maxSkew: 1
|
||||||
|
topologyKey: topology.kubernetes.io/zone
|
||||||
|
whenUnsatisfiable: ScheduleAnyway
|
||||||
serviceAccountName: {{ .Values.kruiseGame.fullname }}
|
serviceAccountName: {{ .Values.kruiseGame.fullname }}
|
||||||
terminationGracePeriodSeconds: 10
|
terminationGracePeriodSeconds: 10
|
||||||
volumes:
|
volumes:
|
||||||
|
|
|
||||||
|
|
@ -96,6 +96,15 @@ spec:
|
||||||
- {{ .Values.rollout.fullname }}
|
- {{ .Values.rollout.fullname }}
|
||||||
topologyKey: kubernetes.io/hostname
|
topologyKey: kubernetes.io/hostname
|
||||||
weight: 100
|
weight: 100
|
||||||
|
topologySpreadConstraints:
|
||||||
|
- labelSelector:
|
||||||
|
matchLabels:
|
||||||
|
control-plane: {{ .Values.rollout.fullname }}
|
||||||
|
matchLabelKeys:
|
||||||
|
- pod-template-hash
|
||||||
|
maxSkew: 1
|
||||||
|
topologyKey: topology.kubernetes.io/zone
|
||||||
|
whenUnsatisfiable: ScheduleAnyway
|
||||||
{{- with .Values.tolerations }}
|
{{- with .Values.tolerations }}
|
||||||
tolerations:
|
tolerations:
|
||||||
{{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
|
|
|
||||||
|
|
@ -57,6 +57,15 @@ spec:
|
||||||
port: 8081
|
port: 8081
|
||||||
resources:
|
resources:
|
||||||
{{- toYaml .Values.resources | nindent 12 }}
|
{{- toYaml .Values.resources | nindent 12 }}
|
||||||
|
topologySpreadConstraints:
|
||||||
|
- labelSelector:
|
||||||
|
matchLabels:
|
||||||
|
{{- include "kruise-state-metrics.selectorLabels" . | nindent 12 }}
|
||||||
|
matchLabelKeys:
|
||||||
|
- pod-template-hash
|
||||||
|
maxSkew: 1
|
||||||
|
topologyKey: topology.kubernetes.io/zone
|
||||||
|
whenUnsatisfiable: ScheduleAnyway
|
||||||
{{- with .Values.nodeSelector }}
|
{{- with .Values.nodeSelector }}
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
{{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
|
|
|
||||||
|
|
@ -124,6 +124,15 @@ spec:
|
||||||
- controller-manager
|
- controller-manager
|
||||||
topologyKey: kubernetes.io/hostname
|
topologyKey: kubernetes.io/hostname
|
||||||
weight: 100
|
weight: 100
|
||||||
|
topologySpreadConstraints:
|
||||||
|
- labelSelector:
|
||||||
|
matchLabels:
|
||||||
|
control-plane: controller-manager
|
||||||
|
matchLabelKeys:
|
||||||
|
- pod-template-hash
|
||||||
|
maxSkew: 1
|
||||||
|
topologyKey: topology.kubernetes.io/zone
|
||||||
|
whenUnsatisfiable: ScheduleAnyway
|
||||||
{{- with .Values.manager.nodeAffinity }}
|
{{- with .Values.manager.nodeAffinity }}
|
||||||
nodeAffinity:
|
nodeAffinity:
|
||||||
{{ toYaml . | indent 10 }}
|
{{ toYaml . | indent 10 }}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue