Skip to content

Enable user to understand when resource is reconciled #4655

@pedjak

Description

@pedjak

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: 1

After 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

enhancementNew feature or requestexempt-from-staleroadmapIssues that have priority and are included in the roadmap, or are candidates to add to the roadmapuser experience

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions