gateway
gateway copied to clipboard
chore(installation): early validate presence of tag in `image` and `imageRepository`
PR https://github.com/envoyproxy/gateway/pull/6296 added support for customizing the EnvoyProxy image using the image and imageRepository fields. In summary:
- If users want to explicitly specify the image tag, they should use the format:
image: repo:tag. This has been the standard approach in all versions up to this PR. - If users prefer to define only the image repository and let Envoy Gateway decide the appropriate tag, they should use the format:
imageRepository: repo_url.
To ensure these fields are used correctly, it's helpful to validate the presence or absence of a tag depending on which field is set.
This PR improves the resolveProxyImage function by adding the following validations:
- If
imageRepositoryis set, it must not include a tag. - If
imageis set, it must include a valid tag.
Idea for more validation logic is appreciated.
Fixes #6350
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 70.82%. Comparing base (
9453572) to head (ba8b2f4). Report is 1 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #6354 +/- ##
==========================================
- Coverage 70.82% 70.82% -0.01%
==========================================
Files 220 220
Lines 37132 37132
==========================================
- Hits 26300 26299 -1
Misses 9293 9293
- Partials 1539 1540 +1
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
can this be solved with CEL ? so the user hit this error during apply and won't have to find the error in logs
can this be solved with CEL ? So the user hit this error during apply and won't have to find the error in logs
Updated with CEL validation
/retest
/retest