-
Notifications
You must be signed in to change notification settings - Fork 252
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
Add bearer token auth for loki #1224
Add bearer token auth for loki #1224
Conversation
I had to update the controller-gen version, otherwise the generation step would segfault. This caused a lot of changes. I am not sure how this should be handled. |
@raynay-r Thanks so much for you first contribution. But upgrade the contrller-gen version might not be a good practice for this MR. Can you please try to fix segfault? Feel free to share the problem you have when generating code here. Let us know the details so that we can help you. |
cc @wanjunlei |
Here is the output I get running
|
it's possible. Mine is 1.22.0, and it works well. |
Signed-off-by: rene <[email protected]>
3b6fb01
to
e11c855
Compare
Signed-off-by: rene <[email protected]>
Signed-off-by: rene <[email protected]>
e11c855
to
f11d4c1
Compare
@@ -19,11 +19,16 @@ type Loki struct { | |||
// +kubebuilder:validation:Minimum:=1 | |||
// +kubebuilder:validation:Maximum:=65535 | |||
Port *int32 `json:"port,omitempty"` | |||
// Specify a custom HTTP URI. It must start with forward slash. | |||
Uri string `json:"uri,omitempty"` |
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.
nit: is it better to use *string along with omitempty
here to make it consistent with other fields?
What this PR does / why we need it:
I was searching for an alternative of the openshift-logging-operator. None of the available operators supported bearer token authentication for the Loki output. Since bearer authentication is very useful together wiith Loki and the openshift oauth proxy I decided to make this contribution.
Which issue(s) this PR fixes:
Fixes #1221 (Not my ticket, by coincidence someone else seems to be missing this feature)
Does this PR introduced a user-facing change?
Additional documentation, usage docs, etc.: