Skip to content

Commit

Permalink
Support topologySpreadConstraints (#3591)
Browse files Browse the repository at this point in the history
* Support topologySpreadConstraints

---------

Co-authored-by: Mengye (Max) Gong <8364575+gongmax@users.noreply.github.com>
  • Loading branch information
Kalaiselvi84 and gongmax authored Jan 27, 2024
1 parent d96fb3c commit f445b49
Show file tree
Hide file tree
Showing 6 changed files with 194 additions and 0 deletions.
4 changes: 4 additions & 0 deletions install/helm/agones/templates/controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ spec:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
{{- if .Values.agones.controller.topologySpreadConstraints }}
topologySpreadConstraints:
{{- toYaml .Values.agones.controller.topologySpreadConstraints | nindent 8 }}
{{- end }}
affinity:
{{- if .Values.agones.controller.affinity }}
{{- if .Values.agones.requireDedicatedNodes }}
Expand Down
4 changes: 4 additions & 0 deletions install/helm/agones/templates/extensions-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ spec:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
{{- if .Values.agones.extensions.topologySpreadConstraints }}
topologySpreadConstraints:
{{- toYaml .Values.agones.extensions.topologySpreadConstraints | nindent 8 }}
{{- end }}
affinity:
{{- if .Values.agones.extensions.affinity }}
{{- if .Values.agones.requireDedicatedNodes }}
Expand Down
4 changes: 4 additions & 0 deletions install/helm/agones/templates/ping.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ spec:
{{- toYaml .Values.agones.ping.annotations | nindent 8 }}
{{- end }}
spec:
{{- if .Values.agones.ping.topologySpreadConstraints }}
topologySpreadConstraints:
{{- toYaml .Values.agones.ping.topologySpreadConstraints | nindent 8 }}
{{- end }}
affinity:
{{- if .Values.agones.ping.affinity }}
{{- if .Values.agones.requireDedicatedNodes }}
Expand Down
4 changes: 4 additions & 0 deletions install/helm/agones/templates/service/allocation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,10 @@ spec:
{{- toYaml .Values.agones.allocator.annotations | nindent 8 }}
{{- end }}
spec:
{{- if .Values.agones.allocator.topologySpreadConstraints }}
topologySpreadConstraints:
{{- toYaml .Values.agones.allocator.topologySpreadConstraints | nindent 8 }}
{{- end }}
affinity:
{{- if .Values.agones.allocator.affinity }}
{{- if .Values.agones.requireDedicatedNodes }}
Expand Down
4 changes: 4 additions & 0 deletions install/helm/agones/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ agones:
replicas: 2
pdb:
minAvailable: 1
topologySpreadConstraints: {}
extensions:
resources: {}
# requests:
Expand Down Expand Up @@ -139,6 +140,7 @@ agones:
initialDelaySeconds: 3
periodSeconds: 3
failureThreshold: 3
topologySpreadConstraints: {}
ping:
install: true
pdb:
Expand Down Expand Up @@ -180,6 +182,7 @@ agones:
periodSeconds: 3
failureThreshold: 3
timeoutSeconds: 1
topologySpreadConstraints: {}
allocator:
install: true
pdb:
Expand Down Expand Up @@ -248,6 +251,7 @@ agones:
remoteAllocationTimeout: 10s
totalRemoteAllocationTimeout: 30s
allocationBatchWaitTime: 500ms
topologySpreadConstraints: {}
image:
registry: us-docker.pkg.dev/agones-images/release
tag: 1.38.0-dev
Expand Down
Loading

0 comments on commit f445b49

Please sign in to comment.