Repository: knative-sandbox/eventing-kafka-broker
Pull request #2842 (2022-12-14 12:58:35)

Bumping to latest knative/eventing
As per title and adjust for use of broker `AddressStatus` status field to be compatible with https://github.com/knative/eventing/pull/6622

knative-prow[bot]: [APPROVALNOTIFIER] This PR is **NOT APPROVED**

This pull-request has been approved by: *<a href="https://github.com/knative-sandbox/eventing-kafka-broker/pull/2842#" title="Author self-approved">creydr</a>*
**Once this PR has been reviewed and has the lgtm label**, please assign psschwei for approval by writing `/assign @psschwei` in a comment. For more information see [the Kubernetes Code Review Process](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process).

The full list of commands accepted by this bot can be found [here](https://go.k8s.io/bot-commands?repo=knative-sandbox%2Feventing-kafka-broker).

<details open>
Needs approval from an approver in each of these files:

- **[OWNERS](https://github.com/knative-sandbox/eventing-kafka-broker/blob/main/OWNERS)**

Approvers can indicate their approval by writing `/approve` in a comment
Approvers can cancel approval by writing `/approve cancel` in a comment
</details>
<!-- META={"approvers":["psschwei"]} -->
knative-prow[bot]: @creydr: The following test **failed**, say `/retest` to rerun all failed tests or `/retest-required` to rerun all mandatory failed tests:

Test name | Commit | Details | Required | Rerun command
--- | --- | --- | --- | ---
channel-integration-tests-sasl-plain_eventing-kafka-broker_main | a485e82b31aa827cc82023bdea87dca709b62506 | [link](https://prow.knative.dev/view/gs/knative-prow/pr-logs/pull/knative-sandbox_eventing-kafka-broker/2842/channel-integration-tests-sasl-plain_eventing-kafka-broker_main/1603011580365115392) | true | `/test channel-integration-tests-sasl-plain`

[Your PR dashboard](https://prow.knative.dev/pr).

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
knative-prow[bot]: @creydr: The following tests **failed**, say `/retest` to rerun all failed tests or `/retest-required` to rerun all mandatory failed tests:

Test name | Commit | Details | Required | Rerun command
--- | --- | --- | --- | ---
channel-integration-tests-sasl-plain_eventing-kafka-broker_main | a485e82b31aa827cc82023bdea87dca709b62506 | [link](https://prow.knative.dev/view/gs/knative-prow/pr-logs/pull/knative-sandbox_eventing-kafka-broker/2842/channel-integration-tests-sasl-plain_eventing-kafka-broker_main/1603011580365115392) | true | `/test channel-integration-tests-sasl-plain`
upgrade-tests_eventing-kafka-broker_main | a485e82b31aa827cc82023bdea87dca709b62506 | [link](https://prow.knative.dev/view/gs/knative-prow/pr-logs/pull/knative-sandbox_eventing-kafka-broker/2842/upgrade-tests_eventing-kafka-broker_main/1603011579987628032) | true | `/test upgrade-tests`

[Your PR dashboard](https://prow.knative.dev/pr).

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
creydr: /retest
knative-prow[bot]: [APPROVALNOTIFIER] This PR is **APPROVED**

This pull-request has been approved by: *<a href="https://github.com/knative-sandbox/eventing-kafka-broker/pull/2842#" title="Author self-approved">creydr</a>*, *<a href="https://github.com/knative-sandbox/eventing-kafka-broker/pull/2842#pullrequestreview-1218758328" title="Approved">matzew</a>*

The full list of commands accepted by this bot can be found [here](https://go.k8s.io/bot-commands?repo=knative-sandbox%2Feventing-kafka-broker).

The pull request process is described [here](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process)

<details >
Needs approval from an approver in each of these files:

- ~~[OWNERS](https://github.com/knative-sandbox/eventing-kafka-broker/blob/main/OWNERS)~~ [matzew]

Approvers can indicate their approval by writing `/approve` in a comment
Approvers can cancel approval by writing `/approve cancel` in a comment
</details>
<!-- META={"approvers":[]} -->

Patch:
diff --git a/control-plane/pkg/reconciler/broker/broker.go b/control-plane/pkg/reconciler/broker/broker.go
index 520e94fea..fe24de10a 100644
--- a/control-plane/pkg/reconciler/broker/broker.go
+++ b/control-plane/pkg/reconciler/broker/broker.go
@@ -31,6 +31,7 @@ import (
 	corelisters "k8s.io/client-go/listers/core/v1"
 	"k8s.io/client-go/util/retry"
 	eventing "knative.dev/eventing/pkg/apis/eventing/v1"
+	v1 "knative.dev/pkg/apis/duck/v1"
 	"knative.dev/pkg/controller"
 	"knative.dev/pkg/network"
 	"knative.dev/pkg/reconciler"
@@ -351,7 +352,7 @@ func (r *Reconciler) finalizeKind(ctx context.Context, broker *eventing.Broker)
 		return err
 	}
 
-	broker.Status.Address.URL = nil
+	broker.Status.AddressStatus = v1.AddressStatus{}
 
 	ingressHost := network.GetServiceHostname(r.Env.IngressName, r.Reconciler.DataPlaneNamespace)
 
diff --git a/go.mod b/go.mod
index e29930a28..b11b221b5 100644
--- a/go.mod
+++ b/go.mod
@@ -38,7 +38,7 @@ require (
 require (
 	github.com/kedacore/keda/v2 v2.8.1
 	gopkg.in/yaml.v3 v3.0.1
-	knative.dev/eventing v0.35.1-0.20221213063748-661fd01ebfa0
+	knative.dev/eventing v0.35.1-0.20221214083955-1048c6cfe143
 	knative.dev/eventing-kafka v0.35.1-0.20221209060617-bdb5df2114f2
 	knative.dev/hack v0.0.0-20221209013717-b9801b4f5a4d
 	knative.dev/pkg v0.0.0-20221209013515-911b435f02a1
diff --git a/go.sum b/go.sum
index fa55e24b3..44fb2d1f7 100644
--- a/go.sum
+++ b/go.sum
@@ -1514,8 +1514,8 @@ k8s.io/utils v0.0.0-20200912215256-4140de9c8800/go.mod h1:jPW/WVKK9YHAvNhRxK0md/
 k8s.io/utils v0.0.0-20210819203725-bdf08cb9a70a/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
 k8s.io/utils v0.0.0-20221108210102-8e77b1f39fe2 h1:GfD9OzL11kvZN5iArC6oTS7RTj7oJOIfnislxYlqTj8=
 k8s.io/utils v0.0.0-20221108210102-8e77b1f39fe2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
-knative.dev/eventing v0.35.1-0.20221213063748-661fd01ebfa0 h1:fbnWuRkiwH0+qG4tg6ERYHd/Xhtpfi6zYGCg00VfI0A=
-knative.dev/eventing v0.35.1-0.20221213063748-661fd01ebfa0/go.mod h1:J5vUo5Eh2RZ7NkPMi1oQGBtjt0cJX1w9SJUAFyAMD4I=
+knative.dev/eventing v0.35.1-0.20221214083955-1048c6cfe143 h1:/L8eTVZdLFWfyzm2MqhNCqgOCktQCnD6z9Tq2UEXaF4=
+knative.dev/eventing v0.35.1-0.20221214083955-1048c6cfe143/go.mod h1:J5vUo5Eh2RZ7NkPMi1oQGBtjt0cJX1w9SJUAFyAMD4I=
 knative.dev/eventing-kafka v0.35.1-0.20221209060617-bdb5df2114f2 h1:uz8n4MQC3sdgGngRt0y4ruPmZtJXO3p951MH3EdGkRE=
 knative.dev/eventing-kafka v0.35.1-0.20221209060617-bdb5df2114f2/go.mod h1:JrJBms/yU0kwPo7B339VrTBPuyoXP71Y21divEe37AM=
 knative.dev/hack v0.0.0-20221209013717-b9801b4f5a4d h1:nMp1GE3iwrJzABi4xP0xSVOwaaZMJ8loT9S42d54wFM=
diff --git a/vendor/knative.dev/eventing/pkg/apis/eventing/v1/broker_lifecycle.go b/vendor/knative.dev/eventing/pkg/apis/eventing/v1/broker_lifecycle.go
index 1154f5227..58ef725f7 100644
--- a/vendor/knative.dev/eventing/pkg/apis/eventing/v1/broker_lifecycle.go
+++ b/vendor/knative.dev/eventing/pkg/apis/eventing/v1/broker_lifecycle.go
@@ -20,6 +20,7 @@ import (
 	"sync"
 
 	"knative.dev/pkg/apis"
+	v1 "knative.dev/pkg/apis/duck/v1"
 )
 
 const (
@@ -72,7 +73,12 @@ 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) {
-	bs.Address.URL = url
+	bs.AddressStatus = v1.AddressStatus{
+		Address: &v1.Addressable{
+			URL: url,
+		},
+	}
+
 	if url != nil {
 		bs.GetConditionSet().Manage(bs).MarkTrue(BrokerConditionAddressable)
 	} else {
diff --git a/vendor/knative.dev/eventing/pkg/apis/eventing/v1/broker_types.go b/vendor/knative.dev/eventing/pkg/apis/eventing/v1/broker_types.go
index d12e58680..e86ffad7c 100644
--- a/vendor/knative.dev/eventing/pkg/apis/eventing/v1/broker_types.go
+++ b/vendor/knative.dev/eventing/pkg/apis/eventing/v1/broker_types.go
@@ -88,10 +88,10 @@ type BrokerStatus struct {
 	// * Conditions - the latest available observations of a resource's current state.
 	duckv1.Status `json:",inline"`
 
-	// Broker is Addressable. It exposes the endpoint as an URI to get events
-	// delivered into the Broker mesh.
+	// AddressStatus is the part where the Broker fulfills the Addressable contract.
+	// It exposes the endpoint as an URI to get events delivered into the Broker mesh.
 	// +optional
-	Address duckv1.Addressable `json:"address,omitempty"`
+	duckv1.AddressStatus `json:",inline"`
 
 	// DeliveryStatus contains a resolved URL to the dead letter sink address, and any other
 	// resolved delivery options.
diff --git a/vendor/knative.dev/eventing/pkg/apis/eventing/v1/zz_generated.deepcopy.go b/vendor/knative.dev/eventing/pkg/apis/eventing/v1/zz_generated.deepcopy.go
index 8ffb713c2..fcf2f31ee 100644
--- a/vendor/knative.dev/eventing/pkg/apis/eventing/v1/zz_generated.deepcopy.go
+++ b/vendor/knative.dev/eventing/pkg/apis/eventing/v1/zz_generated.deepcopy.go
@@ -119,7 +119,7 @@ func (in *BrokerSpec) DeepCopy() *BrokerSpec {
 func (in *BrokerStatus) DeepCopyInto(out *BrokerStatus) {
 	*out = *in
 	in.Status.DeepCopyInto(&out.Status)
-	in.Address.DeepCopyInto(&out.Address)
+	in.AddressStatus.DeepCopyInto(&out.AddressStatus)
 	in.DeliveryStatus.DeepCopyInto(&out.DeliveryStatus)
 	return
 }
diff --git a/vendor/modules.txt b/vendor/modules.txt
index a1d295437..e4007d79b 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -1221,7 +1221,7 @@ k8s.io/utils/net
 k8s.io/utils/pointer
 k8s.io/utils/strings/slices
 k8s.io/utils/trace
-# knative.dev/eventing v0.35.1-0.20221213063748-661fd01ebfa0
+# knative.dev/eventing v0.35.1-0.20221214083955-1048c6cfe143
 ## explicit; go 1.18
 knative.dev/eventing/cmd/event_display
 knative.dev/eventing/pkg/apis/config


Test patch:
diff --git a/control-plane/pkg/reconciler/testing/objects_broker.go b/control-plane/pkg/reconciler/testing/objects_broker.go
index 2af9d7705..e5d38029d 100644
--- a/control-plane/pkg/reconciler/testing/objects_broker.go
+++ b/control-plane/pkg/reconciler/testing/objects_broker.go
@@ -317,10 +317,12 @@ func NamespacedBrokerAddressable(env *config.Env) func(broker *eventing.Broker)
 }
 
 func brokerAddressable(broker *eventing.Broker, serviceName, serviceNamespace string) {
-	broker.Status.Address.URL = &apis.URL{
-		Scheme: "http",
-		Host:   network.GetServiceHostname(serviceName, serviceNamespace),
-		Path:   fmt.Sprintf("/%s/%s", broker.Namespace, broker.Name),
+	broker.Status.AddressStatus.Address = &duckv1.Addressable{
+		URL: &apis.URL{
+			Scheme: "http",
+			Host:   network.GetServiceHostname(serviceName, serviceNamespace),
+			Path:   fmt.Sprintf("/%s/%s", broker.Namespace, broker.Name),
+		},
 	}
 
 	broker.GetConditionSet().Manage(&broker.Status).MarkTrue(base.ConditionAddressable)
diff --git a/test/upgrade/continual/broker.go b/test/upgrade/continual/broker.go
index 3747aaf10..64b5ad7b3 100644
--- a/test/upgrade/continual/broker.go
+++ b/test/upgrade/continual/broker.go
@@ -176,7 +176,10 @@ func (k *kafkaBrokerSut) fetchURL(ctx sut.Context) *apis.URL {
 		ctx.T.Fatal(err)
 	}
 
-	url := br.Status.Address.URL
+	var url *apis.URL
+	if br.Status.AddressStatus.Address != nil {
+		url = br.Status.Address.URL
+	}
 	ctx.Log.Debugf("\"%s\" broker URL for ns %s is %v", k.Broker.Name, namespace, url)
 	return url
 }
diff --git a/vendor/knative.dev/eventing/test/rekt/features/broker/control_plane.go b/vendor/knative.dev/eventing/test/rekt/features/broker/control_plane.go
index 180e2e047..07d01c8e4 100644
--- a/vendor/knative.dev/eventing/test/rekt/features/broker/control_plane.go
+++ b/vendor/knative.dev/eventing/test/rekt/features/broker/control_plane.go
@@ -583,7 +583,7 @@ func readyBrokerIsAddressable(ctx context.Context, t feature.T) {
 	broker := getBroker(ctx, t)
 
 	if broker.IsReady() {
-		if broker.Status.Address.URL == nil {
+		if broker.Status.AddressStatus.Address == nil || broker.Status.AddressStatus.Address.URL == nil {
 			t.Errorf("broker is not addressable")
 		}
 		// Success!
diff --git a/vendor/knative.dev/eventing/test/rekt/features/broker/data_plane.go b/vendor/knative.dev/eventing/test/rekt/features/broker/data_plane.go
index d5e0e16ff..9ed3bb44b 100644
--- a/vendor/knative.dev/eventing/test/rekt/features/broker/data_plane.go
+++ b/vendor/knative.dev/eventing/test/rekt/features/broker/data_plane.go
@@ -82,7 +82,7 @@ func DataPlaneAddressability(brokerName string) *feature.Feature {
 	f.Stable("Conformance").Should("A Broker SHOULD expose either an HTTP or HTTPS endpoint as ingress. It MAY expose both.",
 		func(ctx context.Context, t feature.T) {
 			b := getBroker(ctx, t)
-			addr := b.Status.Address.URL
+			addr := b.Status.AddressStatus.Address.URL
 			if addr == nil {
 				addr = new(apis.URL)
 			}
diff --git a/vendor/knative.dev/eventing/test/upgrade/prober/sut/broker.go b/vendor/knative.dev/eventing/test/upgrade/prober/sut/broker.go
index 719df6185..0c1a410b6 100644
--- a/vendor/knative.dev/eventing/test/upgrade/prober/sut/broker.go
+++ b/vendor/knative.dev/eventing/test/upgrade/prober/sut/broker.go
@@ -102,7 +102,7 @@ func (b *BrokerAndTriggers) fetchURL(ctx Context) *apis.URL {
 	if err != nil {
 		ctx.T.Fatal(err)
 	}
-	url := broker.Status.Address.URL
+	url := broker.Status.AddressStatus.Address.URL
 	ctx.Log.Debugf("\"%s\" broker URL for ns %s is %v",
 		b.Name, namespace, url)
 	return url