Skip to content

Commit

Permalink
exposing topologySpreadConstraints on the helm chart (#3892)
Browse files Browse the repository at this point in the history
This allows users to set `topologySpreadConstraints` which can be used
to more evenly spread pods out over nodes/AZs/etc. and prevent uneven
utilization of federation pods.

Fixes #3891

<!-- start metadata -->
---

**Checklist**

Complete the checklist (and note appropriate exceptions) before the PR
is marked ready-for-review.

- [X] Changes are compatible[^1]
- [X] Documentation[^2] completed
- [X] Performance impact assessed and acceptable
- Tests added and passing[^3]
    - [ ] Unit Tests
    - [ ] Integration Tests
    - [X] Manual Tests

**Exceptions**
Tested helm chart template generation locally

*Note any exceptions here*
N/A
**Notes**
N/A

[^1]: It may be appropriate to bring upcoming changes to the attention
of other (impacted) groups. Please endeavour to do this before seeking
PR approval. The mechanism for doing this will vary considerably, so use
your judgement as to how and when to do this.
[^2]: Configuration is an important part of many changes. Where
applicable please try to document configuration examples.
[^3]: Tick whichever testing boxes are applicable. If you are adding
Manual Tests, please document the manual testing (extensively) in the
Exceptions.

---------

Co-authored-by: Gary Pennington <[email protected]>
Co-authored-by: Gary Pennington <[email protected]>
  • Loading branch information
3 people authored Oct 5, 2023
1 parent 200ef87 commit 6649432
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changesets/feat_expose_topology_spread_constraints.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
### Expose the ability to set topology spread constraints on the helm chart ([3891](https://github.com/apollographql/router/issues/3891))

Give developers the ability to set topology spread constraints that can be used to guarantee that federation pods are spread out evenly across AZs.

By [bjoern](https://github.com/bjoernw) in https://github.com/apollographql/router/pull/3892
4 changes: 4 additions & 0 deletions helm/chart/router/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -162,3 +162,7 @@ spec:
{{- if .Values.terminationGracePeriodSeconds }}
terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }}
{{- end }}
{{- with .Values.topologySpreadConstraints }}
topologySpreadConstraints:
{{- toYaml . | nindent 8 }}
{{- end }}
3 changes: 3 additions & 0 deletions helm/chart/router/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -232,3 +232,6 @@ probes:
# -- Configure liveness probe
liveness:
initialDelaySeconds: 0

# -- Sets the [topology spread constraints](https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/) for Deployment pods
topologySpreadConstraints: []

0 comments on commit 6649432

Please sign in to comment.