Skip to content

Enhance CRD check to detect CRDs in subcharts and all locations#587

Open
acornett21 wants to merge 1 commit into
redhat-certification:mainfrom
acornett21:enhance_crd_check
Open

Enhance CRD check to detect CRDs in subcharts and all locations#587
acornett21 wants to merge 1 commit into
redhat-certification:mainfrom
acornett21:enhance_crd_check

Conversation

@acornett21
Copy link
Copy Markdown
Contributor

@acornett21 acornett21 commented Apr 17, 2026

Summary

Enhanced the not-contains-crds check to comprehensively detect CustomResourceDefinitions across all possible chart locations:

  • Recursive subchart checking: Now detects CRDs in dependencies' /crds directories
  • Templates scanning: Detects CRDs placed in /templates directory
  • Root files scanning: Detects CRDs in chart root directory files
  • Quoted kind handling: Properly detects CRDs with quoted YAML values (kind: "CustomResourceDefinition")

Previously, the check only examined the main chart's /crds directory, missing CRDs in subcharts and alternative locations.

Testing

Unit Tests

Added 5 new test cases with corresponding test charts:

  • ✅ CRDs in /templates directory
  • ✅ CRDs in root directory files
  • ✅ CRDs in /charts subdirectory
  • ✅ CRDs in subchart /crds directory
  • ✅ CRDs with quoted kind values

All 7 total test cases pass (2 existing + 5 new).

Full Index Validation

Verified against the entire OpenShift Helm Charts index using scripts/verify-all-charts.sh:

  • Successfully detected CRDs in charts that previously passed incorrectly (e.g., iax-operator-crd-rh)
  • No false positives introduced
  • Enhanced detection correctly identifies all CRD patterns

🤖 Generated with Claude Code

@github-actions
Copy link
Copy Markdown

Thanks for your pull request!

A maintainer will review this pull request and trigger functional testing by adding the ok-to-test label.

This comment was auto-generated by GitHub Actions.

Copy link
Copy Markdown

@bcrochet bcrochet left a comment

Choose a reason for hiding this comment

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

/lgtm

@komish komish added the ok-to-test Used after code review to run E2E/integration tests. label Apr 24, 2026
@komish
Copy link
Copy Markdown
Member

komish commented Apr 30, 2026

@acornett21 You should be okay to rebase this now.

@github-actions github-actions Bot removed the ok-to-test Used after code review to run E2E/integration tests. label Apr 30, 2026
@komish komish added the ok-to-test Used after code review to run E2E/integration tests. label Apr 30, 2026
Signed-off-by: Adam D. Cornett <adc@redhat.com>
@acornett21 acornett21 force-pushed the enhance_crd_check branch from a358a4c to eda3533 Compare May 13, 2026 20:00
@github-actions github-actions Bot removed the ok-to-test Used after code review to run E2E/integration tests. label May 13, 2026
@acornett21 acornett21 changed the title enhancing crd check to disallow more permutations Enhance CRD check to detect CRDs in subcharts and all locations May 13, 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.

3 participants