KubeVela ResourceTracker Pattern: How Self-Healing Works Without Watching Every Resource
Every Kubernetes operator answers the same question whenever a child resource changes: "which parent should I reconcile?" The usual answer is controller-runtime's .Owns() helper, which registers an Informer per child type, caches them, and reads the OwnerReference on each child to find its parent. That's fine when you know your child types up front. It stops being fine when your operator is a platform engine and users keep inventing new resource types.
KubeVela takes a different route. The Application controller doesn't watch Pods, Deployments, or Services at all. It watches three KubeVela CRDs and keeps a separate record — the ResourceTracker — that lists everything an Application is supposed to have created. This post covers why the design exists, how self-healing works without event-driven watches on children, what you can tune, and how the approach compares to plain client-go and controller-runtime.