weaveworks / common

Libraries used in multiple Weave projects
Other
129 stars 92 forks source link

Add ability to pass TLS certs and keys inline #294

Open fayzal-g opened 1 year ago

fayzal-g commented 1 year ago

With https://github.com/prometheus/exporter-toolkit/pull/158, it is now possible pass forward TLS certificates and keys inline as part of the TLSConfig for the Server.

This PR also extends the TLSConfig within Server.go to allow the TLS certificate, private key and client CAs to be passed inline as a string. The content of this string is expected to be exactly the as a file, a PEM-encoded sequence of bytes. All parameters are then passed forward to web.TLSConfig within prometheus/exporter-toolkit as before.