[ENHANCEMENT] Replace kube-rbac-proxy with controller-runtime built-in metrics auth#372
Draft
slashpai wants to merge 1 commit into
Draft
[ENHANCEMENT] Replace kube-rbac-proxy with controller-runtime built-in metrics auth#372slashpai wants to merge 1 commit into
slashpai wants to merge 1 commit into
Conversation
553504d to
22ac74b
Compare
Member
Author
|
cc @jgbernalp |
dougkirkley
approved these changes
Mar 23, 2026
Contributor
|
@slashpai it seems we need to update the branch |
7606111 to
60e0ed5
Compare
…n metrics auth Remove the kube-rbac-proxy sidecar and use controller-runtime's SecureServing and filters.WithAuthenticationAndAuthorization to serve the /metrics endpoint with TLS, TokenReview, and SubjectAccessReview checks directly from the manager. Unit tests verify buildMetricsServerOptions correctly sets SecureServing and FilterProvider based on the --metrics-secure flag. KUTTL e2e test asserts the deployment has no kube-rbac-proxy sidecar, the manager exposes port 8443 with correct args, and the expected RBAC resources exist. Signed-off-by: Jayapriya Pai <janantha@redhat.com> Fixes perses#341
60e0ed5 to
0446e70
Compare
jgbernalp
reviewed
Apr 10, 2026
| | `config` _[Datasource](#datasource)_ | config specifies the Perses datasource configuration | | Required: \{\} <br /> | | ||
| | `client` _[Client](#client)_ | client specifies authentication and TLS configuration for the datasource | | Optional: \{\} <br /> | | ||
| | `instanceSelector` _[LabelSelector](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.35/#labelselector-v1-meta)_ | instanceSelector selects Perses instances where this datasource will be created | | Optional: \{\} <br /> | | ||
| | `instanceSelector` _invalid type_ | instanceSelector selects Perses instances where this datasource will be created | | Optional: \{\} <br /> | |
Contributor
There was a problem hiding this comment.
Can we fix the actual valid type here?
jgbernalp
reviewed
Apr 10, 2026
| return | ||
| } | ||
| c.NextProtos = []string{"http/1.1"} | ||
| tlsOpts := []func(*tls.Config){} |
Contributor
There was a problem hiding this comment.
As the metrics endpoint can be secure now, how do we handle the certificates configuration? should we reuse the serving certs?
Member
Author
|
I will revisit this for next release, I need to test this little more |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Replace the kube-rbac-proxy sidecar with controller-runtime's built-in
SecureServing and FilterProvider for metrics endpoint authentication
and authorization, as recommended by Kubebuilder since v3.15.0.
Closes: #341
Type of change
FEATURE(non-breaking change which adds functionality)ENHANCEMENT(non-breaking change which improves existing functionality)BUGFIX(non-breaking change which fixes an issue)BREAKINGCHANGE(fix or feature that would cause existing functionality to not work as expected)DOC(documentation only)IGNORE(tooling, build system, CI, etc.)Verification
Checklist