mqtt-connector
by Helm
Helm chartv0.4.7
Connect OpenFaaS functions to MQTT topics
About this chart
OpenFaaS MQTT Connector chart
See also mqtt-connector README
Installation
git clone https://github.com/faas-netes/
cd faas-netes/chart
# Template and apply:
helm template -n openfaas --namespace openfaas mqtt-connector/ | kubectl apply -f -
You can watch the Connector logs to see it invoke your functions:
kubectl logs deployment.apps/openfaas-mqtt-connector -n openfaas -f
Configuration
Configure via values.yaml.
| Parameter | Description | Example |
|---|---|---|
topic | A single topic for subscription, install broker once for each topic | sample-topic/ |
broker | A TCP address or websocket for the MQTT broker subscription | tcp://emitter:8080 |
clientID | An ID to represent this client | testgoid |
upstream_timeout | Maximum timeout for function as (Golang duration) | 15s |
rebuild_interval | Interval between rebuilding map of functions vs. topics (Golang duration) | 10s |
authPassword | Password for broker authentication | "" |
asyncInvoke | Invoke using function's asynchronous route | false |
basic_auth | Basic authentication for gateway enabled | true |
resources | Resources requests and limits configuration | requests.memory: "64Mi" |
Deploy mqtt-connector with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has mqtt-connector on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartmqtt-connector is pinned at v0.4.7 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply