justwatchcom / sql_exporter

Flexible SQL Exporter for Prometheus.
MIT License
403 stars 109 forks source link

ConfigMap with template strings #95

Open janisii opened 1 year ago

janisii commented 1 year ago

Hello, I would recommend to update README.md to add information that template strings can be used in ConfigMap for Kubernetes users, because at first I could not understand how to add password to ConfigMap in secure way.

Had to dig into source code to find out, that env variables can be used as template strings.

Template string in ConfigMap {{YOUR_SQL_PASS}} should match pod env variable YOUR_SQL_PASS: "secure-password" (secret).

dewey commented 10 months ago

Hey, yes currently that's only "documented" in the example config file. Happy to merge an addition to the README if someone wants to do that.