-
Notifications
You must be signed in to change notification settings - Fork 691
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
Load config file from URL #1243
Conversation
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.
Thanks for submitting this! Would it be possible to include a flag allowing a user to skip TLS verification for the config file? I know some users of the exporter may have self-signed certificates in place, despite it not being best practice.
Something like this, with insecure_skip_verify
being passed to the NewResolver
function as a bool
parameter:
tr := &http.Transport{
TLSClientConfig: &tls.Config{InsecureSkipVerify: insecure_skip_verify},
}
client := &http.Client{Transport: tr}
_, err := client.Get(file)
Good point and it is good to have such a flag for testing purposes as well. I'll implement that. The flag should then be passed as an argument like:
Or somehow passed in as a prefix or suffix in the url? Like:
|
Yes, a boolean flag would be preferable here (assuming the flag library supports that type). |
Done, now its possible to skip TLS. |
Sure, feel free to add it in the readme if you like. One other thing: you'll need to sign-off the commit(s) in order to pass the CI DCO check. I can't recall if all commits need to be signed or just the last, but I'd assume the worst and sign all of them. Let me know if you need assistance with that. |
I'am not quite sure, should I use I have added the readme change directly online so the last commit is signed. |
Yes, the |
Hmm, the force push seems to have added other commits, and there's been a couple merge commits since then. |
Yes I have always synct the pr branch as soon as it was behind the prometheus-community:master. Shouldn't I have done that? 😬 sorry for that, and yes u should be able to push to the pr branch. Otherwise just write the rebase command I should use. |
Syncing it with the upstream I'll force-push to your master branch now in order to tidy the commits in this PR, once I've pushed have a review of the commits and let me know if you're happy with the result. If not I can revert the changes. |
Commits look alright now, though the DCO check is complaining again
|
yes my bad, I've used the wrong account last week to sign the commits 😐 I've done it again, but with the fork sync I've fu* up the commit timeline again. Could you help me with the rebase ? |
Signed-off-by: DiniFarb <andreas.vogt89@bluewin.ch>
Signed-off-by: DiniFarb <andreas.vogt89@bluewin.ch>
Signed-off-by: DiniFarb <andreas.vogt89@bluewin.ch>
Signed-off-by: DiniFarb <andreas.vogt89@bluewin.ch>
Signed-off-by: DiniFarb <andreas.vogt89@bluewin.ch>
Got it, the DCO check is happy now. Have a review of the commits and let me know if you're happy with them, then I'll get this merged. |
I am very sorry for the confusion I've created here and many thx for fixing all 😊 The commits are looking very good and clean to me now 👍🏼 |
It's fine, nothing to worry about. |
Load config file from URL
As requested in #1207 I've added support for loading the config file either from a directory or a URL.