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

Support data source configuration outside of sql_exporter.yml #7

Open
marcinbudny opened this issue Feb 12, 2018 · 2 comments
Open

Comments

@marcinbudny
Copy link

Instead of specifying the data_source_name directly in sql_exporter.yml, provide an option to point to external file or environment variable, that contains the data source config.

Use case: I want to store the credentials to the database securely in a Kubernetes secret, while the sql_exporter.yml would be a Kubernetes config map. There is no easy way to interpolate the secret into the config map. But if I was able to point to an external file on env variable, the problem would be solved.

free added a commit that referenced this issue May 14, 2018
free added a commit that referenced this issue May 14, 2018
Add a config.data-source-name flag, as requested in issue #7
@free
Copy link
Owner

free commented May 14, 2018

Done. With apologies for not even replying until now.

There exists now a flag, config.data-source-name, which will override the value of target.data_source_name, as defined in the configuration file. Note that you still need to provide a non-empty value for target.data_source_name in the configuration file, if only for documentation purposes.

@marcinbudny
Copy link
Author

Thanks!

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

No branches or pull requests

2 participants