Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ require (
k8s.io/api v0.35.4
k8s.io/apimachinery v0.35.4
k8s.io/client-go v0.35.4
knative.dev/client/pkg v0.0.0-20260512023952-81e768d183a2
knative.dev/client/pkg v0.0.0-20260519023424-98e7919fabc1
knative.dev/hack v0.0.0-20260428014158-b2a37f1b6e7b
knative.dev/networking v0.0.0-20260506015723-9b427f7c8091
knative.dev/serving v0.49.1-0.20260512221929-dbaab46874d2
knative.dev/serving v0.49.1-0.20260515125932-a4e653bb53da
)

require (
Expand Down Expand Up @@ -104,7 +104,7 @@ require (
k8s.io/klog/v2 v2.130.1 // indirect
k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912 // indirect
k8s.io/utils v0.0.0-20251002143259-bc988d571ff4 // indirect
knative.dev/eventing v0.49.1-0.20260511150731-43e651f7940a // indirect
knative.dev/eventing v0.49.1-0.20260518163531-504f7e00e182 // indirect
knative.dev/pkg v0.0.0-20260507212125-df317a52d112 // indirect
sigs.k8s.io/gateway-api v1.1.0 // indirect
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect
Expand Down
12 changes: 6 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -303,18 +303,18 @@ k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912 h1:Y3gxNAuB0OBLImH611+UDZ
k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912/go.mod h1:kdmbQkyfwUagLfXIad1y2TdrjPFWp2Q89B3qkRwf/pQ=
k8s.io/utils v0.0.0-20251002143259-bc988d571ff4 h1:SjGebBtkBqHFOli+05xYbK8YF1Dzkbzn+gDM4X9T4Ck=
k8s.io/utils v0.0.0-20251002143259-bc988d571ff4/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
knative.dev/client/pkg v0.0.0-20260512023952-81e768d183a2 h1:LT4n99lft44+51dX+V3a272ePEpIa8Ig0bKVEN87BgY=
knative.dev/client/pkg v0.0.0-20260512023952-81e768d183a2/go.mod h1:V/Vqv4RzRcalY6F6PB+bQ56ePe64kmR49NzUNta17+w=
knative.dev/eventing v0.49.1-0.20260511150731-43e651f7940a h1:Iq198f0CCOm+gIArlRzxyw+Ini/izupUjBjqyZy6GoM=
knative.dev/eventing v0.49.1-0.20260511150731-43e651f7940a/go.mod h1:rqixbt+It0fwbQQuPjVDAEiLi12KnLG3Bmul3T5IHAM=
knative.dev/client/pkg v0.0.0-20260519023424-98e7919fabc1 h1:nQVa8xJ2+5lZPd4GdbiL3Z8XrFW4aYA4uqW0A7K48JM=
knative.dev/client/pkg v0.0.0-20260519023424-98e7919fabc1/go.mod h1:6bR7WtKLJj1U3iWlZhTpOvnCAo4ScxOnXUw8TyjZefA=
knative.dev/eventing v0.49.1-0.20260518163531-504f7e00e182 h1:4pEVjHEyOJ/nlYzdWdb2Y8Mrnjz/IarbzgECp67xsLQ=
knative.dev/eventing v0.49.1-0.20260518163531-504f7e00e182/go.mod h1:LSd+ROlnWPmpvEfX8xSfTWF86o3TWgegahU6N1qqK30=
knative.dev/hack v0.0.0-20260428014158-b2a37f1b6e7b h1:MvbV2F2BdI8qKrYYUhDwbUZbX0BAYRSIpXM2TOtTvs0=
knative.dev/hack v0.0.0-20260428014158-b2a37f1b6e7b/go.mod h1:L5RzHgbvam0u8QFHfzCX6MKxu/a/gIGEdaRBqNiVbl0=
knative.dev/networking v0.0.0-20260506015723-9b427f7c8091 h1:Fg091hEPQvqKQYBO7hQ20yID1wFbD4hIDz552mI4L14=
knative.dev/networking v0.0.0-20260506015723-9b427f7c8091/go.mod h1:1+QQXuA6k0gzGJ/Lpp+mZQebDXEfybMu3q+C8a1g54Q=
knative.dev/pkg v0.0.0-20260507212125-df317a52d112 h1:ftdGpzukmrlcTRTCZytQQ+mAMUAFqcq/cwIUwc/Lk2s=
knative.dev/pkg v0.0.0-20260507212125-df317a52d112/go.mod h1:JM+8ds+MTBtPK2aCp6pGUHQx9gNIL8wuMhqr0sxtDog=
knative.dev/serving v0.49.1-0.20260512221929-dbaab46874d2 h1:8zqDL3WhXBqAvePlBnYZDGj5lXS19JnVca3gu+A17j4=
knative.dev/serving v0.49.1-0.20260512221929-dbaab46874d2/go.mod h1:3hXF5IUiZow3USDS0rA5UQeZCP30OwuDalcQS96XmFQ=
knative.dev/serving v0.49.1-0.20260515125932-a4e653bb53da h1:CbJUXD8MlfKLTnDLZVQX1Tl5vhCs+D1BSY9FH9J4Zt4=
knative.dev/serving v0.49.1-0.20260515125932-a4e653bb53da/go.mod h1:3hXF5IUiZow3USDS0rA5UQeZCP30OwuDalcQS96XmFQ=
sigs.k8s.io/gateway-api v1.1.0 h1:DsLDXCi6jR+Xz8/xd0Z1PYl2Pn0TyaFMOPPZIj4inDM=
sigs.k8s.io/gateway-api v1.1.0/go.mod h1:ZH4lHrL2sDi0FHZ9jjneb8kKnGzFWyrTya35sWUTrRs=
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 h1:IpInykpT6ceI+QxKBbEflcR5EXP7sU1kvOlxwZh5txg=
Expand Down
15 changes: 9 additions & 6 deletions vendor/knative.dev/eventing/pkg/apis/duck/lifecycle_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package duck

import (
appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
discoveryv1 "k8s.io/api/discovery/v1"
)

// DeploymentIsAvailable determines if the provided deployment is available. Note that if it cannot
Expand All @@ -33,11 +33,14 @@ func DeploymentIsAvailable(d *appsv1.DeploymentStatus, def bool) bool {
return def
}

// EndpointsAreAvailable determines if the provided Endpoints are available.
func EndpointsAreAvailable(ep *corev1.Endpoints) bool {
for _, subset := range ep.Subsets {
if len(subset.Addresses) > 0 {
return true
// EndpointSlicesAreAvailable determines if the provided EndpointSlices have any ready endpoints.
func EndpointSlicesAreAvailable(epSlices []*discoveryv1.EndpointSlice) bool {
for _, eps := range epSlices {
for _, ep := range eps.Endpoints {
// Per the K8s API spec, a nil Ready value should be interpreted as ready.
if ep.Conditions.Ready == nil || *ep.Conditions.Ready {
return true
}
}
}
return false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.
package v1

import (
corev1 "k8s.io/api/core/v1"
discoveryv1 "k8s.io/api/discovery/v1"

"knative.dev/eventing/pkg/apis/duck"
duckv1 "knative.dev/eventing/pkg/apis/duck/v1"
Expand All @@ -27,11 +27,11 @@ func (bs *BrokerStatus) MarkIngressFailed(reason, format string, args ...interfa
bs.GetConditionSet().Manage(bs).MarkFalse(BrokerConditionIngress, reason, format, args...)
}

func (bs *BrokerStatus) PropagateIngressAvailability(ep *corev1.Endpoints) {
if duck.EndpointsAreAvailable(ep) {
func (bs *BrokerStatus) PropagateIngressAvailability(epSlices []*discoveryv1.EndpointSlice) {
if duck.EndpointSlicesAreAvailable(epSlices) {
bs.GetConditionSet().Manage(bs).MarkTrue(BrokerConditionIngress)
} else {
bs.MarkIngressFailed("EndpointsUnavailable", "Endpoints %q are unavailable.", ep.Name)
bs.MarkIngressFailed("EndpointSlicesUnavailable", "EndpointSlices are unavailable.")
}
}

Expand All @@ -57,10 +57,10 @@ func (bs *BrokerStatus) MarkFilterFailed(reason, format string, args ...interfac
bs.GetConditionSet().Manage(bs).MarkFalse(BrokerConditionFilter, reason, format, args...)
}

func (bs *BrokerStatus) PropagateFilterAvailability(ep *corev1.Endpoints) {
if duck.EndpointsAreAvailable(ep) {
func (bs *BrokerStatus) PropagateFilterAvailability(epSlices []*discoveryv1.EndpointSlice) {
if duck.EndpointSlicesAreAvailable(epSlices) {
bs.GetConditionSet().Manage(bs).MarkTrue(BrokerConditionFilter)
} else {
bs.MarkFilterFailed("EndpointsUnavailable", "Endpoints %q are unavailable.", ep.Name)
bs.MarkFilterFailed("EndpointSlicesUnavailable", "EndpointSlices are unavailable.")
}
}
35 changes: 17 additions & 18 deletions vendor/knative.dev/eventing/pkg/apis/eventing/v1/test_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package v1

import (
corev1 "k8s.io/api/core/v1"
discoveryv1 "k8s.io/api/discovery/v1"

"knative.dev/pkg/apis"
duckv1 "knative.dev/pkg/apis/duck/v1"
Expand Down Expand Up @@ -59,9 +60,9 @@ func (testHelper) ReadySubscriptionStatus() *messagingv1.SubscriptionStatus {

func (t testHelper) ReadyBrokerStatus() *BrokerStatus {
bs := &BrokerStatus{}
bs.PropagateIngressAvailability(t.AvailableEndpoints())
bs.PropagateIngressAvailability(t.AvailableEndpointSlices())
bs.PropagateTriggerChannelReadiness(t.ReadyChannelStatus())
bs.PropagateFilterAvailability(t.AvailableEndpoints())
bs.PropagateFilterAvailability(t.AvailableEndpointSlices())
bs.SetAddress(&duckv1.Addressable{
URL: apis.HTTP("example.com"),
})
Expand All @@ -72,9 +73,9 @@ func (t testHelper) ReadyBrokerStatus() *BrokerStatus {

func (t testHelper) ReadyBrokerStatusWithoutDLS() *BrokerStatus {
bs := &BrokerStatus{}
bs.PropagateIngressAvailability(t.AvailableEndpoints())
bs.PropagateIngressAvailability(t.AvailableEndpointSlices())
bs.PropagateTriggerChannelReadiness(t.ReadyChannelStatus())
bs.PropagateFilterAvailability(t.AvailableEndpoints())
bs.PropagateFilterAvailability(t.AvailableEndpointSlices())
bs.SetAddress(&duckv1.Addressable{
URL: apis.HTTP("example.com"),
})
Expand Down Expand Up @@ -102,26 +103,24 @@ func (testHelper) FalseBrokerStatus() *BrokerStatus {
return bs
}

func (testHelper) UnavailableEndpoints() *corev1.Endpoints {
ep := &corev1.Endpoints{}
ep.Name = "unavailable"
ep.Subsets = []corev1.EndpointSubset{{
NotReadyAddresses: []corev1.EndpointAddress{{
IP: "127.0.0.1",
func (testHelper) UnavailableEndpointSlices() []*discoveryv1.EndpointSlice {
ready := false
return []*discoveryv1.EndpointSlice{{
Endpoints: []discoveryv1.Endpoint{{
Addresses: []string{"127.0.0.1"},
Conditions: discoveryv1.EndpointConditions{Ready: &ready},
}},
}}
return ep
}

func (testHelper) AvailableEndpoints() *corev1.Endpoints {
ep := &corev1.Endpoints{}
ep.Name = "available"
ep.Subsets = []corev1.EndpointSubset{{
Addresses: []corev1.EndpointAddress{{
IP: "127.0.0.1",
func (testHelper) AvailableEndpointSlices() []*discoveryv1.EndpointSlice {
ready := true
return []*discoveryv1.EndpointSlice{{
Endpoints: []discoveryv1.Endpoint{{
Addresses: []string{"127.0.0.1"},
Conditions: discoveryv1.EndpointConditions{Ready: &ready},
}},
}}
return ep
}

func (testHelper) ReadyChannelStatus() *eventingduckv1.ChannelableStatus {
Expand Down
6 changes: 3 additions & 3 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -926,7 +926,7 @@ k8s.io/utils/net
k8s.io/utils/pointer
k8s.io/utils/ptr
k8s.io/utils/trace
# knative.dev/client/pkg v0.0.0-20260512023952-81e768d183a2
# knative.dev/client/pkg v0.0.0-20260519023424-98e7919fabc1
## explicit; go 1.25.0
knative.dev/client/pkg/apis/client
knative.dev/client/pkg/apis/client/v1alpha1
Expand All @@ -953,7 +953,7 @@ knative.dev/client/pkg/util/errors
knative.dev/client/pkg/util/mock
knative.dev/client/pkg/util/test
knative.dev/client/pkg/wait
# knative.dev/eventing v0.49.1-0.20260511150731-43e651f7940a
# knative.dev/eventing v0.49.1-0.20260518163531-504f7e00e182
## explicit; go 1.25.0
knative.dev/eventing/pkg/apis/common/integration/v1alpha1
knative.dev/eventing/pkg/apis/config
Expand Down Expand Up @@ -1045,7 +1045,7 @@ knative.dev/pkg/test/ingress
knative.dev/pkg/test/logging
knative.dev/pkg/test/spoof
knative.dev/pkg/tracker
# knative.dev/serving v0.49.1-0.20260512221929-dbaab46874d2
# knative.dev/serving v0.49.1-0.20260515125932-a4e653bb53da
## explicit; go 1.25.0
knative.dev/serving/pkg/apis/autoscaling
knative.dev/serving/pkg/apis/autoscaling/v1alpha1
Expand Down
Loading