Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make kruise deployment spread across availability zone #124

Merged
merged 1 commit into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions versions/kruise-game/0.9/templates/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,15 @@ spec:
volumeMounts:
- mountPath: /etc/kruise-game
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 }}
terminationGracePeriodSeconds: 10
volumes:
Expand Down
9 changes: 9 additions & 0 deletions versions/kruise-rollout/0.5/templates/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,15 @@ spec:
- {{ .Values.rollout.fullname }}
topologyKey: kubernetes.io/hostname
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 }}
tolerations:
{{- toYaml . | nindent 8 }}
Expand Down
9 changes: 9 additions & 0 deletions versions/kruise-state-metrics/0.2/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,15 @@ spec:
port: 8081
resources:
{{- 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 }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down
9 changes: 9 additions & 0 deletions versions/kruise/1.7.2/templates/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,15 @@ spec:
- controller-manager
topologyKey: kubernetes.io/hostname
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 }}
nodeAffinity:
{{ toYaml . | indent 10 }}
Expand Down
Loading