Closed pracucci closed 3 weeks ago
@SuperQ @ArthurSens any objections?
I'm going to proceed with the merge as exposing things public is most of the time uncontroversial, but do let me know if there's anything that needs addressing. I've checked Prometheus and the Alertmanger - and these aren't conflicting.
Nice! this was also breaking Thanos: https://github.com/prometheus/common/pull/538#issuecomment-2150596862
Actually thanos also need the FileSecret to be exposed: =/
https://github.com/prometheus/common/pull/572 broke the vendoring in Mimir, where we have an use case calling
NewBasicAuthRoundTripper()
. The problem is that thesecret
interface is private, but it's used in publicly exposed functions likeNewBasicAuthRoundTripper()
.In this PR I propose to expose
secret
asSecretReader
(we already havetype Secret string
) and to also exposeInlineSecret
given passing a const secret is a common use case.