Crossplane · 02 of 04 · Readiness

Three layers, three ideas of "ready"

Crossplane owns Ready and Synced. Each composed resource reports health its own way, or not at all. Getting an honest answer to "is my database ready?" meant building a condition of my own on top.

Three layers, three ideas of "ready" Top row: a composition pipeline runs every reconcile. A render step (function-go-templating) feeds a ComponentReady step with closed reason codes, which feeds function-auto-ready, which rolls Ready up to the XR status, showing Ready, Synced and ComponentReady. Bottom row: composed resources whose observed state is read. A CloudNativePG Cluster has a Ready condition; a RabbitmqCluster has ClusterAvailable but no Ready; a Service or PVC has no conditions at all, a blind spot for auto-ready; a RepositoryFile has a Ready decided by its provider. COMPOSITION PIPELINE · EVERY RECONCILEWHAT YOU SEECOMPOSED RESOURCES · OBSERVED STATEREADYOBSERVEDRenderfunction-go-templatingComponentReadyclosed reason codesAuto-readyfunction-auto-readyXR statusReady · Synced · ComponentReadyCNPG Clusterhas a Ready conditionRabbitmqClusterClusterAvailable, no ReadyService · PVCno conditions at allRepositoryFilethe provider decides ReadyReady should mean someone could use it now. Every layer underneath has its own idea of what that means.LEGENDMy conditionStatusBlind spotObservesRolls up

Don't call it Ready

function-go-templating reserves Ready, Healthy and Synced and errors if you set them. My own condition is ComponentReady, with a closed list of reasons such as PostgreSQLDegraded or RedisReleaseFailed, so it never races Crossplane's.

Mark what can't report

A Service, a PVC or a ConfigMap has no status conditions, so auto-ready waits for them forever. The Dex component sat at "Creating" with its pod running until the function marked those resources ready itself.

Provider bugs look like readiness bugs

A RepositoryFile interrupted mid-create stayed Ready: False forever. The fix was in the provider, not the composition: a deterministic external name, patched in my fork.

Hangar · Airframe · Crossplane