Skip to content

[281#3] feat: wire Crossplane default labels and user metadata into all CF resources#289

Closed
mpechkurov wants to merge 1 commit into
refactor/srb-metadata-migrationfrom
feat/metadata-wire-all-resources
Closed

[281#3] feat: wire Crossplane default labels and user metadata into all CF resources#289
mpechkurov wants to merge 1 commit into
refactor/srb-metadata-migrationfrom
feat/metadata-wire-all-resources

Conversation

@mpechkurov
Copy link
Copy Markdown
Collaborator

What

  • All 7 eligible resource Create/Update functions now call BuildMetadata, ensuring default Crossplane labels (crossplane-kind, crossplane-name, crossplane-providerconfig) and user-provided labels/annotations are included in CF API calls
  • All IsUpToDate functions now detect metadata drift using subset semantics
  • Observation functions read back labels/annotations from CF (closing the metadata loop)
  • Org gets LateInitialize for metadata (with StripDefaultLabels to avoid circular updates)
  • Remove stale Domain/Space update guards
  • Add SetLabels/SetAnnotations fake builders for testing
  • Add metadata.StripDefaultLabels helper

Why

Core delivery of #39. Every CF resource now gets crossplane-kind, crossplane-name, crossplane-providerconfig labels automatically and tracks user-defined metadata.

Part of

Split from #281 — PR 3 of 6 (core feature). Depends on [281#1] + [281#2].

Merge order: [281#1] → [281#2] → [281#3] → [281#4] → [281#5] → [281#6]

…sources

All 7 eligible resource Create/Update functions now call BuildMetadata,
ensuring default Crossplane labels (crossplane-kind, crossplane-name,
crossplane-providerconfig) and user-provided labels/annotations from
forProvider are included in CF API calls.

Key changes:
- All IsUpToDate functions now detect metadata drift (subset semantics)
- Observation functions read back labels/annotations from CF
- Org gets LateInitialize for metadata (with StripDefaultLabels)
- Remove stale Domain/Space update guards
- Add metadata.StripDefaultLabels helper
- Add SetLabels/SetAnnotations fake builders for testing
- Update controller tests for new metadata-aware behavior

Closes #39

[281#3]
@SatabdiG
Copy link
Copy Markdown
Collaborator

Closing as #281 received review comments.

@SatabdiG SatabdiG closed this May 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants