-
Notifications
You must be signed in to change notification settings - Fork 256
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
✨ Remove kube-rbac-proxy and use controller run-time provided WithAuthenticationAndAuthorization filter instead #2102
✨ Remove kube-rbac-proxy and use controller run-time provided WithAuthenticationAndAuthorization filter instead #2102
Conversation
…er instead Short description: kube-rbac-proxy was historically used to protect the metrics endpoint. However, its usage has been discontinued in Kubebuilder. The default scaffold now leverages the WithAuthenticationAndAuthorization feature provided by Controller-Runtime. This change is trigerred from the fact that the image gcr.io/kubebuilder/kube-rbac-proxy is deprecated and will become unavailable sometime from early 2025. Fixes: metal3-io#2091 Signed-off-by: Kashif Khan <kashif.khan@est.tech>
/lgtm |
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.
/approve
For the release notes, I think we should document clearly the resources that have been deleted. Some users may use systems that automatically prune but others may need to do it manually. The resources are:
- ClusterRole: baremetal-operator-metrics-reader
- ClusterRole: baremetal-operator-proxy-role
- ClusterRoleBinding: baremetal-operator-proxy-rolebinding
- Service: baremetal-operator-controller-manager-metrics-service
/hold
Please add this to the description so it is picked up in the release notes. I wonder if we should also mark it as ✨
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: lentzi90 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Done |
Unhold? |
/hold cancel |
/cherry-pick release-0.8 |
@tuminoid: #2102 failed to apply on top of branch "release-0.8":
In response to this:
Instructions 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. |
@kashifest shall we do manual cherry-pick? 0.8 support extends beyond rbac-proxy deprecation period. |
Good point, I will push it. |
❗ Following resources have been removed as part of this PR: - ClusterRole: baremetal-operator-metrics-reader - ClusterRole: baremetal-operator-proxy-role - ClusterRoleBinding: baremetal-operator-proxy-rolebinding - Service: baremetal-operator-controller-manager-metrics-service Short description: kube-rbac-proxy was historically used to protect the metrics endpoint. However, its usage has been discontinued in Kubebuilder. The default scaffold now leverages the WithAuthenticationAndAuthorization feature provided by Controller-Runtime. This change is trigerred from the fact that the image gcr.io/kubebuilder/kube-rbac-proxy is deprecated and will become unavailable sometime from early 2025. Signed-off-by: Kashif Khan <kashif.khan@est.tech>
BMO manifests have removed kub-rbac-proxy due to deprecation. This PR adapts the e2e tests accordoingly. For reference: - metal3-io/baremetal-operator#2102 - metal3-io/baremetal-operator#2115 Signed-off-by: Kashif Khan <kashif.khan@est.tech>
BMO manifests have removed kub-rbac-proxy due to deprecation. This PR adapts the e2e tests accordoingly. For reference: - metal3-io/baremetal-operator#2102 - metal3-io/baremetal-operator#2115 Signed-off-by: Kashif Khan <kashif.khan@est.tech>
name: kube-rbac-proxy | ||
ports: | ||
- containerPort: 8443 | ||
name: https |
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.
Where are the RBAC roles now required for controller runtime?
I think you forgot those.
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.
Oh! @kashifest we need to test this and probably add some new RBAC
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.
Indeed! I have put a PR for that #2116, I haven't tested them yet but those seem to me the missing RBACs
metal3-io#2102 has introduced controller-runtime's WithAuthenticationAndAuthorization filter which also requires extra RBAC roles and role bindings for metrics authentication and authorization. This PR adds those. Signed-off-by: Kashif Khan <kashif.khan@est.tech>
metal3-io#2102 has introduced controller-runtime's WithAuthenticationAndAuthorization filter which also requires extra RBAC roles and role bindings for metrics authentication and authorization. This PR adds those. Signed-off-by: Kashif Khan <kashif.khan@est.tech>
metal3-io#2102 has introduced controller-runtime's WithAuthenticationAndAuthorization filter which also requires extra RBAC roles and role bindings for metrics authentication and authorization. This PR adds those. Signed-off-by: Kashif Khan <kashif.khan@est.tech>
metal3-io#2102 has introduced controller-runtime's WithAuthenticationAndAuthorization filter which also requires extra RBAC roles and role bindings for metrics authentication and authorization. This PR adds those. Signed-off-by: Kashif Khan <kashif.khan@est.tech>
metal3-io#2102 has introduced controller-runtime's WithAuthenticationAndAuthorization filter which also requires extra RBAC roles and role bindings for metrics authentication and authorization. This PR adds those. Signed-off-by: Kashif Khan <kashif.khan@est.tech>
metal3-io#2102 has introduced controller-runtime's WithAuthenticationAndAuthorization filter which also requires extra RBAC roles and role bindings for metrics authentication and authorization. This PR adds those. Signed-off-by: Kashif Khan <kashif.khan@est.tech>
metal3-io#2102 has introduced controller-runtime's WithAuthenticationAndAuthorization filter which also requires extra RBAC roles and role bindings for metrics authentication and authorization. This PR adds those. Signed-off-by: Kashif Khan <kashif.khan@est.tech>
metal3-io#2102 has introduced controller-runtime's WithAuthenticationAndAuthorization filter which also requires extra RBAC roles and role bindings for metrics authentication and authorization. This PR adds those. Signed-off-by: Kashif Khan <kashif.khan@est.tech>
metal3-io#2102 has introduced controller-runtime's WithAuthenticationAndAuthorization filter which also requires extra RBAC roles and role bindings for metrics authentication and authorization. This PR adds those. Signed-off-by: Kashif Khan <kashif.khan@est.tech>
❗ Following resources have been removed as part of this PR:
Short description: kube-rbac-proxy was historically used to protect the metrics endpoint. However, its usage has been discontinued in Kubebuilder. The default scaffold now leverages the WithAuthenticationAndAuthorization feature provided by Controller-Runtime. This change is trigerred from the fact that the image gcr.io/kubebuilder/kube-rbac-proxy is deprecated and will become unavailable sometime from early 2025.
Fixes: #2091