-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Validate networking annotations on RevisionTemplateSpec #16296
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
base: main
Are you sure you want to change the base?
Validate networking annotations on RevisionTemplateSpec #16296
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: linkvt The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #16296 +/- ##
=======================================
Coverage 80.10% 80.10%
=======================================
Files 215 215
Lines 13332 13333 +1
=======================================
+ Hits 10679 10680 +1
Misses 2294 2294
Partials 359 359 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Add validation to reject unknown networking.knative.dev/* annotations on the RevisionTemplate early at Service creation time, rather than failing silently when creating the ServerlessService.
627eb81 to
8bf896f
Compare
|
/retest |
|
Hi @linkvt! Some thoughts:
|
|
Hi @skonto , thanks for the review!
Let me know what you think, thanks! |
Fixes #13053
Proposed Changes
RevisionTemplateSpec.Validate()to reject unknownnetworking.knative.dev/*annotations early at Service creation timenetworking.ValidateAnnotations()from the networking package for consistency with SKS validationBackground
When users mistakenly place
networking.knative.dev/visibility: cluster-localas an annotation onspec.template.metadata.annotations(instead of as a label on the Service'smetadata.labels), the annotation propagates through Revision → PodAutoscaler → ServerlessService, where SKS validation rejects it. This caused services to silently get stuck in "Unknown" state with no clear error message.With this fix, users now get an immediate validation error:
Example of broken resource (click to expand)
Correct usage:
Release Note