fix: exclude test template images from images-are-certified check - #652
Conversation
The images-are-certified check now excludes images referenced in Helm test templates (templates/tests/ or helm.sh/hook: test annotated). Test images are not part of the application and should not require certification. Fixes redhat-certification#480 Co-authored-by: Cursor <cursoragent@cursor.com>
|
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. |
Verification SummaryThis fix addresses issue #480 which has been open since 2024. Root Cause: The Fix: Skip images that come from templates annotated with Testing:
Impact: Partners with Helm charts that include test hooks (a common best practice for chart validation) will no longer be blocked from certification due to uncertified test-only images like This has been a pain point for partners since 2024. Ready for review and merge. @komish @mgoerens |
Summary
The
images-are-certifiedcheck currently scans ALL rendered manifests for image references, including those in Helm test templates (templates/tests/). Test images are not part of the deployed application and should not be subject to certification requirements.This PR filters out test template images before performing certification checks. Test templates are identified by:
/tests/(standard Helm convention)helm.sh/hook: testannotation (any quoting style)Fixes
Resolves #480
Behavioral Change
Charts with test templates that reference uncertified images (e.g.
busybox, non-fully-qualified ImageStream references) will no longer fail theimages-are-certifiedcheck due to those test-only images.Testing
TestExcludeTestTemplates(5 scenarios) validating the filtering logicTestIsTestTemplate(7 scenarios) validating template identificationTestTemplateandTestImageCertifyexpectations to reflect the new behaviorinternal/...tests pass (the pre-existingTestSignedChartfailure inpkg/is unrelated)