Allow cert contents in prometheus scrape config tls config #364
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
For context, on the Bosh team, we are trying to deploy a prometheus in our acceptance environment to try out providing our own metrics. (the bosh-exporter is cool, but very expensive to run, metrics provided directly by Bosh should be much cheaper). The bosh metrics endpoint is secured with mTLS and we need to give certs to the scrape config.
Thanks,
Charles
PR details:
Prometheus wants scrape_config tls_config to use file paths, but it is difficult
to directly put certificates on a vm while deploying with bosh.
If cert_contents are provided, the pre-start script will write the
contents into cert files that prometheus can use when it starts
Prometheus validates that there are not extra keys in its configuration,
so the extra cert contents keys need to be removed.
#169551239
Co-authored-by: Conor Nosal [email protected]