Skip to content

metadata.Generation of crds should change for annotations/labels #67428

@tamalsaha

Description

@tamalsaha

metadata.Generation field is "a sequence number representing a specific generation of the desired state."

We pass desired state information via labels and annotations for crd objects. Using annotations to pass desired information is fairly common in Kubernetes. We are also using labels to pass desired state for CRDs. For example, I have defined a crd for database objects. For a database crd, my controller creates a statefulset and service. I would like to pass any labels on my crd object to these offshot statefulset and service.

Currently metadata.Generation field for crds only changes when spec changes. #55168

/kind feature
/sig api-machinery
/area custom-resources

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/custom-resourceskind/featureCategorizes issue or PR as related to a new feature.lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.sig/api-machineryCategorizes an issue or PR as relevant to SIG API Machinery.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions