Skip to main content
This lesson demonstrates the reconciliation boundaries of a Kubernetes-style controller: it will recreate a missing child resource derived from a WebApp blueprint, but it does not automatically repair an existing child that has drifted from the blueprint. The steps below provide reproducible evidence for both behaviors by running the controller locally and performing targeted changes in the cluster. Observe controller logs
  • Start your local manager (for example, make run or your preferred controller run command).
  • Keep the logs visible so you can observe reconcile events while you perform the changes below.
Step 1 — Apply the namespace and WebApp blueprint
  • The WebApp resource is the blueprint. The controller should create the Deployment, Service, and ConfigMap from that spec.
Step 2 — Delete the Deployment (missing-child behavior)
  • Deleting the Deployment demonstrates that the reconciler will recreate missing children based on the WebApp blueprint.
Step 3 — Scale the existing Deployment to zero (in-place drift)
  • Scaling the existing Deployment to zero simulates spec drift while the child resource still exists. In this controller implementation, the reconciler creates missing children but does not patch existing children to match the blueprint. Therefore the controller will not change the replica count back to three when the Deployment exists but has been modified.
Step 4 — Delete the drifted Deployment and wait for recreation
  • Now delete the modified (drifted) Deployment. Because it becomes a missing child again, the controller will recreate it from the WebApp spec with three replicas, restoring the application’s baseline.
Summary table — behavior comparison
This demonstrates the controller’s reconciliation boundary: it heals missing child resources by recreating them from the blueprint, but it does not repair in-place drift of existing child resources (for example, it will not scale an existing Deployment back to the blueprint’s replica count).
If you need automatic correction of in-place drift (for example, enforcing replica counts, updating image fields, or reconciling any spec drift), extend the reconciler logic to compare and patch existing children to match the desired blueprint spec rather than only creating missing children.
Links and references

Watch Video