Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for reading mqtt password from file #118

Merged
merged 3 commits into from
Jan 30, 2023

Conversation

mvadu
Copy link
Contributor

@mvadu mvadu commented Jan 25, 2023

This PR adds support for reading the password from a secret file. Usually if the base image has a shell, we can modify the entry point to a shell and create the environment variable, (e.g. /bin/sh -c export MQTT2PROM_MQTT_PASSWORD=$$(cat /var/run/secrets/mqtt-credential); /mqtt2prometheus) but with a distroless base image we don't have that option.
Fixes #117

Copy link
Owner

@hikhvar hikhvar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution. I like it! Please rename the flag, and fix the logical error.

cmd/mqtt2prometheus.go Outdated Show resolved Hide resolved
cmd/mqtt2prometheus.go Outdated Show resolved Hide resolved
@mvadu
Copy link
Contributor Author

mvadu commented Jan 30, 2023

Thank you for your contribution. I like it! Please rename the flag, and fix the logical error.

Hi @hikhvar pushed a new commit with both comments handled. Can you pls take a look?

@mvadu
Copy link
Contributor Author

mvadu commented Jan 30, 2023

@hikhvar not sure if you follow certain release schedule, and merge PRs just before master build. But wanted to remind you that this PR is in approved state, but not yet merged with master, and I can't pull new image in my deployment until you do :)

@hikhvar hikhvar merged commit ed0c8bd into hikhvar:master Jan 30, 2023
@mvadu mvadu deleted the add-secret-support branch January 30, 2023 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for reading credentials from secrets
2 participants