Skip to content

Commit

Permalink
Add MQTT authentication variables
Browse files Browse the repository at this point in the history
Signed-off-by: Kate Goldenring <[email protected]>
  • Loading branch information
kate-goldenring committed Nov 6, 2024
1 parent b781a2e commit 6fd308c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 4 additions & 2 deletions spin.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,16 @@ description = "Triggered by MQTT"
[variables]
mqtt_topic = { required = true }
mqtt_broker_uri = { required = true }
mqtt_username = { default = "" }
mqtt_password = { default = "" }
# sqlite_username = { required = true }
# sqlite_password = { required = true }

[application.trigger.mqtt]
# address = "mqtt://localhost:1883"
address = "{{ mqtt_broker_uri }}"
username = ""
password = ""
username = "{{ mqtt_username }}"
password = "{{ mqtt_password }}"
keep_alive_interval = "30" # seconds

[[trigger.mqtt]]
Expand Down
4 changes: 4 additions & 0 deletions spinkube/spinapp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ spec:
value: mqtt://emqx.default.svc.cluster.local:1883
- name: mqtt_topic
value: booth/+
- name: mqtt_username
value: ""
- name: mqtt_password
value: ""
# - name: sqlite_password
# value: password
# - name: sqlite_username
Expand Down

0 comments on commit 6fd308c

Please sign in to comment.