finds.dev

kubernetes-sigs/controller-runtime

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

View on GitHub

★ 2,916GoApache-2.0updated Jun 2026

// the take

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.

We read the README, the directory tree and a key source file in June 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
2,916
Forks
1,283
Language
Go
License
Apache-2.0
Last commit
11 Jun 2026

// nearby

If controller-runtime isn't quite it.

All repos →