Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions chart/openfaas/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,7 @@ See [values.yaml](./values.yaml) for detailed configuration.
| `jetstreamQueueWorker.consumer.pullMaxMessages` | PullMaxMessages limits the number of messages to be buffered per consumer. Leave empty to use optimized default for the selected queue mode | `` |
| `jetstreamQueueWorker.logs.debug` | Log debug messages | `false` |
| `jetstreamQueueWorker.logs.format` | Set the log format, supports `console` or `json` | `console` |
| `jetstreamQueueWorker.adaptiveConcurrency` | Enable adaptive concurrency limiting for functions. This setting only takes effect when `jetstreamQueueWorker.mode` is set to `function`. | `true` |
| `nats.channel` | The name of the NATS Streaming channel or NATS JetStream stream to use for asynchronous function invocations | `faas-request` |
| `nats.external.clusterName` | The name of the externally-managed NATS Streaming server | `""` |
| `nats.external.enabled` | Whether to use an externally-managed NATS Streaming server | `false` |
Expand Down
2 changes: 2 additions & 0 deletions chart/openfaas/templates/queueworker-dep.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ spec:
- name: ack_wait
value: "{{ .Values.queueWorker.ackWait }}"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer to if guard these blocks so there is no output when not defined?

{{- will avoid white space from conditional blocks.

- name: limiter_enabled
value: "{{ .Values.jetstreamQueueWorker.adaptiveConcurrency }}"
- name: upstream_timeout
value: "{{ .Values.gateway.upstreamTimeout }}"
- name: "max_retry_attempts"
Expand Down
3 changes: 3 additions & 0 deletions chart/openfaas/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,9 @@ faasnetes:
jetstreamQueueWorker:
image: ghcr.io/openfaasltd/jetstream-queue-worker:0.4.12
mode: "static"
# Enable adaptive concurrency limiting for functions.
# This setting only takes effect when jetstreamQueueWorker.mode is set to "function".
adaptiveConcurrency: true
consumer:
inactiveThreshold: "30s"

Expand Down
3 changes: 2 additions & 1 deletion chart/queue-worker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ nats:
name: slow-fns
consumer:
durableName: slow-fns-workers
upstreamTimeout: 15m
upstreamTimeout: 15m
```

Then pass `-f ./values-slow-fns.yaml` to the `helm upgrade --install` command instead of the `--set` flags.
Expand Down Expand Up @@ -101,6 +101,7 @@ helm upgrade --install \
| `queueName` | Name of the queue if you want it to be different to the stream name | `""` - when empty, defaults to `nats.stream.name` |
| `mode` | Queue operation mode: `static` (OpenFaaS Standard) or `function` (requires OpenFaaS for Enterprises) | `static` |
| `maxInflight` | Control the concurrent invocations | `1` |
| `adaptiveConcurrency` | Enable adaptive concurrency limiting for functions. This setting only takes effect when `mode` is set to `function`. | `true` |
| `queuePartitions` | Number of queue partitions | `1` |
| `partition` | Queue partition number this queue should subscribe to | `0` |
| `consumer.inactiveThreshold` | If a function is inactive (has no invocations) for longer than this threshold its consumer will be removed to save resources | `30s` |
Expand Down
2 changes: 2 additions & 0 deletions chart/queue-worker/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ spec:
- name: "ack_wait"
value: "{{ .Values.nats.consumer.ackWait }}"

- name: "limiter_enabled"
value: "{{ .Values.adaptiveConcurrency }}"
- name: "upstream_timeout"
value: "{{ .Values.upstreamTimeout }}"
- name: "max_retry_attempts"
Expand Down
3 changes: 3 additions & 0 deletions chart/queue-worker/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ replicas: 1
queueName: ""
mode: static
maxInflight: 1
# Enable adaptive concurrency limiting for functions.
# This setting only takes effect when mode is set to "function".
adaptiveConcurrency: true

queuePartitions: 1
partition: 0
Expand Down
Loading