hyperledger-labs / hyperledger-labs/fabric-operator

:warning: Action Required: Replace Deprecated gcr.io/kubebuilder/kube-rbac-proxy

Open
#210 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
78
Forks
47
Avg merge
1h 24m
Merged PRs (30d)
3

Description

This issue was raised because we found the image`gcr.io/kubebuilder/kube-rbac-proxy`in the files of this repository.

## Description

:warning: **The image `gcr.io/kubebuilder/kube-rbac-proxy` is deprecated and will become unavailable.**
**You must move as soon as possible, sometime from early 2025, the GCR will go away.**

> _Unfortunately, we're unable to provide any guarantees regarding timelines or potential extensions at this time. Images provided under GRC will be unavailable from March 18, 2025, [as per announcement](https://cloud.google.com/artifact-registry/docs/transition/transition-from-gcr). However, `gcr.io/kubebuilder/` may be unavailable before this date due [to efforts to deprecate infrastructure](https://github.com/kubernetes/k8s.io/issues/2647)._

If your project is using `gcr.io/kubebuilder/kube-rbac-proxy`, it may fail to work when the image can no longer be pulled. If not, nothing is required, and you can close this issue.

## Using the image `gcr.io/kubebuilder/kube-rbac-proxy`?

[kube-rbac-proxy](https://github.com/brancz/kube-rbac-proxy) was historically used to protect the metrics endpoint. However, its usage has been discontinued in [Kubebuilder](https://github.com/kubernetes-sigs/kubebuilder). The default scaffold now leverages the [`WithAuthenticationAndAuthorization`](https://pkg.go.dev/sigs.k8s.io/controller-runtime/pkg/metrics/filters#WithAuthenticationAndAuthorization) feature provided by [Controller-Runtime](https://github.com/kubernetes-sigs/controller-runtime).

This feature provides integrated support for securing metrics endpoints by embedding authentication (`authn`) and authorization (`authz`) mechanisms directly into the controller manager's metrics server, replacing the need for (https://github.com/brancz/kube-rbac-proxy) to secure metrics endpoints.

### What To Do?

**You must replace the deprecated image `gcr.io/kubebuilder/kube-rbac-proxy` with an alternative approach. For example:**
- Update your project to use [`WithAuthenticationAndAuthorization`](https://pkg.go.dev/sigs.k8s.io/controller-runtime/pkg/metrics/filters#WithAuthenticationAndAuthorization):
> _You can fully upgrade your project to use the latest scaffolding provided by the upstream versions of [Operator-SDK](https://github.com/operator-framework/operator-sdk) or [Kubebuilder](https://github.com/kubernetes-sigs/kubebuilder) tools or manually make the necessary changes. Refer to the [FAQ and Discussion](https://github.com/kubernetes-sigs/kubebuilder/discussions/3907) or [migration guide](https://github.com/operator-framework/operator-sdk/blob/master/doc/migration/v0.19.0-migration-guide.md) for detailed instructions on how to manually update your project and test the changes._

- Alternatively, replace the image with another trusted source at your own risk, as its usage has been discontinued in Kubebuilder.

> :bulb: The section `How can I manually change my project to switch to Controller-Runtime's built-in auth protection?` at [FAQ](https://github.com/kubernetes-sigs/kubebuilder/discussions/3907) provides guidance on how to manually update your projects and test it out.

### For further information, suggestions, and guidance:

- 📖 [FAQ and Discussion](https://github.com/kubernetes-sigs/kubebuilder/discussions/3907)
- 💬 Join the Slack channel: [#kubebuilder](https://communityinviter.com/apps/kubernetes/community#kubebuilder).

> **NOTE:** _This issue was opened automatically as part of our efforts to identify projects that might be affected and to raise awareness about this change within the community. If your project is no longer using this image, **feel free to close this issue**._

We sincerely apologize for any inconvenience this may cause.

**Thank you for your cooperation and understanding!** :pray:

Contributor guide

Open the contributing guide

Research direction

Search the repository for gcr.io/kubebuilder/kube-rbac-proxy and inspect each matching manifest or metrics setup. Read the linked FAQ and migration guidance for Controller-Runtime's WithAuthenticationAndAuthorization, then verify the deprecated image is no longer used and test the updated metrics protection.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes
Domain
devops, infrastructure
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.