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

Support topologySpreadConstraints #3591

Merged
merged 25 commits into from
Jan 27, 2024
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
025dae6
Support topologySpreadConstraints
Kalaiselvi84 Jan 11, 2024
c9c1682
changes in allocator
Kalaiselvi84 Jan 11, 2024
4ce3ee3
align indentation
Kalaiselvi84 Jan 12, 2024
f137a82
Merge branch 'main' into pr-3533
Kalaiselvi84 Jan 12, 2024
560e7dd
topologySpreadConstraints before affinity
Kalaiselvi84 Jan 16, 2024
22d5acc
make gen-install
Kalaiselvi84 Jan 24, 2024
b3017db
Merge branch 'main' into pr-3533
Kalaiselvi84 Jan 24, 2024
8f12e4d
remove template/spec in extensions.yaml
Kalaiselvi84 Jan 24, 2024
f182847
Merge branch 'pr-3533' of https://github.com/Kalaiselvi84/agones into…
Kalaiselvi84 Jan 24, 2024
059e082
make gen-install
Kalaiselvi84 Jan 24, 2024
b65eeac
Merge branch 'main' into pr-3533
Kalaiselvi84 Jan 24, 2024
4a52d65
Relocate topologySpreadConstraints config to extensions-deployment.yaml
Kalaiselvi84 Jan 25, 2024
152e334
ping update
Kalaiselvi84 Jan 25, 2024
adb59ac
Merge branch 'main' into pr-3533
Kalaiselvi84 Jan 25, 2024
a150af4
Review changes
Kalaiselvi84 Jan 25, 2024
c40b457
config as an array
Kalaiselvi84 Jan 25, 2024
c977279
gen-install
Kalaiselvi84 Jan 25, 2024
5edffe7
no default values
Kalaiselvi84 Jan 26, 2024
60abae0
Merge branch 'main' into pr-3533
Kalaiselvi84 Jan 26, 2024
45f7923
included new parameter to helm config tables
Kalaiselvi84 Jan 26, 2024
b11c190
Merge branch 'main' into pr-3533
Kalaiselvi84 Jan 26, 2024
ee88b8f
Merge branch 'main' into pr-3533
gongmax Jan 26, 2024
33e8888
Merge branch 'main' into pr-3533
Kalaiselvi84 Jan 26, 2024
28cf37e
Review changes
Kalaiselvi84 Jan 27, 2024
ce7c62d
Merge branch 'main' into pr-3533
gongmax Jan 27, 2024
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 install/helm/agones/templates/controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,15 @@ spec:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
{{- if .Values.agones.controller.topologySpreadConstraints }}
Kalaiselvi84 marked this conversation as resolved.
Show resolved Hide resolved
topologySpreadConstraints:
- maxSkew: {{ .Values.agones.controller.topologySpreadConstraints.maxSkew }}
topologyKey: {{ .Values.agones.controller.topologySpreadConstraints.topologyKey }}
whenUnsatisfiable: {{ .Values.agones.controller.topologySpreadConstraints.whenUnsatisfiable }}
labelSelector:
matchLabels:
{{- toYaml .Values.agones.controller.topologySpreadConstraints.labelSelector.matchLabels | nindent 20 }}
{{- end }}
affinity:
{{- if .Values.agones.controller.affinity }}
{{- if .Values.agones.requireDedicatedNodes }}
Expand Down
11 changes: 11 additions & 0 deletions install/helm/agones/templates/extensions.yaml
Kalaiselvi84 marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,17 @@ spec:
version: v1
{{- end}}
{{- if .Values.agones.registerWebhooks }}
template:
Kalaiselvi84 marked this conversation as resolved.
Show resolved Hide resolved
spec:
{{- if .Values.agones.extensions.topologySpreadConstraints }}
topologySpreadConstraints:
- maxSkew: {{ .Values.agones.extensions.topologySpreadConstraints.maxSkew }}
topologyKey: {{ .Values.agones.extensions.topologySpreadConstraints.topologyKey }}
whenUnsatisfiable: {{ .Values.agones.extensions.topologySpreadConstraints.whenUnsatisfiable }}
labelSelector:
matchLabels:
{{- toYaml .Values.agones.extensions.topologySpreadConstraints.labelSelector.matchLabels | nindent 16 }}
{{- end }}
---
apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingWebhookConfiguration
Expand Down
9 changes: 9 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,15 @@ spec:
{{- toYaml .Values.agones.allocator.annotations | nindent 8 }}
{{- end }}
spec:
{{- if .Values.agones.allocator.topologySpreadConstraints }}
topologySpreadConstraints:
- maxSkew: {{ .Values.agones.allocator.topologySpreadConstraints.maxSkew }}
topologyKey: {{ .Values.agones.allocator.topologySpreadConstraints.topologyKey }}
whenUnsatisfiable: {{ .Values.agones.allocator.topologySpreadConstraints.whenUnsatisfiable }}
labelSelector:
matchLabels:
{{- toYaml .Values.agones.allocator.topologySpreadConstraints.labelSelector.matchLabels | nindent 20 }}
{{- end }}
affinity:
{{- if .Values.agones.allocator.affinity }}
{{- if .Values.agones.requireDedicatedNodes }}
Expand Down
24 changes: 24 additions & 0 deletions install/helm/agones/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,14 @@ agones:
replicas: 2
pdb:
minAvailable: 1
topologySpreadConstraints:
enabled: false
maxSkew: 1
topologyKey: kubernetes.io/hostname
whenUnsatisfiable: ScheduleAnyway
labelSelector:
matchLabels:
app: agones-controller
extensions:
resources: {}
# requests:
Expand Down Expand Up @@ -139,6 +147,14 @@ agones:
initialDelaySeconds: 3
periodSeconds: 3
failureThreshold: 3
topologySpreadConstraints:
enabled: false
maxSkew: 1
topologyKey: kubernetes.io/hostname
whenUnsatisfiable: ScheduleAnyway
labelSelector:
matchLabels:
app: agones-extensions
ping:
install: true
pdb:
Expand Down Expand Up @@ -248,6 +264,14 @@ agones:
remoteAllocationTimeout: 10s
totalRemoteAllocationTimeout: 30s
allocationBatchWaitTime: 500ms
topologySpreadConstraints:
enabled: true
maxSkew: 1
topologyKey: kubernetes.io/hostname
whenUnsatisfiable: ScheduleAnyway
labelSelector:
matchLabels:
app: agones-allocator
image:
registry: us-docker.pkg.dev/agones-images/release
tag: 1.38.0-dev
Expand Down
25 changes: 24 additions & 1 deletion install/yaml/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17005,6 +17005,13 @@ spec:
release: agones-manual
heritage: Helm
spec:
topologySpreadConstraints:
- maxSkew: 1
topologyKey: kubernetes.io/hostname
whenUnsatisfiable: ScheduleAnyway
labelSelector:
matchLabels:
app: agones-controller
affinity:
nodeAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
Expand Down Expand Up @@ -17369,6 +17376,13 @@ spec:
prometheus.io/port: "8080"
prometheus.io/path: "/metrics"
spec:
topologySpreadConstraints:
- maxSkew: 1
topologyKey: kubernetes.io/hostname
whenUnsatisfiable: ScheduleAnyway
labelSelector:
matchLabels:
app: agones-allocator
affinity:
nodeAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
Expand Down Expand Up @@ -17485,7 +17499,16 @@ spec:
name: agones-controller-service
namespace: agones-system
caBundle: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUVjVENDQTFtZ0F3SUJBZ0lVRm5DOUsxT1kzRnFNaWhqN3RWbXh5R3hwUVdzd0RRWUpLb1pJaHZjTkFRRUwKQlFBd2dhb3hDekFKQmdOVkJBWVRBbFZUTVJNd0VRWURWUVFJREFwVGIyMWxMVk4wWVhSbE1ROHdEUVlEVlFRSwpEQVpCWjI5dVpYTXhEekFOQmdOVkJBc01Ca0ZuYjI1bGN6RTBNRElHQTFVRUF3d3JZV2R2Ym1WekxXTnZiblJ5CmIyeHNaWEl0YzJWeWRtbGpaUzVoWjI5dVpYTXRjM2x6ZEdWdExuTjJZekV1TUN3R0NTcUdTSWIzRFFFSkFSWWYKWVdkdmJtVnpMV1JwYzJOMWMzTkFaMjl2WjJ4bFozSnZkWEJ6TG1OdmJUQWVGdzB5TVRBMk16QXhPVFUyTWpGYQpGdzB6TVRBMk1qZ3hPVFUyTWpGYU1JR3FNUXN3Q1FZRFZRUUd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nlkbWxqWlM1aFoyOXVaWE10YzNsemRHVnRMbk4yCll6QU5CZ2txaGtpRzl3MEJBUXNGQUFPQ0FRRUFWQTUxU3dNcEhZY20zUnRuc2I5MkgwUTZYT1ZndEJzSWRaY1QKbFBuSmFBSGdybEt2SnhiMU0rdTdQYllDZkZOTWlUTStyWGZ5cWtJRXY3VU1aN0dWeS9CYm9zTk1sb2M0UHJjaAo3RnVlai9zVnArcW1GT1c0VzlPVTFwcytqWm5vcHJ4Z3R1OVgzbmpBZjZiWWVqQWMzaVo0Q0xpem8vMDd2Qk94CnA5L3J4R0FjSVVjQW04Y3hXa01kaEduNnZOYkNFcXJoVTRJdnZSYlMwVnlrckhPY3RGM25raC9GbnRHQU80RDEKUEgrUThSQXBNK2xBeGtXcFIvNXlHTXdLM05WcS9kc2JaclQ5RHhId0hUU2tqL3JXZVRrWmxIN042MHpZL3JqbwpNUjBJNEtOWHl3WElTcGdNbE93dkxPdGY2aUNYeHJDNyt1RjdyQmxCei9tSUNxYnR0dz09Ci0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K
version: v1
version: v1
template:
spec:
topologySpreadConstraints:
- maxSkew: 1
topologyKey: kubernetes.io/hostname
whenUnsatisfiable: ScheduleAnyway
labelSelector:
matchLabels:
app: agones-extensions
---
# Source: agones/templates/extensions.yaml
# Copyright 2018 Google LLC All Rights Reserved.
Expand Down