kro checks every ResourceGraphDefinition statically before it becomes active. If an expression like ${schema.spec.maxNotes} returns a number where a string is required, kro rejects the RGD – the GraphAccepted condition names the field, the expression and the types.
Symptom
kubectl apply -f settings-rgd.yaml kubectl get rgd notes-settings resourcegraphdefinition.kro.run/notes-settings configured NAME APIVERSION KIND STATE READY AGE notes-settings v1alpha1 NotesSettings Inactive False 38s
STATE Inactive, READY False – kubectl get says nothing more.
Diagnosis
The GraphAccepted condition gives the reason.
kubectl get rgd notes-settings \
-o jsonpath='{.status.conditions[?(@.type=="GraphAccepted")].message}{"\n"}'
failed to validate resource "config": type mismatch in resource "config" at path
"data.maxNotes": expression "schema.spec.maxNotes" returns type "int" but expected
"string": type kind mismatch: got "int", expected "string"
Causes
ConfigMap dataConfigMap values are always strings
maxNotes is a number in the schema. A ConfigMap's data may only hold strings – kro checks the types statically and rejects the RGD.
InactiveThe RGD becomes inactive, instances stay untouched
The static check fails before any instance notices. Existing instances keep running with the old state.
Fix
maxNotes: ${string(schema.spec.maxNotes)}
kubectl apply -f settings-rgd.yaml
kubectl get rgd notes-settings
Don't: Changing the field in the schema to string just to pass the check. Then you lose the number validation (minimum, maximum) for all users.
kro hands-on, day 3: CEL expressions, types, branching and the three typical errors of the static check.
Go to day 3 →
FAQ
Do running instances notice anything?
No. The check fails when the RGD is applied; instances keep working with the last valid state.
Which other errors does the static check report?
Typos in field names (undefined field), unknown API versions (schema not found) and cycles between objects (graph contains a cycle).