A powerful and extensible framework for building Kubernetes controllers using controller-runtime. Transform your imperative controller logic into a declarative, step-based system that's easier to understand, test, and extend.
- Step-based Reconciliation: Break complex logic into manageable steps
- Declarative Resources: Builder pattern for resource and dependency management
- Type Safety: Full generic support for custom resources
- Minimal Migration: Works with existing Kubebuilder controllers
- Built-in Observability: Instrumentation, logging, and tracing
go get github.com/u-ctf/controller-fwkTransform your Kubebuilder controller with minimal changes:
func (r *TestReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
logger := logf.FromContext(ctx)
stepper := ctrlfwk.NewStepper(logger,
ctrlfwk.WithStep(ctrlfwk.NewFindControllerCustomResourceStep(r)),
ctrlfwk.WithStep(ctrlfwk.NewResolveDynamicDependenciesStep(r)),
ctrlfwk.WithStep(ctrlfwk.NewReconcileResourcesStep(r)),
ctrlfwk.WithStep(ctrlfwk.NewEndStep(r, ctrlfwk.SetReadyCondition(r))),
)
return stepper.Execute(ctx, req)
}📚 Visit our Wiki for comprehensive guides and documentation:
- Getting Started: Step-by-step tutorial
- Context: Resource management and concurrency
- Instrumentation: Observability and monitoring
- Issues: Bug Reports & Feature Requests
- Discussions: GitHub Discussions
- API Reference: pkg.go.dev
We welcome contributions! Please see our Contributing Guide for details.
Built with ❤️ by the U-CTF team