-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Enable user to understand when resource is reconciled #4655
Description
What problem are you facing?
After a claim/composition update, user is not able to figure out if the resource was reconciled. Monitoring sync and ready statuses is not helpful, if the update went well.
How could Crossplane help solve your problem?
It is considered as a good practice for k8s operators to emit object's metadata.generation in status.observedGeneration.
The field value is a sequence number representing a specific generation of the desired state. Set by the system and monotonically increasing, per-resource. It gets increased when object .spec changes. For example, at the first update, and before the claim got reconciled, user would see the following:
apiVersion: nop.example.org/v1alpha1
kind: NopResource
metadata:
name: claim
generation: 2
status:
observedGeneration: 1After the reconciliation, obeservedGeneration becomes 2. Hence, user is able to detect if the process takes too long or simply not moving forward.
In case of claims, given that their labels/annotations are propagated to the composite, it might be needed to add status.observedLabels and/or status.observedAnnotations as well, because generation value is not changed on metadata updates.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status