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
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ require (
k8s.io/apimachinery v0.35.4
k8s.io/client-go v0.35.4
k8s.io/code-generator v0.35.4
knative.dev/eventing v0.49.1-0.20260511150731-43e651f7940a
knative.dev/eventing v0.49.1-0.20260518163531-504f7e00e182
knative.dev/hack v0.0.0-20260428014158-b2a37f1b6e7b
knative.dev/pkg v0.0.0-20260507212125-df317a52d112
knative.dev/serving v0.49.1-0.20260512221929-dbaab46874d2
knative.dev/serving v0.49.1-0.20260515125932-a4e653bb53da
)

require (
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -364,16 +364,16 @@ 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/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/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-20260428014950-5876dec269ce h1:Pt5NYScJzJ8CcIogikaTakvehEO9COjzXZ/2gJmc8YA=
knative.dev/networking v0.0.0-20260428014950-5876dec269ce/go.mod h1:aQO2gITPzLwMPCV9S57rHrb1Zt2mUAYSGLbb/7nqzW0=
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
4 changes: 2 additions & 2 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1126,7 +1126,7 @@ k8s.io/utils/net
k8s.io/utils/pointer
k8s.io/utils/ptr
k8s.io/utils/trace
# 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/adapter/v2
knative.dev/eventing/pkg/adapter/v2/test
Expand Down Expand Up @@ -1281,7 +1281,7 @@ knative.dev/pkg/webhook/psbinding
knative.dev/pkg/webhook/resourcesemantics
knative.dev/pkg/webhook/resourcesemantics/defaulting
knative.dev/pkg/webhook/resourcesemantics/validation
# 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