-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Allow disabling brearer token override from request in metrics store #4726
Conversation
Signed-off-by: Pavol Loffay <[email protected]>
@@ -88,6 +89,8 @@ func (opt *Options) AddFlags(flagSet *flag.FlagSet) { | |||
"The period to wait for a connection to Prometheus when executing queries.") | |||
flagSet.String(nsConfig.namespace+suffixTokenFilePath, defaultTokenFilePath, | |||
"The path to a file containing the bearer token which will be included when executing queries against the Prometheus API.") | |||
flagSet.Bool(nsConfig.namespace+suffixOverrideFromContext, true, | |||
"Whether the bearer token should be overridden from context (incoming request)") |
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.
the phrasing is a bit confusing to me. In terms of functionality, it seems a priority list would be a more elegant solution that covers more use cases, e.g., e.g. --token-priority=context,file
or --token-priority=file
(the latter will achieve what this PR needs I think)
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.
The priority is not supported by our bearertoken
package
jaeger/pkg/bearertoken/transport.go
Line 42 in 4aa436b
if tr.OverrideFromCtx { |
I don't need the priority. I want to for the transport to always use the token regardless of what is in the context.
Signed-off-by: Pavol Loffay <[email protected]>
booked #4732 for flaky test |
Codecov ReportPatch coverage is
📢 Thoughts on this report? Let us know!. |
Relates to grafana/tempo-operator#526