Skip to content

Conversation

il-kyun
Copy link
Contributor

@il-kyun il-kyun commented Jul 25, 2025

Description

This PR implements support for @Annotations and @Labels annotations in the CRD generator, addressing issue #7092.

Previously, when using @Annotations and @Labels annotations on CustomResource classes, these metadata were not included in the generated CRD files. This implementation ensures that annotations and labels specified via these annotations are properly included in the CRD metadata.

Related docs

Testing

All tests pass successfully:

  • CustomResourceInfoTest#shouldIncludeAnnotationsAndLabelsInCustomResourceInfo
  • CRDGeneratorTest#shouldIncludeClassAnnotationsAndLabelsInGeneratedCRD

Fixes

Fixes #7092

Type of change

  • Feature (non-breaking change which adds functionality)

Checklist

  • Code contributed by me aligns with current project license: Apache 2.0
  • I Added CHANGELOG entry regarding this change
  • I have implemented unit tests to cover my changes
  • I have added/updated the javadocs and other documentation accordingly
  • No new bugs, code smells, etc. in SonarCloud report

@il-kyun il-kyun changed the title feat(crd-generator): Add support for @Annotations and @Labels in CRD generation fix(crd-generator): Add support for @Annotations and @Labels in CRD generation Jul 25, 2025
@il-kyun il-kyun marked this pull request as ready for review July 25, 2025 20:29
Copy link
Contributor

@shawkins shawkins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you @il-kyun

@manusa manusa changed the title fix(crd-generator): Add support for @Annotations and @Labels in CRD generation feat(crd-generator): add support for @Annotations and @Labels in CRD generation Jul 30, 2025
Signed-off-by: Marc Nuri <[email protected]>
@manusa manusa added this to the 7.4.0 milestone Jul 30, 2025 — with automated-tasks
Copy link
Member

@manusa manusa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thx!

@manusa manusa merged commit 7f3fa3e into fabric8io:main Jul 30, 2025
27 of 35 checks passed
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.

I’m curious why the CRD Generator doesn’t include an implementation for metadata.annotations and labels
3 participants