how to create data bridge and rule in helm chart values.yaml #9208
-
I am using chart in version 5.0.8 to install emqx on k8s and I am using its data bridging feature, but it takes some time to configure it. I would like to be able to configure my settings as environment variables in the emqxConfig field in values.yaml. In my local environment, I used the following configuration, but I was never able to convert it to the correct yaml configuration. Are there any best practices for configuring k8s for deployment? Thanks! This is my emqx.conf
And this is in the emqxConfig of chart values.yaml EMQX_BRIDGES__MQTT__DEVICE_SESSION_BRIDGE__CONNECTOR__SERVER: "localhost:1885"
EMQX_BRIDGES__MQTT__DEVICE_SESSION_BRIDGE__CONNECTOR__USERNAME: "device-session"
EMQX_BRIDGES__MQTT__DEVICE_SESSION_BRIDGE__CONNECTOR__PASSWORD: "device-session"
EMQX_BRIDGES__MQTT__DEVICE_SESSION_BRIDGE__CONNECTOR__SSL__ENABLE: "true"
EMQX_BRIDGES__MQTT__DEVICE_SESSION_BRIDGE__DIRECTION: "egress"
EMQX_BRIDGES__MQTT__DEVICE_SESSION_BRIDGE__REMOTE_TOPIC: "device-session" EMQX_BRIDGES__MQTT__DEVICE_SESSION_BRIDGE__REMOTE_QOS: "1" EMQX_BRIDGES__MQTT__DEVICE_SESSION_BRIDGE__PAYLOAD: ""
EMQX_BRIDGES__MQTT__DEVICE_SESSION_BRIDGE__RETAIN: "false"
EMQX_RULE_ENGINE__RULES__DEVICE_SESSION__SQL: SELECT * FROM '$events/client_connected', '$events/client_disconnected'
EMQX_RULE_ENGINE__RULES__DEVICE_SESSION__ACTIONS:
- "mqtt:device_session_bridge" |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
My personal point is to use the emqx.conf directly will be more manageable and better |
Beta Was this translation helpful? Give feedback.
-
@vipa0120 If you haven't used Operator and only used Helm Chart, I think this would be helpful for you. This is work for me, you should reference this data-bridge to write this. emqxConfig:
EMQX_BRIDGES__MQTT__DEVICE_SESSION__ENABLE: "true"
EMQX_BRIDGES__MQTT__DEVICE_SESSION__SERVER: "other-mqtt-server:1883"
EMQX_BRIDGES__MQTT__DEVICE_SESSION__USERNAME: "device-session"
EMQX_BRIDGES__MQTT__DEVICE_SESSION__PASSWORD: "device-session"
EMQX_BRIDGES__MQTT__DEVICE_SESSION__CLEAN_START: "true"
EMQX_BRIDGES__MQTT__DEVICE_SESSION__EGRESS__REMOTE__TOPIC: "device-session"
EMQX_BRIDGES__MQTT__DEVICE_SESSION__EGRESS__REMOTE__QOS: "1"
EMQX_RULE_ENGINE__RULES__RULE_SESSION__ENABLE: "true"
EMQX_RULE_ENGINE__RULES__RULE_SESSION__SQL: SELECT * FROM '$events/client_connected', '$events/client_disconnected'
EMQX_RULE_ENGINE__RULES__RULE_SESSION__ACTIONS:
- "mqtt:device_session"
|
Beta Was this translation helpful? Give feedback.
-
@drunkcattt |
Beta Was this translation helpful? Give feedback.
@vipa0120 If you haven't used Operator and only used Helm Chart, I think this would be helpful for you.
This is work for me, you should reference this data-bridge to write this.