finds.dev← search

// the find

kubernetes-sigs/controller-runtime

★ 2,916 · Go · Apache-2.0 · updated Jun 2026

Repo for the controller-runtime subproject of kubebuilder (sig-apimachinery)

controller-runtime is the foundational library behind both Kubebuilder and Operator SDK — if you're writing a Kubernetes operator in Go, you're either using this directly or through one of those two frameworks. It handles the manager, controller loop, cache, event handlers, and webhook scaffolding so you don't have to wire up client-go primitives by hand. Target audience is Go developers building production Kubernetes controllers.

The cache layer is genuinely well-designed: it sits in front of client-go informers and means most Get/List calls never hit the API server. The envtest package gives you a real API server + etcd for integration tests without a full cluster — this is the right way to test controllers and it's built in. The fake client in pkg/client/fake is actually useful for unit tests and handles server-side apply, which most fake clients get wrong. The priority queue addition (pkg/controller/priorityqueue) lets you prioritize reconcile work by object — useful when you have mixed-criticality resources sharing one controller.

Breaking changes between minor versions are explicitly allowed and keyed to k8s.io/* releases — if you're not tracking Kubernetes releases closely, you will get burned by an upgrade. The versioning constraint (one controller-runtime minor per k8s minor) means you can't pick up bug fixes without also picking up whatever client-go version ships with them. The Manager startup sequencing is subtle and poorly documented: cache sync races with Runnable startup have caused real production issues that are hard to reproduce. Multi-cluster support exists (pkg/cluster) but feels bolted on and the examples are minimal — if you're building a multi-cluster operator you'll hit sharp edges fast.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →