Skip to content

Commit fe581ba

Browse files
committed
Add a topologySpreadConstraints for the queue-worker
The new default topologySpreadConstraints for the queue-worker will spread pods out, which should happen by default, but is a mechanism that can help if that isn't what you are seeing already. Set this to whenUnsatisfiable: DoNotSchedule if you need a strict policy. Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
1 parent 0e4465d commit fe581ba

15 files changed

+570
-533
lines changed

chart/openfaas/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
type: application
33
description: OpenFaaS - Serverless Functions Made Simple
44
name: openfaas
5-
version: 14.2.73
5+
version: 14.2.74
66
sources:
77
- https://github.com/openfaas/faas
88
- https://github.com/openfaas/faas-netes

chart/openfaas/templates/jetstream-queueworker-dep.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ spec:
2323
labels:
2424
app: queue-worker
2525
spec:
26+
{{- if and .Values.jetstreamQueueWorker.topologySpreadConstraints .Values.openfaasPro }}
27+
topologySpreadConstraints:
28+
{{- toYaml .Values.jetstreamQueueWorker.topologySpreadConstraints | nindent 8 }}
29+
{{- end }}
2630
volumes:
2731
{{- if .Values.openfaasPro }}
2832
- name: license

chart/openfaas/values.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,15 @@ jetstreamQueueWorker:
226226
# Set pprof to listen on port 6000 to debug issues
227227
pprof: false
228228

229+
topologySpreadConstraints:
230+
- maxSkew: 1
231+
topologyKey: "kubernetes.io/hostname"
232+
# Set to "DoNotSchedule" if you need a strict enforcement
233+
whenUnsatisfiable: ScheduleAnyway
234+
labelSelector:
235+
matchLabels:
236+
app: queue-worker
237+
229238
# OpenFaaS Pro
230239
# The values for queueWorkerPro are merged with those under
231240
# the "queueWorker" section

docs/cron-connector-0.6.11.tgz

-1 Bytes
Binary file not shown.

docs/federated-gateway-0.1.0.tgz

-1 Bytes
Binary file not shown.

docs/index.yaml

Lines changed: 556 additions & 532 deletions
Large diffs are not rendered by default.

docs/kafka-connector-0.7.11.tgz

0 Bytes
Binary file not shown.

docs/mqtt-connector-0.4.7.tgz

-1 Bytes
Binary file not shown.

docs/nats-connector-0.3.2.tgz

0 Bytes
Binary file not shown.

docs/openfaas-14.2.74.tgz

61.3 KB
Binary file not shown.

0 commit comments

Comments
 (0)