8000 helm: add topologySpreadConstraints value · coder/coder@0d49b23 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0d49b23

Browse files
committed
helm: add topologySpreadConstraints value
1 parent ae40f8a commit 0d49b23

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

helm/coder/values.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ coder:
4747
# if not set. If you're using the chart directly from git, the default
4848
# app version will not work and you'll need to set this value. The helm
4949
# chart helpfully fails quickly in this case.
50-
tag: ""
50+
tag: "v2.15.0"
5151
# coder.image.pullPolicy -- The pull policy to use for the image. See:
5252
# https://kubernetes.io/docs/concepts/containers/images/#image-pull-policy
5353
pullPolicy: IfNotPresent
@@ -234,6 +234,15 @@ coder:
234234
topologyKey: kubernetes.io/hostname
235235
weight: 1
236236

237+
# coder.topologySpreadConstraints -- Topology spread constraints for the Coder pod.
238+
topologySpreadConstraints:
239+
- maxSkew: 1
240+
topologyKey: kubernetes.io/hostname
241+
whenUnsatisfiable: DoNotSchedule
242+
labelSelector:
243+
matchLabels:
244+
app: coder
245+
237246
# coder.tolerations -- Tolerations for tainted nodes.
238247
# See: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
239248
tolerations:

helm/libcoder/templates/_coder.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ spec:
4343
nodeSelector:
4444
{{ toYaml . | nindent 8 }}
4545
{{- end }}
46+
{{- with .Values.coder.topologySpreadConstraints }}
47+
topologySpreadConstraints:
48+
{{- toYaml .Values.coder.topologySpreadConstraints | nindent 8 }}
49+
{{- end }}
4650
{{- with .Values.coder.initContainers }}
4751
initContainers:
4852
{{ toYaml . | nindent 8 }}

0 commit comments

Comments
 (0)
0