fix: Replace deprecated kube-rbac-proxy with built-in metrics auth#285
fix: Replace deprecated kube-rbac-proxy with built-in metrics auth#285IrvingMg wants to merge 1 commit intoshipwright-io:mainfrom
Conversation
0f4687a to
f14cd66
Compare
|
/cc @hasanawad94 |
|
/hold We are going to merge #283 first, since this swaps the rbac-proxy-image with its new location. |
|
any update on this? @IrvingMg |
Signed-off-by: Irving Mondragón <mirvingr@gmail.com>
f14cd66 to
275582a
Compare
This PR is on hold pending release 0.19, but it’s ready for review in the meantime. I’d appreciate any feedback. |
|
@adambkaplan, since v0.19 has already been released, can we move forward with this PR? |
adambkaplan
left a comment
There was a problem hiding this comment.
/approve
I'd like to have some clarification on enabling HTTP2.
Unfortunately we don't have a "real" operator e2e test suite - we have at best a "smoke test" in our CI that vaidates we can deploy the operator. I'd love to see this refined further to validate Prometheus metrics actually work (and this change doesn't break current behavior).
| flag.BoolVar(&enableHTTP2, "enable-http2", false, | ||
| "If set, HTTP/2 will be enabled for the metrics and webhook servers.") |
There was a problem hiding this comment.
Shouldn't we default to HTTP2 enabled?
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: adambkaplan The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
PR needs rebase. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Changes
Replaced the
kube-rbac-proxysidecar (the image is no longer available) with controller-runtime's built-in metrics authentication and authorization (filters.WithAuthenticationAndAuthorization).Key changes:
main.go: The metrics endpoint is now served directly on :8443 with TLS and authn/authz; no sidecar is needed.config/default/manager_auth_proxy_patch.yaml: Deleted (this previously injected the sidecar).config/rbac/auth_proxy_role.yamlandauth_proxy_role_binding.yaml: Deleted (permissions moved to Kubebuilder markers and auto-generated intorole.yaml).config/manager/manager.yaml: Added the metrics port and bind address (previously injected by the sidecar patch).Verification:
/kind bug
/kind cleanup
Fixes #284
Submitter Checklist
See the contributor guide
for details on coding conventions, github and prow interactions, and the code review process.
Release Notes