Skip to content

Commit 4e107ad

Browse files
committed
Add async options to Kafka connector chart
Fixes: openfaasltd/kafka-connector#62 Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
1 parent 8e5474e commit 4e107ad

File tree

10 files changed

+216
-177
lines changed

10 files changed

+216
-177
lines changed

chart/kafka-connector/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: v1
22
description: Connect OpenFaaS functions to Kafka topics
33
name: kafka-connector
4-
version: 0.4.0
4+
version: 0.4.1
55
sources:
66
- https://github.com/openfaas-incubator/kafka-connector
77
home: https://www.openfaas.com

chart/kafka-connector/README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,14 @@ Additional kafka-connector options in `values.yaml`.
4848

4949
| Parameter | Description | Default |
5050
| ------------------------ | -------------------------------------------------------------------------------------- | ------------------------------ |
51-
| `upstream_timeout` | Maximum timeout for upstream function call, must be a Go formatted duration string. | `30s` |
52-
| `rebuild_interval` | Interval for rebuilding function to topic map, must be a Go formatted duration string. | `3s` |
5351
| `topics` | Topics to which the connector will bind, provide as a comma-separated list. | `faas-request` |
54-
| `gateway_url` | The URL for the API gateway. | `http://gateway.openfaas:8080` |
55-
| `broker_host` | location of the Kafka brokers. | `kafka` |
56-
| `print_response` | Output the response of calling a function in the logs. | `true` |
57-
| `print_response_body` | Output to the logs the response body when calling a function. | `false` |
52+
| `brokerHost` | location of the Kafka brokers. | `kafka` |
53+
| `asyncInvocation` | For long running or slow functions, offload to asychronous function invocations and carry on processing the stream |
54+
| `upstreamTimeout` | Maximum timeout for upstream function call, must be a Go formatted duration string. | `30s` |
55+
| `rebuildInterval` | Interval for rebuilding function to topic map, must be a Go formatted duration string. | `3s` |
56+
| `gatewayURL` | The URL for the API gateway. | `http://gateway.openfaas:8080` |
57+
| `printResponse` | Output the response of calling a function in the logs. | `true` |
58+
| `printResponseBody` | Output to the logs the response body when calling a function. | `false` |
5859
| `fullnameOverride` | Override the name value used for the Connector Deployment object. | `` |
5960

6061
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`.

chart/kafka-connector/templates/deployment.yml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,28 +44,30 @@ spec:
4444
image: {{ .Values.image }}
4545
env:
4646
- name: gateway_url
47-
value: {{ .Values.gateway_url | quote }}
47+
value: {{ .Values.gatewayURL | quote }}
4848
- name: topics
4949
value: {{ .Values.topics | quote }}
5050
- name: print_response
51-
value: {{ .Values.print_response | quote }}
51+
value: {{ .Values.printResponse | quote }}
5252
- name: print_response_body
53-
value: {{ .Values.print_response_body | quote }}
54-
{{- if .Values.basic_auth }}
53+
value: {{ .Values.printResponseBody | quote }}
54+
- name: asynchronous_invocation
55+
value: {{ .Values.asyncInvocation | quote }}
56+
{{- if .Values.basicAuth }}
5557
- name: basic_auth
5658
value: "true"
5759
- name: secret_mount_path
5860
value: "/var/secrets"
5961
{{- end }}
6062
- name: broker_host
61-
value: {{ .Values.broker_host | quote }}
62-
{{- if .Values.upstream_timeout }}
63+
value: {{ .Values.brokerHost | quote }}
64+
{{- if .Values.upstreamTimeout }}
6365
- name: upstream_timeout
64-
value: {{ .Values.upstream_timeout | quote }}
66+
value: {{ .Values.upstreamTimeout | quote }}
6567
{{- end }}
66-
{{- if .Values.rebuild_interval }}
68+
{{- if .Values.rebuildInterval }}
6769
- name: rebuild_interval
68-
value: {{ .Values.rebuild_interval | quote }}
70+
value: {{ .Values.rebuildInterval | quote }}
6971
{{- end }}
7072
{{- if .Values.basic_auth }}
7173
volumeMounts:

chart/kafka-connector/values.yaml

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,26 @@
11
image: openfaas/kafka-connector:0.4.0
22
replicas: 1
3-
gateway_url: http://gateway.openfaas:8080
3+
4+
# Max timeout for a function
5+
upstreamTimeout: 2m
6+
7+
# Use with slow consumers or long running functions
8+
asyncInvocation: false
9+
10+
# Alter to the topics required
411
topics: faas-request
5-
print_response: true
6-
print_response_body: false
7-
broker_host: kafka:9092
8-
basic_auth: true
12+
13+
# Your Kafka broker
14+
brokerHost: kafka:9092
15+
16+
printResponse: true
17+
printResponseBody: false
18+
19+
# Internal gateway URL
20+
gatewayURL: http://gateway.openfaas:8080
21+
22+
# Basic auth for the gateway
23+
basicAuth: true
924

1025
nodeSelector: {}
1126

docs/cron-connector-0.3.1.tgz

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)