Skip to content
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

Update dependencies #1223

Merged
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
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ require (
k8s.io/client-go v0.26.5
k8s.io/code-generator v0.26.5
k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280
knative.dev/eventing v0.38.1-0.20230907060413-b08285068489
knative.dev/eventing v0.38.1-0.20230911085617-94dfb4a1caf1
knative.dev/hack v0.0.0-20230906172513-760813ad2706
knative.dev/pkg v0.0.0-20230905144417-27252a376b30
knative.dev/reconciler-test v0.0.0-20230901013135-51e7751247b7
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -843,8 +843,8 @@ k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 h1:+70TFaan3hfJzs+7VK2o+O
k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280/go.mod h1:+Axhij7bCpeqhklhUTe3xmOn6bWxolyZEeyaFpjGtl4=
k8s.io/utils v0.0.0-20230505201702-9f6742963106 h1:EObNQ3TW2D+WptiYXlApGNLVy0zm/JIBVY9i+M4wpAU=
k8s.io/utils v0.0.0-20230505201702-9f6742963106/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
knative.dev/eventing v0.38.1-0.20230907060413-b08285068489 h1:XTeecv4cC1XnmTCHhAXqcGyIJf69jdQNFZ8Nh//xR5s=
knative.dev/eventing v0.38.1-0.20230907060413-b08285068489/go.mod h1:V81fCtozZsKFXTLix6y0BXEguzUo+FCcJGzNfjL7JHc=
knative.dev/eventing v0.38.1-0.20230911085617-94dfb4a1caf1 h1:J2kfRX8853MwQp66v9WdLaobqtH7W0pIbE/3/ubyhMQ=
knative.dev/eventing v0.38.1-0.20230911085617-94dfb4a1caf1/go.mod h1:V81fCtozZsKFXTLix6y0BXEguzUo+FCcJGzNfjL7JHc=
knative.dev/hack v0.0.0-20230906172513-760813ad2706 h1:5/b4gPIUUNqVFkDKO9AMnEkdUvZrFVqf+z3r5rJ9w/U=
knative.dev/hack v0.0.0-20230906172513-760813ad2706/go.mod h1:dx0YG3YWqJu653e9tjcT0Q1ZdS9JJXLKbUhzr4EB0g8=
knative.dev/pkg v0.0.0-20230905144417-27252a376b30 h1:q8OCYCux80XnBIscEUTyK9kMAM5cYhPMXlU0b77maz0=
Expand Down
9 changes: 6 additions & 3 deletions pkg/reconciler/broker/broker.go
Original file line number Diff line number Diff line change
Expand Up @@ -409,9 +409,12 @@ func (r *Reconciler) reconcileCommonIngressResources(ctx context.Context, s *cor
}
PropagateIngressAvailability(&b.Status, ingressEndpoints)

b.Status.SetAddress(&apis.URL{
Scheme: "http",
Host: network.GetServiceHostname(ingressEndpoints.GetName(), ingressEndpoints.GetNamespace()),
b.Status.SetAddress(&duckv1.Addressable{
Name: pointer.String("http"),
URL: &apis.URL{
Scheme: "http",
Host: network.GetServiceHostname(ingressEndpoints.GetName(), ingressEndpoints.GetNamespace()),
},
})

// If there's a Dead Letter Sink, then create a dispatcher for it. Note that this is for
Expand Down
12 changes: 6 additions & 6 deletions pkg/reconciler/broker/broker_test_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,19 +100,19 @@ func WithBrokerConfig(config *duckv1.KReference) BrokerOption {
}

// WithBrokerAddress sets the Broker's address.
func WithBrokerAddress(address string) BrokerOption {
func WithBrokerAddress(address *duckv1.Addressable) BrokerOption {
return func(b *v1.Broker) {
b.Status.SetAddress(&apis.URL{
Scheme: "http",
Host: address,
})
b.Status.SetAddress(address)
}
}

// WithBrokerAddressURI sets the Broker's address as URI.
func WithBrokerAddressURI(uri *apis.URL) BrokerOption {
return func(b *v1.Broker) {
b.Status.SetAddress(uri)
b.Status.SetAddress(&duckv1.Addressable{
Name: &uri.Scheme,
URL: uri,
})
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,16 +74,14 @@ func (bs *BrokerStatus) GetTopLevelCondition() *apis.Condition {

// SetAddress makes this Broker addressable by setting the URI. It also
// sets the BrokerConditionAddressable to true.
func (bs *BrokerStatus) SetAddress(url *apis.URL) {
func (bs *BrokerStatus) SetAddress(address *v1.Addressable) {
bs.AddressStatus = v1.AddressStatus{
Address: &v1.Addressable{
URL: url,
},
Address: address,
}

if url != nil {
if address != nil && address.URL != nil {
bs.GetConditionSet().Manage(bs).MarkTrue(BrokerConditionAddressable)
bs.AddressStatus.Address.Name = &url.Scheme
bs.AddressStatus.Address.Name = &address.URL.Scheme
} else {
bs.GetConditionSet().Manage(bs).MarkFalse(BrokerConditionAddressable, "nil URL", "URL is nil")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ func (t testHelper) ReadyBrokerStatus() *BrokerStatus {
bs.PropagateIngressAvailability(t.AvailableEndpoints())
bs.PropagateTriggerChannelReadiness(t.ReadyChannelStatus())
bs.PropagateFilterAvailability(t.AvailableEndpoints())
bs.SetAddress(apis.HTTP("example.com"))
bs.SetAddress(&duckv1.Addressable{
URL: apis.HTTP("example.com"),
})
bs.MarkDeadLetterSinkResolvedSucceeded(eventingduckv1.DeliveryStatus{})
return bs
}
Expand All @@ -71,7 +73,9 @@ func (t testHelper) ReadyBrokerStatusWithoutDLS() *BrokerStatus {
bs.PropagateIngressAvailability(t.AvailableEndpoints())
bs.PropagateTriggerChannelReadiness(t.ReadyChannelStatus())
bs.PropagateFilterAvailability(t.AvailableEndpoints())
bs.SetAddress(apis.HTTP("example.com"))
bs.SetAddress(&duckv1.Addressable{
URL: apis.HTTP("example.com"),
})
bs.MarkDeadLetterSinkNotConfigured()
return bs
}
Expand Down
12 changes: 6 additions & 6 deletions vendor/knative.dev/eventing/pkg/reconciler/testing/v1/broker.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,19 +88,19 @@ func WithBrokerConfig(config *duckv1.KReference) BrokerOption {
}

// WithBrokerAddress sets the Broker's address.
func WithBrokerAddress(address string) BrokerOption {
func WithBrokerAddress(address *duckv1.Addressable) BrokerOption {
return func(b *v1.Broker) {
b.Status.SetAddress(&apis.URL{
Scheme: "http",
Host: address,
})
b.Status.SetAddress(address)
}
}

// WithBrokerAddressURI sets the Broker's address as URI.
func WithBrokerAddressURI(uri *apis.URL) BrokerOption {
return func(b *v1.Broker) {
b.Status.SetAddress(uri)
b.Status.SetAddress(&duckv1.Addressable{
Name: &uri.Scheme,
URL: uri,
})
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,13 @@ func AssertHTTPSAddress(addr *duckv1.Addressable) error {
}
return nil
}

func AssertAddressWithAudience(audience string) func(*duckv1.Addressable) error {
return func(addressable *duckv1.Addressable) error {
if (addressable.Audience == nil && audience != "") || (addressable.Audience != nil && *addressable.Audience != audience) {
return fmt.Errorf("audience of address (%v) does not match expected audience %s", addressable, audience)
}

return nil
}
}
2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1062,7 +1062,7 @@ k8s.io/utils/net
k8s.io/utils/pointer
k8s.io/utils/strings/slices
k8s.io/utils/trace
# knative.dev/eventing v0.38.1-0.20230907060413-b08285068489
# knative.dev/eventing v0.38.1-0.20230911085617-94dfb4a1caf1
## explicit; go 1.19
knative.dev/eventing/cmd/heartbeats
knative.dev/eventing/pkg/adapter/v2
Expand Down