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.

ParameterDescriptionExample
topicA single topic for subscription, install broker once for each topicsample-topic/
brokerA TCP address or websocket for the MQTT broker subscriptiontcp://emitter:8080
clientIDAn ID to represent this clienttestgoid
upstream_timeoutMaximum timeout for function as (Golang duration)15s
rebuild_intervalInterval between rebuilding map of functions vs. topics (Golang duration)10s
authPasswordPassword for broker authentication""
asyncInvokeInvoke using function's asynchronous routefalse
basic_authBasic authentication for gateway enabledtrue
resourcesResources requests and limits configurationrequests.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.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartmqtt-connector is pinned at v0.4.7 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. 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