-
Notifications
You must be signed in to change notification settings - Fork 808
Allow passing credentials through env variables #308
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
Conversation
|
Hi, any chance this might be accepted and released soon? Thanks |
I know it is not ideal but if you're interested I made the Docker in my personal docker hub in the meantime: https://hub.docker.com/r/malletgu/elasticsearch-exporter/tags |
|
It would be really nice to have this one released soon. I am using K8 and I can not create dynamic env vars |
|
I was able to use this PR to get metrics from an ECK elasticsearch cluster. I can confirm that this works when specifying the URl (pointing to the kubernetes service) and setting the credentials through the variables. One thing to note is that I was not able to use the secret that ECK created directly with the helm/stable chart. The secret "key" is set to the user name and the value is the password. You can do something like the following though (maybe this needs to be a PR to the helm chart). |
|
Just stumbeled on this problem and this PR seems to solve it nicely! Waiting for merge... |
|
While this is convenient it's already possible to do this, see my comment on the issue. |
|
+1 to getting this functionality merged. Having to create a new secret and keep it synchronized is not as good as referencing the secret in an existing secret. Glad there is a workable workaround though. |
|
Actually, it looks like you can use to do the job... So the chart does work as is. Maybe an example might help? The configuration can be made to work as is, but its not very clear how to do it. |
|
+1 |
|
I would definitely encourage this being merged. The solution in the other case is fragile as it requires a strict ordering of multiple blocks of a helm chart interacting with its service. We can already see the example using As this utility/exporter is for only elastic, it makes sense to support the elastic authorization methods which includes username/password without having to code along with URI (which makes secret management but discoverability of remote connection) more difficult. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change allows setting the password on the command line as a flag. This is unsafe and we should not support this.
|
#461 is now merged. |
This MR will allow to inject credentials through environment variables. Also, if credentials are passed in the URI and as arguments, the arguments will overwrite the one in the URI