Skip to content

Commit c93ed8b

Browse files
authored
Add configurable topologySpreadConstraints for Trino gateway deployment (#336)
1 parent 2f03ea5 commit c93ed8b

File tree

3 files changed

+31
-0
lines changed

3 files changed

+31
-0
lines changed

charts/gateway/README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,18 @@ A Helm chart for Trino Gateway
145145
* `terminationGracePeriodSeconds` - int, default: `30`
146146
* `nodeSelector` - object, default: `{}`
147147
* `tolerations` - list, default: `[]`
148+
* `topologySpreadConstraints` - list, default: `[]`
149+
150+
[Deployment Topology Spread Constraints](https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/) configuration. Useful to control how Pods are spread across domains such as regions, zones, nodes etc.
151+
Example:
152+
```yaml
153+
- maxSkew: 1
154+
topologyKey: "kubernetes.io/hostname"
155+
whenUnsatisfiable: ScheduleAnyway
156+
- maxSkew: 1
157+
topologyKey: "topology.kubernetes.io/zone"
158+
whenUnsatisfiable: ScheduleAnyway
159+
```
148160
* `affinity` - object, default: `{}`
149161
* `commonLabels` - object, default: `{}`
150162

charts/gateway/templates/deployment.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,3 +121,7 @@ spec:
121121
tolerations:
122122
{{- toYaml . | nindent 8 }}
123123
{{- end }}
124+
{{- with .Values.topologySpreadConstraints }}
125+
topologySpreadConstraints:
126+
{{- toYaml . | nindent 8 }}
127+
{{- end }}

charts/gateway/values.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,21 @@ nodeSelector: {}
192192

193193
tolerations: []
194194

195+
topologySpreadConstraints: []
196+
# topologySpreadConstraints -- [Deployment Topology Spread Constraints](https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/) configuration.
197+
# Useful to control how Pods are spread across domains such as regions, zones, nodes etc.
198+
# @raw
199+
# Example:
200+
# ```yaml
201+
# - maxSkew: 1
202+
# topologyKey: "kubernetes.io/hostname"
203+
# whenUnsatisfiable: ScheduleAnyway
204+
# - maxSkew: 1
205+
# topologyKey: "topology.kubernetes.io/zone"
206+
# whenUnsatisfiable: ScheduleAnyway
207+
# ```
208+
209+
195210
affinity: {}
196211

197212
# -- Labels that get applied to every resource's metadata

0 commit comments

Comments
 (0)