Skip to content

Commit

Permalink
Fix build issues
Browse files Browse the repository at this point in the history
  • Loading branch information
creydr committed Sep 11, 2023
1 parent 7766817 commit ac315d4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
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

0 comments on commit ac315d4

Please sign in to comment.