Skip to content

Commit aa5b9ab

Browse files
weltekialexellis
authored andcommitted
Make queueMode a top level value.
Signed-off-by: Han Verstraete (OpenFaaS Ltd) <[email protected]>
1 parent 46b4747 commit aa5b9ab

File tree

5 files changed

+10
-9
lines changed

5 files changed

+10
-9
lines changed

chart/openfaas/templates/gateway-dep.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,8 @@ spec:
137137
value: "{{ .Values.nats.channel }}"
138138
{{- end }}
139139
{{- end }}
140-
{{- if or .Values.nats.external.enabled (eq .Values.nats.queueMode "jetstream") }}
141-
{{- if eq .Values.nats.queueMode "jetstream" }}
140+
{{- if or .Values.nats.external.enabled (eq .Values.queueMode "jetstream") }}
141+
{{- if eq .Values.queueMode "jetstream" }}
142142
- name: faas_nats_jetstream
143143
value: "true"
144144
{{- end }}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{- if and .Values.async (eq .Values.nats.queueMode "jetstream") }}
1+
{{- if and .Values.async (eq .Values.queueMode "jetstream") }}
22
apiVersion: apps/v1
33
kind: Deployment
44
metadata:

chart/openfaas/templates/nats-dep.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ spec:
2929
- name: nats
3030
resources:
3131
{{- .Values.nats.resources | toYaml | nindent 12 }}
32-
{{- if eq .Values.nats.queueMode "jetstream" }}
32+
{{- if eq .Values.queueMode "jetstream" }}
3333
image: {{ .Values.nats.image }}
3434
{{- else }}
3535
image: {{ .Values.stan.image }}
@@ -42,11 +42,11 @@ spec:
4242
- containerPort: 8222
4343
protocol: TCP
4444
{{- end }}
45-
{{- if not (eq .Values.nats.queueMode "jetstream") }}
45+
{{- if not (eq .Values.queueMode "jetstream") }}
4646
command: ["/nats-streaming-server"]
4747
{{- end }}
4848
args:
49-
{{- if eq .Values.nats.queueMode "jetstream" }}
49+
{{- if eq .Values.queueMode "jetstream" }}
5050
- --js
5151
{{- else}}
5252
- --store
@@ -72,7 +72,7 @@ spec:
7272
- -routez
7373
- -subz
7474
- -varz
75-
{{- if eq .Values.nats.queueMode "jetstream" }}
75+
{{- if eq .Values.queueMode "jetstream" }}
7676
- -jsz=all
7777
{{- else }}
7878
- -channelz

chart/openfaas/templates/queueworker-dep.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{- if and .Values.async (not (eq .Values.nats.queueMode "jetstream")) }}
1+
{{- if and .Values.async (not (eq .Values.queueMode "jetstream")) }}
22
apiVersion: apps/v1
33
kind: Deployment
44
metadata:

chart/openfaas/values.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ exposeServices: true
1616
serviceType: NodePort # serviceType for OpenFaaS gateway
1717
async: true # No known reason to disable this, kept for legacy reasons
1818

19+
queueMode: "" # Set to `jetstream` to run the async system backed by NATS JetStream. By default the async system uses NATS Streaming
20+
1921
# Set to true to use legacy / community-edition auto-scaling
2022
# when openfaasPro is set to true to use the original
2123
# auto-scaling logic
@@ -244,7 +246,6 @@ stan:
244246
# NATS is required for async
245247
nats:
246248
channel: "faas-request"
247-
queueMode: ""
248249
# Stream replication is set to 1 by default. This is only recommended for development.
249250
# For production a value of at least 3 is recommended for NATS JetStream to be resilient.
250251
# See https://github.com/openfaas/openfaas-pro/blob/master/jetstream.md

0 commit comments

Comments
 (0)