-
Notifications
You must be signed in to change notification settings - Fork 2k
Add resource reference validation function #8454
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a new validation helper function HasNamespace() to improve code readability when checking if resource references contain namespace prefixes. The function centralizes the logic for detecting the "/" separator that indicates a namespaced resource reference.
Key Changes:
- Added
HasNamespace()function in the validation package to check for namespace prefixes in resource references - Replaced all instances of
strings.Contains(x, "/")with calls toHasNamespace()across multiple files - Added comprehensive unit tests for the new validation function
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| internal/validation/validation.go | Introduces the new HasNamespace() helper function |
| internal/validation/validation_test.go | Adds unit tests covering various resource reference scenarios |
| internal/k8s/configuration.go | Refactors to use HasNamespace() for VirtualServerRoute namespace checking |
| internal/k8s/appprotectdos/app_protect_dos_configuration.go | Replaces inline namespace checks with HasNamespace() calls |
| internal/k8s/appprotectcommon/app_protect_common_resources.go | Updates resource reference parsing to use the new helper |
| internal/k8s/appprotect_waf.go | Refactors WAF policy reference validation to use HasNamespace() |
| internal/configs/virtualserver.go | Updates VirtualServer config generation to use the new validation helper |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8454 +/- ##
==========================================
- Coverage 53.95% 53.94% -0.02%
==========================================
Files 91 92 +1
Lines 18692 18692
==========================================
- Hits 10086 10084 -2
- Misses 8075 8077 +2
Partials 531 531 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
AlexFenlon
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like you got every usecase, nice!
Package ReportDetailsgcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-ingress:t-20cbc5c8b443e422e3b7592e37300c04, nginx, 1.29.4-1~trixie, amd64gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-ingress:t-20cbc5c8b443e422e3b7592e37300c04, nginx-module-njs, 1.29.4+0.9.4-1~trixie, amd64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-ingress:t-20cbc5c8b443e422e3b7592e37300c04, nginx-module-otel, 1.29.4+0.1.2-1~trixie, amd64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-ingress:t-20cbc5c8b443e422e3b7592e37300c04, nginx-agent, 3.6.2~trixie, amd64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-ingress:t-20cbc5c8b443e422e3b7592e37300c04, nginx, 1.29.4-1~trixie, arm64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-ingress:t-20cbc5c8b443e422e3b7592e37300c04, nginx-module-njs, 1.29.4+0.9.4-1~trixie, arm64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-ingress:t-20cbc5c8b443e422e3b7592e37300c04, nginx-module-otel, 1.29.4+0.1.2-1~trixie, arm64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-ingress:t-20cbc5c8b443e422e3b7592e37300c04, nginx-agent, 3.6.2~trixie, arm64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04, nginx-plus, 36-2~bookworm, amd64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04, nginx-plus-module-njs, 36+0.9.4-1~bookworm, amd64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04, nginx-plus-module-otel, 36+0.1.2-1~bookworm, amd64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04, nginx-plus-module-fips-check, 36+0.1-1~bookworm, amd64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04, nginx-agent, 3.6.2~bookworm, amd64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04, nginx-plus, 36-2~bookworm, arm64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04, nginx-plus-module-njs, 36+0.9.4-1~bookworm, arm64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04, nginx-plus-module-otel, 36+0.1.2-1~bookworm, arm64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04, nginx-plus-module-fips-check, 36+0.1-1~bookworm, arm64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04, nginx-agent, 3.6.2~bookworm, arm64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04, nginx-plus, 36-2~bookworm, amd64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04, nginx-plus-module-njs, 36+0.9.4-1~bookworm, amd64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04, nginx-plus-module-otel, 36+0.1.2-1~bookworm, amd64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04, nginx-plus-module-fips-check, 36+0.1-1~bookworm, amd64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04, nginx-plus-module-appprotect, 36+5.575.0-1~bookworm, amd64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04, app-protect, 36+5.575.0-1~bookworm, amd64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04, app-protect-attack-signatures, 2026.01.21-2~bookworm, amd64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04, app-protect-threat-campaigns, 2026.01.21-1~bookworm, amd64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04, nginx-agent, 2.45.1~bookworm, amd64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap-v5/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04, nginx-plus, 36-2~bookworm, amd64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap-v5/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04, nginx-plus-module-njs, 36+0.9.4-1~bookworm, amd64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap-v5/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04, nginx-plus-module-otel, 36+0.1.2-1~bookworm, amd64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap-v5/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04, nginx-plus-module-fips-check, 36+0.1-1~bookworm, amd64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap-v5/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04, nginx-plus-module-appprotect, 36+5.575.0-1~bookworm, amd64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap-v5/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04, app-protect-module-plus, 36+5.575.0-1~bookworm, amd64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap-v5/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04, app-protect-plugin, 6.25.0-1~bookworm, amd64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap-v5/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04, nginx-agent, 2.45.1~bookworm, amd64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04, nginx-plus, 36-2~bookworm, amd64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04, nginx-plus-module-njs, 36+0.9.4-1~bookworm, amd64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04, nginx-plus-module-otel, 36+0.1.2-1~bookworm, amd64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04, nginx-plus-module-fips-check, 36+0.1-1~bookworm, amd64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04, nginx-plus-module-appprotectdos, 36+4.8.3-1~bookworm, amd64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04, app-protect-dos, 36+4.8.3-1~bookworm, amd64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos-nap/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04, nginx-plus, 36-2~bookworm, amd64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos-nap/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04, nginx-plus-module-njs, 36+0.9.4-1~bookworm, amd64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos-nap/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04, nginx-plus-module-otel, 36+0.1.2-1~bookworm, amd64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos-nap/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04, nginx-plus-module-fips-check, 36+0.1-1~bookworm, amd64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos-nap/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04, nginx-plus-module-appprotect, 36+5.575.0-1~bookworm, amd64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos-nap/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04, app-protect, 36+5.575.0-1~bookworm, amd64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos-nap/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04, app-protect-attack-signatures, 2026.01.21-2~bookworm, amd64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos-nap/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04, app-protect-threat-campaigns, 2026.01.21-1~bookworm, amd64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos-nap/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04, nginx-plus-module-appprotectdos, 36+4.8.3-1~bookworm, amd64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos-nap/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04, app-protect-dos, 36+4.8.3-1~bookworm, amd64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos-nap/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04, nginx-agent, 2.45.1~bookworm, amd64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-ingress:t-20cbc5c8b443e422e3b7592e37300c04-alpine, nginx, 1.29.4-r1, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-ingress:t-20cbc5c8b443e422e3b7592e37300c04-alpine, nginx-module-njs, 1.29.4.0.9.4-r1, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-ingress:t-20cbc5c8b443e422e3b7592e37300c04-alpine, nginx-module-otel, 1.29.4.0.1.2-r1, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-ingress:t-20cbc5c8b443e422e3b7592e37300c04-alpine, nginx-agent, 3.6.2, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-ingress:t-20cbc5c8b443e422e3b7592e37300c04-alpine, nginx, 1.29.4-r1, aarch64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-ingress:t-20cbc5c8b443e422e3b7592e37300c04-alpine, nginx-module-njs, 1.29.4.0.9.4-r1, aarch64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-ingress:t-20cbc5c8b443e422e3b7592e37300c04-alpine, nginx-module-otel, 1.29.4.0.1.2-r1, aarch64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-ingress:t-20cbc5c8b443e422e3b7592e37300c04-alpine, nginx-agent, 3.6.2, aarch64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-alpine, nginx-plus, 36-r2, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-alpine, nginx-plus-module-njs, 36.0.9.4-r1, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-alpine, nginx-plus-module-otel, 36.0.1.2-r1, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-alpine, nginx-plus-module-fips-check, 36.0.1-r1, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-alpine, nginx-agent, 3.6.2, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-alpine, nginx-plus, 36-r2, aarch64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-alpine, nginx-plus-module-njs, 36.0.9.4-r1, aarch64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-alpine, nginx-plus-module-otel, 36.0.1.2-r1, aarch64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-alpine, nginx-plus-module-fips-check, 36.0.1-r1, aarch64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-alpine, nginx-agent, 3.6.2, aarch64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-alpine-fips, nginx-plus, 36-r2, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-alpine-fips, nginx-plus-module-njs, 36.0.9.4-r1, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-alpine-fips, nginx-plus-module-otel, 36.0.1.2-r1, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-alpine-fips, nginx-plus-module-fips-check, 36.0.1-r1, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-alpine-fips, nginx-agent, 3.6.2, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-alpine-fips, nginx-plus, 36-r2, aarch64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-alpine-fips, nginx-plus-module-njs, 36.0.9.4-r1, aarch64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-alpine-fips, nginx-plus-module-otel, 36.0.1.2-r1, aarch64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-alpine-fips, nginx-plus-module-fips-check, 36.0.1-r1, aarch64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-alpine-fips, nginx-agent, 3.6.2, aarch64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-alpine-fips, nginx-plus, 36-r2, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-alpine-fips, nginx-plus-module-njs, 36.0.9.4-r1, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-alpine-fips, nginx-plus-module-otel, 36.0.1.2-r1, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-alpine-fips, nginx-plus-module-fips-check, 36.0.1-r1, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-alpine-fips, nginx-agent, 2.45.1, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-alpine-fips, nginx-plus-module-appprotect, 36.5.575.0-r1, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-alpine-fips, app-protect, 36.5.575.0-r1, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-alpine-fips, app-protect-attack-signatures, 2026.01.21-r2, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-alpine-fips, app-protect-threat-campaigns, 2026.01.21-r1, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap-v5/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-alpine-fips, nginx-plus, 36-r2, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap-v5/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-alpine-fips, nginx-plus-module-njs, 36.0.9.4-r1, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap-v5/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-alpine-fips, nginx-plus-module-otel, 36.0.1.2-r1, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap-v5/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-alpine-fips, nginx-plus-module-fips-check, 36.0.1-r1, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap-v5/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-alpine-fips, nginx-agent, 2.45.1, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap-v5/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-alpine-fips, nginx-plus-module-appprotect, 36.5.575.0-r1, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap-v5/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-alpine-fips, app-protect-module-plus, 36.5.575.0-r1, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap-v5/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-alpine-fips, app-protect-plugin, 6.25.0-r1, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-ingress:t-20cbc5c8b443e422e3b7592e37300c04-ubi, nginx, 1.29.4-1.el9.ngx, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-ingress:t-20cbc5c8b443e422e3b7592e37300c04-ubi, nginx-module-njs, 1.29.4+0.9.5-1.el9.ngx, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-ingress:t-20cbc5c8b443e422e3b7592e37300c04-ubi, nginx-module-otel, 1.29.4+0.1.2-1.el9.ngx, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-ingress:t-20cbc5c8b443e422e3b7592e37300c04-ubi, nginx-agent, 3.6.2-1, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-ingress:t-20cbc5c8b443e422e3b7592e37300c04-ubi, nginx, 1.29.4-1.el9.ngx, aarch64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-ingress:t-20cbc5c8b443e422e3b7592e37300c04-ubi, nginx-module-njs, 1.29.4+0.9.5-1.el9.ngx, aarch64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-ingress:t-20cbc5c8b443e422e3b7592e37300c04-ubi, nginx-module-otel, 1.29.4+0.1.2-1.el9.ngx, aarch64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-ingress:t-20cbc5c8b443e422e3b7592e37300c04-ubi, nginx-agent, 3.6.2-1, aarch64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-ubi, nginx-plus, 36-2.el9.ngx, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-ubi, nginx-plus-module-njs, 36+0.9.4-1.el9.ngx, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-ubi, nginx-plus-module-otel, 36+0.1.2-1.el9.ngx, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-ubi, nginx-plus-module-fips-check, 36+0.1-1.el9.ngx, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-ubi, nginx-agent, 3.6.2-1, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-ubi, nginx-plus, 36-2.el9.ngx, aarch64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-ubi, nginx-plus-module-njs, 36+0.9.4-1.el9.ngx, aarch64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-ubi, nginx-plus-module-otel, 36+0.1.2-1.el9.ngx, aarch64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-ubi, nginx-plus-module-fips-check, 36+0.1-1.el9.ngx, aarch64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-ubi, nginx-agent, 3.6.2-1, aarch64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-ubi, nginx-plus, 36-2.el9.ngx, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-ubi, nginx-plus-module-njs, 36+0.9.4-1.el9.ngx, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-ubi, nginx-plus-module-otel, 36+0.1.2-1.el9.ngx, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-ubi, nginx-plus-module-fips-check, 36+0.1-1.el9.ngx, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-ubi, nginx-agent, 2.45.1-1, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-ubi, nginx-plus-module-appprotect, 36+5.575.0-1.el9.ngx, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-ubi, app-protect, 36+5.575.0-1.el9.ngx, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-ubi, app-protect-attack-signatures, 2026.01.21-2.el9.ngx, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-ubi, app-protect-threat-campaigns, 2026.01.21-1.el9.ngx, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap-v5/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-ubi, nginx-plus, 36-2.el9.ngx, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap-v5/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-ubi, nginx-plus-module-njs, 36+0.9.4-1.el9.ngx, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap-v5/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-ubi, nginx-plus-module-otel, 36+0.1.2-1.el9.ngx, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap-v5/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-ubi, nginx-plus-module-fips-check, 36+0.1-1.el9.ngx, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap-v5/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-ubi, nginx-agent, 2.45.1-1, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap-v5/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-ubi, nginx-plus-module-appprotect, 36+5.575.0-1.el9.ngx, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap-v5/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-ubi, app-protect-module-plus, 36+5.575.0-1.el9.ngx, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap-v5/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-ubi, app-protect-plugin, 6.25.0-1.el9.ngx, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-ubi8, nginx-plus, 36-2.el8.ngx, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-ubi8, nginx-plus-module-njs, 36+0.9.4-1.el8.ngx, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-ubi8, nginx-plus-module-otel, 36+0.1.2-1.el8.ngx, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-ubi8, nginx-plus-module-fips-check, 36+0.1-1.el8.ngx, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-ubi8, nginx-agent, 2.45.1-1, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-ubi8, nginx-plus-module-appprotect, 36+5.575.0-1.el8.ngx, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-ubi8, app-protect, 36+5.575.0-1.el8.ngx, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-ubi8, app-protect-attack-signatures, 2026.01.21-2.el8.ngx, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-ubi8, app-protect-threat-campaigns, 2026.01.21-1.el8.ngx, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap-v5/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-ubi8, nginx-plus, 36-2.el8.ngx, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap-v5/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-ubi8, nginx-plus-module-njs, 36+0.9.4-1.el8.ngx, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap-v5/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-ubi8, nginx-plus-module-otel, 36+0.1.2-1.el8.ngx, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap-v5/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-ubi8, nginx-plus-module-fips-check, 36+0.1-1.el8.ngx, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap-v5/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-ubi8, nginx-agent, 2.45.1-1, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap-v5/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-ubi8, nginx-plus-module-appprotect, 36+5.575.0-1.el8.ngx, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap-v5/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-ubi8, app-protect-module-plus, 36+5.575.0-1.el8.ngx, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap-v5/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-ubi8, app-protect-plugin, 6.25.0-1.el8.ngx, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-ubi, nginx-plus, 36-2.el9.ngx, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-ubi, nginx-plus-module-njs, 36+0.9.4-1.el9.ngx, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-ubi, nginx-plus-module-otel, 36+0.1.2-1.el9.ngx, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-ubi, nginx-plus-module-fips-check, 36+0.1-1.el9.ngx, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-ubi, nginx-plus-module-appprotectdos, 36+4.8.3-1.el9.ngx, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-ubi, app-protect-dos, 36+4.8.3-1.el9.ngx, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos-nap/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-ubi, nginx-plus, 36-2.el9.ngx, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos-nap/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-ubi, nginx-plus-module-njs, 36+0.9.4-1.el9.ngx, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos-nap/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-ubi, nginx-plus-module-otel, 36+0.1.2-1.el9.ngx, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos-nap/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-ubi, nginx-plus-module-fips-check, 36+0.1-1.el9.ngx, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos-nap/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-ubi, nginx-plus-module-appprotect, 36+5.575.0-1.el9.ngx, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos-nap/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-ubi, nginx-plus-module-appprotectdos, 36+4.8.3-1.el9.ngx, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos-nap/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-ubi, nginx-agent, 2.45.1-1, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos-nap/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-ubi, app-protect, 36+5.575.0-1.el9.ngx, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos-nap/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-ubi, app-protect-attack-signatures, 2026.01.21-2.el9.ngx, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos-nap/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-ubi, app-protect-threat-campaigns, 2026.01.21-1.el9.ngx, x86_64 gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos-nap/nginx-plus-ingress:t-20cbc5c8b443e422e3b7592e37300c04-ubi, app-protect-dos, 36+4.8.3-1.el9.ngx, x86_64 |
|
This function might be better located in a util go file than in a validation.go, as it looks more like a helper function that abstracts logic than one that returns an error for invalid configs. |
Moving this to the |
|
does this needs more changes due to foreign namespace support in upstreams now? |
5f4c366 to
f5d257c
Compare
javorszky
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a few questions and observations.
Also the nsutils.ParseNamespaceName is very similar to the cache.SplitMetaNamespaceKey function, though the latter has graceful fallback if the argument doesn't have a namespace
Does this mean you want me to refactor all places where |
Not necessarily. If we can reuse the same function, that's awesome. If there's a good reason for keeping a hard fail in the Personally I am leaning towards reuse when possible. |
Proposed changes
Add a function that checks if a resource reference has a namespace prefix. This make the code more readable at a glance.
Checklist
Before creating a PR, run through this checklist and mark each as complete.