flyte / mqtt-io

Expose GPIO modules (Raspberry Pi, Beaglebone, PCF8754, PiFace2 etc.) and digital sensors (LM75 etc.) to an MQTT server for remote control and monitoring.
MIT License
461 stars 157 forks source link

Render Env Variables by Default #279

Open goshansp opened 1 year ago

goshansp commented 1 year ago

Current Situation for rendering env vars Rendering of environment variables via confp as documented in https://github.com/flyte/mqtt-io/issues/209#issuecomment-1189071246 requires an additional render-config file render.yaml as well as an additional parameter --render render.yaml for the invocation, in order to enabeling render of config variables like {{ env('MQTT_PASSWORD') }}.

Proposed Change Make the rendering of {{ env('MQTT_PASSWORD') }} from the config the default behaviour of mqtt-io. The parameter --render would remain untouched and still allow for custom rendering from other backends.

Open Question

Benefits This change would enable simple passing of env variables like secrets to mqtt-io. Passing of env variables is a security best practice and could be used for containers under podman or docker as well as in systemd units and the like. Env var passing allows for the separation of configuration and secrets and would enhance mqtt-io towards better usability.