File tree Expand file tree Collapse file tree 6 files changed +33
-12
lines changed
knative.dev/serving/pkg/apis/serving Expand file tree Collapse file tree 6 files changed +33
-12
lines changed Original file line number Diff line number Diff line change @@ -14,8 +14,8 @@ require (
1414 k8s.io/client-go v0.34.3
1515 k8s.io/code-generator v0.34.3
1616 knative.dev/hack v0.0.0-20251126013634-1484a9e9b641
17- knative.dev/pkg v0.0.0-20251216153728-9c8140b780d1
18- knative.dev/serving v0.47.1-0.20251216154926-fcb2e4d0f74b
17+ knative.dev/pkg v0.0.0-20251217214024-80c8bc434670
18+ knative.dev/serving v0.47.1-0.20251218010245-2b621899e32e
1919)
2020
2121require (
@@ -98,7 +98,7 @@ require (
9898 k8s.io/klog/v2 v2.130.1 // indirect
9999 k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b // indirect
100100 k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 // indirect
101- knative.dev/networking v0.0.0-20251127155419-5082b02af8c1 // indirect
101+ knative.dev/networking v0.0.0-20251216133826-9b53ca077e6a // indirect
102102 sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect
103103 sigs.k8s.io/randfill v1.0.0 // indirect
104104 sigs.k8s.io/structured-merge-diff/v6 v6.3.0 // indirect
Original file line number Diff line number Diff line change @@ -261,12 +261,12 @@ k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 h1:hwvWFiBzdWw1FhfY1FooPn3kzWuJ8
261261k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 /go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0 =
262262knative.dev/hack v0.0.0-20251126013634-1484a9e9b641 h1:N9Xqx3YLUNFN1WIc3UXTanK4je8VMQ36ZnAmECSsloc =
263263knative.dev/hack v0.0.0-20251126013634-1484a9e9b641 /go.mod h1:L5RzHgbvam0u8QFHfzCX6MKxu/a/gIGEdaRBqNiVbl0 =
264- knative.dev/networking v0.0.0-20251127155419-5082b02af8c1 h1:cZToEK7gp9ZQP+De14NFjt6874PdsrH7DH1DPxjCKVc =
265- knative.dev/networking v0.0.0-20251127155419-5082b02af8c1 /go.mod h1:nxN+sYiQCoT2FLgSMTShXYmYYcb7rALHSOz6l5RjCp4 =
266- knative.dev/pkg v0.0.0-20251216153728-9c8140b780d1 h1:pSZ4sRKm/Kq1ec+7Yhow6jUH0FKZjzrUHpPsy6Lu8pE =
267- knative.dev/pkg v0.0.0-20251216153728-9c8140b780d1 /go.mod h1:jU9OxeX3zL4W6aHpdMjMA/B7kgkm5JQv6PGMod2Qu/M =
268- knative.dev/serving v0.47.1-0.20251216154926-fcb2e4d0f74b h1:ryyfEOYDc42GVbf5ZhikAcGg5zAXAhNu5LJNwPb1GiM =
269- knative.dev/serving v0.47.1-0.20251216154926-fcb2e4d0f74b /go.mod h1:FDSziSYWrPQZ/RwX/fONtpTXZhDwXtOIBjIY5BbB7Wc =
264+ knative.dev/networking v0.0.0-20251216133826-9b53ca077e6a h1:IRy795/m6VioHzXIRtuYXzp7CHeF47STsP3W4++h4w0 =
265+ knative.dev/networking v0.0.0-20251216133826-9b53ca077e6a /go.mod h1:BDVceWHtCs3jrBQzkd83vSw98zhOkO1Q7hJSuPU3hDM =
266+ knative.dev/pkg v0.0.0-20251217214024-80c8bc434670 h1:MKgHnTvNprMn+Tr73CRB088PqR22q4KuVFIBTLFltwA =
267+ knative.dev/pkg v0.0.0-20251217214024-80c8bc434670 /go.mod h1:jU9OxeX3zL4W6aHpdMjMA/B7kgkm5JQv6PGMod2Qu/M =
268+ knative.dev/serving v0.47.1-0.20251218010245-2b621899e32e h1:GN399Z2pWdIL1uU3zU/mmnApdYwAvClu6yQjpeZ6NJU =
269+ knative.dev/serving v0.47.1-0.20251218010245-2b621899e32e /go.mod h1:SEhF2H2ZtmDwJNHOBi97TEiGKbF2so3/+m5prHGOu7o =
270270sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 h1:gBQPwqORJ8d8/YNZWEjoZs7npUVDpVXUUOFfW6CgAqE =
271271sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 /go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg =
272272sigs.k8s.io/randfill v1.0.0 h1:JfjMILfT8A6RbawdsK2JXGBR5AQVfd+9TbzrlneTyrU =
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ import (
2424 "slices"
2525
2626 corev1 "k8s.io/api/core/v1"
27+
2728 "knative.dev/serving/pkg/apis/config"
2829)
2930
@@ -384,6 +385,7 @@ func ProbeMask(in *corev1.Probe) *corev1.Probe {
384385 out .PeriodSeconds = in .PeriodSeconds
385386 out .SuccessThreshold = in .SuccessThreshold
386387 out .FailureThreshold = in .FailureThreshold
388+ out .TerminationGracePeriodSeconds = in .TerminationGracePeriodSeconds
387389
388390 return out
389391}
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ import (
2525
2626 "k8s.io/apimachinery/pkg/api/resource"
2727 "k8s.io/apimachinery/pkg/api/validation"
28+ "knative.dev/networking/pkg/apis/networking"
2829 "knative.dev/pkg/apis"
2930 "knative.dev/pkg/kmap"
3031 "knative.dev/pkg/kmp"
@@ -66,6 +67,7 @@ func (rts *RevisionTemplateSpec) Validate(ctx context.Context) *apis.FieldError
6667 errs := rts .Spec .Validate (apis .WithinSpec (ctx )).ViaField ("spec" )
6768 errs = errs .Also (autoscaling .ValidateAnnotations (ctx , config .FromContextOrDefaults (ctx ).Autoscaler ,
6869 rts .GetAnnotations ()).ViaField ("metadata.annotations" ))
70+ errs = errs .Also (networking .ValidateAnnotations (rts .GetAnnotations ()).ViaField ("metadata.annotations" ))
6971
7072 // If the RevisionTemplateSpec has a name specified, then check that
7173 // it follows the requirements on the name.
Original file line number Diff line number Diff line change @@ -155,6 +155,23 @@ func (rs *RouteStatus) MarkRevisionFailed(name string) {
155155 "Revision %q failed to become ready." , name )
156156}
157157
158+ // MarkRevisionNotOwned marks the RouteConditionAllTrafficAssigned condition
159+ // to indicate the Revision does not belong to the expected Service.
160+ func (rs * RouteStatus ) MarkRevisionNotOwned (revisionName , expectedService , actualService string ) {
161+ if actualService == "" {
162+ // Revision was created from a standalone Configuration (no known service)
163+ routeCondSet .Manage (rs ).MarkFalse (RouteConditionAllTrafficAssigned ,
164+ "RevisionNotOwned" ,
165+ "Revision %q does not belong to Service %q." , revisionName , expectedService )
166+ } else {
167+ // Revision belongs to a different Service
168+ routeCondSet .Manage (rs ).MarkFalse (RouteConditionAllTrafficAssigned ,
169+ "RevisionNotOwned" ,
170+ "Revision %q belongs to Service %q, not Service %q." ,
171+ revisionName , actualService , expectedService )
172+ }
173+ }
174+
158175// MarkMissingTrafficTarget marks the RouteConditionAllTrafficAssigned
159176// condition to indicate a reference traffic target was not found.
160177func (rs * RouteStatus ) MarkMissingTrafficTarget (kind , name string ) {
Original file line number Diff line number Diff line change @@ -910,7 +910,7 @@ k8s.io/utils/trace
910910# knative.dev/hack v0.0.0-20251126013634-1484a9e9b641
911911## explicit; go 1.24
912912knative.dev/hack
913- # knative.dev/networking v0.0.0-20251127155419-5082b02af8c1
913+ # knative.dev/networking v0.0.0-20251216133826-9b53ca077e6a
914914## explicit; go 1.24.0
915915knative.dev/networking/pkg/apis/networking
916916knative.dev/networking/pkg/apis/networking/v1alpha1
@@ -920,7 +920,7 @@ knative.dev/networking/pkg/http
920920knative.dev/networking/pkg/http/header
921921knative.dev/networking/pkg/http/proxy
922922knative.dev/networking/pkg/http/stats
923- # knative.dev/pkg v0.0.0-20251216153728-9c8140b780d1
923+ # knative.dev/pkg v0.0.0-20251217214024-80c8bc434670
924924## explicit; go 1.24.0
925925knative.dev/pkg/apis
926926knative.dev/pkg/apis/duck
@@ -959,7 +959,7 @@ knative.dev/pkg/signals
959959knative.dev/pkg/system
960960knative.dev/pkg/tracker
961961knative.dev/pkg/websocket
962- # knative.dev/serving v0.47.1-0.20251216154926-fcb2e4d0f74b
962+ # knative.dev/serving v0.47.1-0.20251218010245-2b621899e32e
963963## explicit; go 1.24.0
964964knative.dev/serving/pkg/activator
965965knative.dev/serving/pkg/apis/autoscaling
You can’t perform that action at this time.
0 commit comments