Repository: knative-sandbox/eventing-kafka-broker (go)

Issue:
Add DeliveryOrder status condition or annotation for Trigger
**Problem**
In https://github.com/knative-sandbox/eventing-kafka-broker/pull/701 we introduced a new annotation to configure the delivery order and during the discussion there, we come up to the conclusion that would like to have a status condition to give users feedback on it since we don't have a way to signal that the annotation has been read correctly.

**[Persona:](https://github.com/knative/eventing/blob/master/docs/personas.md)** 
Which persona is this feature for?
- Event consumer

**Exit Criteria**
A measurable (binary) test that would indicate that the problem has been resolved.

**Time Estimate (optional):** 
How many developer-days do you think this may take to resolve?
1

**Additional context (optional)**

- Discussion in https://github.com/knative-sandbox/eventing-kafka-broker/pull/701


Pull request:
Add more details in the status about ordered and unordered
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>

Fixes #732

<!-- Please include the 'why' behind your changes if no issue exists -->

## Proposed Changes

- :gift: Add some details in the existing subscriber resolved condition about the delivery order. I didn't added a new condition for it because it's quite complicated and requires several changes in eventing too

<!--
If this change has user-visible impact, follow the instructions below.
Examples include:

- :gift: Add new feature
- :bug: Fix bug
- :broom: Update or clean up current behavior
- :wastebasket: Remove feature or internal logic

Otherwise delete the rest of this template.
-->

**Release Note**

<!--
:page_facing_up: If this change has user-visible impact, write a release note in the block
below. Include the string "action required" if additional action is required of
users switching to the new release, for example in case of a breaking change.

Write as if you are speaking to users, not other Knative contributors. If this
change has no user-visible impact, no release-note is needed.
-->

```release-note
- :gift: Add some details in the existing subscriber resolved condition about the delivery order.
```

**Docs**

<!--
:book: If this change has user-visible impact, link to an issue or PR in
https://github.com/knative/docs.
-->


Patch:
diff --git a/control-plane/pkg/reconciler/trigger/trigger.go b/control-plane/pkg/reconciler/trigger/trigger.go
index 90be5ae96..e5dabde5a 100644
--- a/control-plane/pkg/reconciler/trigger/trigger.go
+++ b/control-plane/pkg/reconciler/trigger/trigger.go
@@ -142,7 +142,9 @@ func (r *Reconciler) reconcileKind(ctx context.Context, trigger *eventing.Trigge
 	if err != nil {
 		return statusConditionManager.failedToResolveTriggerConfig(err)
 	}
-	statusConditionManager.subscriberResolved()
+	statusConditionManager.subscriberResolved(
+		fmt.Sprintf("Subscriber will receive events with the delivery order: %s", triggerConfig.DeliveryOrder.String()),
+	)
 
 	changed := coreconfig.AddOrUpdateEgressConfig(ct, brokerIndex, triggerConfig, triggerIndex)
 
diff --git a/control-plane/pkg/reconciler/trigger/trigger_lifecycle.go b/control-plane/pkg/reconciler/trigger/trigger_lifecycle.go
index acbb6746b..88431c61e 100644
--- a/control-plane/pkg/reconciler/trigger/trigger_lifecycle.go
+++ b/control-plane/pkg/reconciler/trigger/trigger_lifecycle.go
@@ -122,6 +122,10 @@ func (m *statusConditionManager) failedToUpdateDispatcherPodsAnnotation(err erro
 	)
 }
 
-func (m *statusConditionManager) subscriberResolved() {
-	m.Trigger.Status.MarkSubscriberResolvedSucceeded()
+func (m *statusConditionManager) subscriberResolved(details string) {
+	m.Trigger.GetConditionSet().Manage(&m.Trigger.Status).MarkTrueWithReason(
+		eventing.TriggerConditionSubscriberResolved,
+		string(eventing.TriggerConditionSubscriberResolved),
+		details,
+	)
 }
diff --git a/data-plane/core/src/main/java/dev/knative/eventing/kafka/broker/core/security/AuthProvider.java b/data-plane/core/src/main/java/dev/knative/eventing/kafka/broker/core/security/AuthProvider.java
index 285c235bd..baa5c1404 100644
--- a/data-plane/core/src/main/java/dev/knative/eventing/kafka/broker/core/security/AuthProvider.java
+++ b/data-plane/core/src/main/java/dev/knative/eventing/kafka/broker/core/security/AuthProvider.java
@@ -13,7 +13,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package dev.knative.eventing.kafka.broker.core.security;
 
 import io.fabric8.kubernetes.client.DefaultKubernetesClient;
diff --git a/data-plane/core/src/main/java/dev/knative/eventing/kafka/broker/core/security/Credentials.java b/data-plane/core/src/main/java/dev/knative/eventing/kafka/broker/core/security/Credentials.java
index 6879a4f4f..88855ac18 100644
--- a/data-plane/core/src/main/java/dev/knative/eventing/kafka/broker/core/security/Credentials.java
+++ b/data-plane/core/src/main/java/dev/knative/eventing/kafka/broker/core/security/Credentials.java
@@ -13,7 +13,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package dev.knative.eventing.kafka.broker.core.security;
 
 import org.apache.kafka.common.security.auth.SecurityProtocol;
diff --git a/data-plane/core/src/main/java/dev/knative/eventing/kafka/broker/core/security/CredentialsValidator.java b/data-plane/core/src/main/java/dev/knative/eventing/kafka/broker/core/security/CredentialsValidator.java
index 75ddadaa8..bba60df04 100644
--- a/data-plane/core/src/main/java/dev/knative/eventing/kafka/broker/core/security/CredentialsValidator.java
+++ b/data-plane/core/src/main/java/dev/knative/eventing/kafka/broker/core/security/CredentialsValidator.java
@@ -13,7 +13,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package dev.knative.eventing.kafka.broker.core.security;
 
 import org.apache.kafka.common.security.auth.SecurityProtocol;
diff --git a/data-plane/core/src/main/java/dev/knative/eventing/kafka/broker/core/security/KafkaClientsAuth.java b/data-plane/core/src/main/java/dev/knative/eventing/kafka/broker/core/security/KafkaClientsAuth.java
index 5ce6de2dd..8e371cac4 100644
--- a/data-plane/core/src/main/java/dev/knative/eventing/kafka/broker/core/security/KafkaClientsAuth.java
+++ b/data-plane/core/src/main/java/dev/knative/eventing/kafka/broker/core/security/KafkaClientsAuth.java
@@ -13,7 +13,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package dev.knative.eventing.kafka.broker.core.security;
 
 import org.apache.kafka.clients.CommonClientConfigs;
diff --git a/data-plane/core/src/main/java/dev/knative/eventing/kafka/broker/core/security/KubernetesAuthProvider.java b/data-plane/core/src/main/java/dev/knative/eventing/kafka/broker/core/security/KubernetesAuthProvider.java
index e98c2d7d9..032aa2ea6 100644
--- a/data-plane/core/src/main/java/dev/knative/eventing/kafka/broker/core/security/KubernetesAuthProvider.java
+++ b/data-plane/core/src/main/java/dev/knative/eventing/kafka/broker/core/security/KubernetesAuthProvider.java
@@ -13,7 +13,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package dev.knative.eventing.kafka.broker.core.security;
 
 import io.fabric8.kubernetes.api.model.Secret;
diff --git a/data-plane/core/src/main/java/dev/knative/eventing/kafka/broker/core/security/KubernetesCredentials.java b/data-plane/core/src/main/java/dev/knative/eventing/kafka/broker/core/security/KubernetesCredentials.java
index 2fe3c1cff..608f24cfe 100644
--- a/data-plane/core/src/main/java/dev/knative/eventing/kafka/broker/core/security/KubernetesCredentials.java
+++ b/data-plane/core/src/main/java/dev/knative/eventing/kafka/broker/core/security/KubernetesCredentials.java
@@ -13,7 +13,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package dev.knative.eventing.kafka.broker.core.security;
 
 import io.fabric8.kubernetes.api.model.Secret;
diff --git a/data-plane/core/src/main/java/dev/knative/eventing/kafka/broker/core/security/PlaintextCredentials.java b/data-plane/core/src/main/java/dev/knative/eventing/kafka/broker/core/security/PlaintextCredentials.java
index 056603c49..5f2355967 100644
--- a/data-plane/core/src/main/java/dev/knative/eventing/kafka/broker/core/security/PlaintextCredentials.java
+++ b/data-plane/core/src/main/java/dev/knative/eventing/kafka/broker/core/security/PlaintextCredentials.java
@@ -13,7 +13,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package dev.knative.eventing.kafka.broker.core.security;
 
 import org.apache.kafka.common.security.auth.SecurityProtocol;
diff --git a/data-plane/pom.xml b/data-plane/pom.xml
index 5023df056..53f4a59da 100644
--- a/data-plane/pom.xml
+++ b/data-plane/pom.xml
@@ -38,8 +38,7 @@
     <maven.jacoco.plugin.version>0.8.7</maven.jacoco.plugin.version>
     <maven.enforcer.plugin.version>3.0.0-M3</maven.enforcer.plugin.version>
     <maven.license.plugin.version>2.0.0</maven.license.plugin.version>
-
-    <mycila.license.plugin.version>4.0</mycila.license.plugin.version>
+    <mycila.license.plugin.version>4.1</mycila.license.plugin.version>
 
     <!-- dependencies version -->
     <vertx.version>4.0.3</vertx.version>
@@ -449,13 +448,10 @@
           <licenseSets>
             <licenseSet>
               <header>com/mycila/maven/plugin/license/templates/APACHE-2.txt</header>
+              <includes>
+                <include>src/**/*.java</include>
+              </includes>
               <excludes>
-                <exclude>**/README</exclude>
-                <exclude>src/test/resources/**</exclude>
-                <exclude>src/main/resources/**</exclude>
-                <exclude>**/*.yaml</exclude>
-                <exclude>**/*.yml</exclude>
-                <exclude>**/*.txt</exclude>
                 <exclude>**/DataPlaneContract.java</exclude>
               </excludes>
             </licenseSet>
@@ -463,7 +459,7 @@
           <properties>
             <owner>Knative Authors</owner>
             <email>knative-dev@googlegroups.com</email>
-            <project.inceptionYear>2018</project.inceptionYear>
+            <year>2018</year>
           </properties>
         </configuration>
         <executions>
diff --git a/go.mod b/go.mod
index d11770153..b0e715f9d 100644
--- a/go.mod
+++ b/go.mod
@@ -21,8 +21,8 @@ require (
 	k8s.io/apiserver v0.19.7
 	k8s.io/client-go v0.19.7
 	k8s.io/utils v0.0.0-20210111153108-fddb29f9d009
-	knative.dev/eventing v0.23.0
+	knative.dev/eventing v0.23.1-0.20210519141116-23198cd5e612
 	knative.dev/hack v0.0.0-20210428122153-93ad9129c268
-	knative.dev/pkg v0.0.0-20210510175900-4564797bf3b7
-	knative.dev/reconciler-test v0.0.0-20210512062647-d5adf72546be
+	knative.dev/pkg v0.0.0-20210518131015-67897f4ec290
+	knative.dev/reconciler-test v0.0.0-20210514214942-8d70771450f1
 )
diff --git a/go.sum b/go.sum
index a8afa9cdf..6add42fbb 100644
--- a/go.sum
+++ b/go.sum
@@ -1261,15 +1261,17 @@ k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6/go.mod h1:UuqjUnNftUyPE5H
 k8s.io/utils v0.0.0-20200729134348-d5654de09c73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
 k8s.io/utils v0.0.0-20210111153108-fddb29f9d009 h1:0T5IaWHO3sJTEmCP6mUlBvMukxPKUQWqiI/YuiBNMiQ=
 k8s.io/utils v0.0.0-20210111153108-fddb29f9d009/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
-knative.dev/eventing v0.23.0 h1:0L1bVpll8kjdZNZ0FgNi4T0pPo4MmmDb6UJ06I9yHoM=
-knative.dev/eventing v0.23.0/go.mod h1:vGob3H6BTseZP+/dA5ze89gM+iNHlB2Cez8FFI7A9KM=
+knative.dev/eventing v0.23.1-0.20210519141116-23198cd5e612 h1:cOBa/dohIWyidtgcja+1g/aNva44yszeutsGYL24iuU=
+knative.dev/eventing v0.23.1-0.20210519141116-23198cd5e612/go.mod h1:vGob3H6BTseZP+/dA5ze89gM+iNHlB2Cez8FFI7A9KM=
 knative.dev/hack v0.0.0-20210428122153-93ad9129c268 h1:lBIj9Epd9UQ55NEaHzAdY/UZbuaegCdGPKVC2+Z68Q0=
 knative.dev/hack v0.0.0-20210428122153-93ad9129c268/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
 knative.dev/hack/schema v0.0.0-20210428122153-93ad9129c268/go.mod h1:ffjwmdcrH5vN3mPhO8RrF2KfNnbHeCE2C60A+2cv3U0=
-knative.dev/pkg v0.0.0-20210510175900-4564797bf3b7 h1:i4P8emOPrLctmbaPHp5eRIOqz+XTOkit7KgZeS+onKs=
 knative.dev/pkg v0.0.0-20210510175900-4564797bf3b7/go.mod h1:fIl4l4OmZodkElyaHoT0LCF5wT+3+P/kinawQ4XlLtE=
-knative.dev/reconciler-test v0.0.0-20210512062647-d5adf72546be h1:auIvV9JfTCZ/wROftfLy9JGOK2tyZtE9M0DR2nOFOOk=
+knative.dev/pkg v0.0.0-20210518131015-67897f4ec290 h1:JPptrA2SNKSAqsdzBkS+MTMYhGSOSJWPlu+cGKWNFjM=
+knative.dev/pkg v0.0.0-20210518131015-67897f4ec290/go.mod h1:fIl4l4OmZodkElyaHoT0LCF5wT+3+P/kinawQ4XlLtE=
 knative.dev/reconciler-test v0.0.0-20210512062647-d5adf72546be/go.mod h1:ZHvzjwe5aUnWDx+u5y9EPaZ++5PM9Yapp/IvBDiS+Yk=
+knative.dev/reconciler-test v0.0.0-20210514214942-8d70771450f1 h1:Xf/JUzEjkkmW5ppczck49Dpi828AuIdqzZFO5DwqdHs=
+knative.dev/reconciler-test v0.0.0-20210514214942-8d70771450f1/go.mod h1:ZHvzjwe5aUnWDx+u5y9EPaZ++5PM9Yapp/IvBDiS+Yk=
 modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw=
 modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk=
 modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k=
diff --git a/vendor/knative.dev/eventing/pkg/apis/messaging/v1/subscribable_channelable_validation.go b/vendor/knative.dev/eventing/pkg/apis/messaging/v1/subscribable_channelable_validation.go
index 14d4d20b6..72766a1f6 100644
--- a/vendor/knative.dev/eventing/pkg/apis/messaging/v1/subscribable_channelable_validation.go
+++ b/vendor/knative.dev/eventing/pkg/apis/messaging/v1/subscribable_channelable_validation.go
@@ -17,69 +17,27 @@ limitations under the License.
 package v1
 
 import (
-	"reflect"
+	"context"
 
-	"github.com/google/go-cmp/cmp"
-	corev1 "k8s.io/api/core/v1"
 	"k8s.io/apimachinery/pkg/api/equality"
 	"knative.dev/pkg/apis"
+	duckv1 "knative.dev/pkg/apis/duck/v1"
 )
 
-func isChannelEmpty(f corev1.ObjectReference) bool {
-	return equality.Semantic.DeepEqual(f, corev1.ObjectReference{})
+func isChannelEmpty(f duckv1.KReference) bool {
+	return equality.Semantic.DeepEqual(f, duckv1.KReference{})
 }
 
 // Valid if it is a valid object reference.
-func isValidChannel(f corev1.ObjectReference) *apis.FieldError {
-	return IsValidObjectReference(f)
-}
-
-func IsValidObjectReference(f corev1.ObjectReference) *apis.FieldError {
-	return checkRequiredObjectReferenceFields(f).
-		Also(checkDisallowedObjectReferenceFields(f))
-}
+func isValidChannel(ctx context.Context, f duckv1.KReference) *apis.FieldError {
+	errs := f.Validate(ctx)
 
-// Check the corev1.ObjectReference to make sure it has the required fields. They
-// are not checked for anything more except that they are set.
-func checkRequiredObjectReferenceFields(f corev1.ObjectReference) *apis.FieldError {
-	var errs *apis.FieldError
-	if f.Name == "" {
-		errs = errs.Also(apis.ErrMissingField("name"))
-	}
-	if f.APIVersion == "" {
-		errs = errs.Also(apis.ErrMissingField("apiVersion"))
-	}
-	if f.Kind == "" {
-		errs = errs.Also(apis.ErrMissingField("kind"))
-	}
-	return errs
-}
-
-// Check the corev1.ObjectReference to make sure it only has the following fields set:
-// Name, Kind, APIVersion
-// If any other fields are set and is not the Zero value, returns an apis.FieldError
-// with the fieldpaths for all those fields.
-func checkDisallowedObjectReferenceFields(f corev1.ObjectReference) *apis.FieldError {
-	disallowedFields := []string{}
-	// See if there are any fields that have been set that should not be.
-	// TODO: Hoist this kind of stuff into pkg repository.
-	s := reflect.ValueOf(f)
-	typeOf := s.Type()
-	for i := 0; i < s.NumField(); i++ {
-		field := s.Field(i)
-		fieldName := typeOf.Field(i).Name
-		if fieldName == "Name" || fieldName == "Kind" || fieldName == "APIVersion" {
-			continue
-		}
-		if !cmp.Equal(field.Interface(), reflect.Zero(field.Type()).Interface()) {
-			disallowedFields = append(disallowedFields, fieldName)
-		}
-	}
-	if len(disallowedFields) > 0 {
-		fe := apis.ErrDisallowedFields(disallowedFields...)
+	// Namespace field is disallowed
+	if f.Namespace != "" {
+		fe := apis.ErrDisallowedFields("namespace")
 		fe.Details = "only name, apiVersion and kind are supported fields"
-		return fe
+		errs = errs.Also(fe)
 	}
-	return nil
 
+	return errs
 }
diff --git a/vendor/knative.dev/eventing/pkg/apis/messaging/v1/subscription_types.go b/vendor/knative.dev/eventing/pkg/apis/messaging/v1/subscription_types.go
index 187bc8fff..8add6a98f 100644
--- a/vendor/knative.dev/eventing/pkg/apis/messaging/v1/subscription_types.go
+++ b/vendor/knative.dev/eventing/pkg/apis/messaging/v1/subscription_types.go
@@ -17,7 +17,6 @@ limitations under the License.
 package v1
 
 import (
-	corev1 "k8s.io/api/core/v1"
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 	"k8s.io/apimachinery/pkg/runtime"
 	"k8s.io/apimachinery/pkg/runtime/schema"
@@ -74,11 +73,11 @@ var (
 // channel --> reply
 type SubscriptionSpec struct {
 	// Reference to a channel that will be used to create the subscription
-	// You can specify only the following fields of the ObjectReference:
+	// You can specify only the following fields of the KReference:
 	//   - Kind
 	//   - APIVersion
 	//   - Name
-	//  The resource pointed by this ObjectReference must meet the
+	// The resource pointed by this KReference must meet the
 	// contract to the ChannelableSpec duck type. If the resource does not
 	// meet this contract it will be reflected in the Subscription's status.
 	//
@@ -89,7 +88,7 @@ type SubscriptionSpec struct {
 	// channel, giving the user more control over what semantics should
 	// be used (drain the channel first, possibly have events dropped,
 	// etc.)
-	Channel corev1.ObjectReference `json:"channel"`
+	Channel duckv1.KReference `json:"channel"`
 
 	// Subscriber is reference to (optional) function for processing events.
 	// Events from the Channel will be delivered here and replies are
diff --git a/vendor/knative.dev/eventing/pkg/apis/messaging/v1/subscription_validation.go b/vendor/knative.dev/eventing/pkg/apis/messaging/v1/subscription_validation.go
index f2496bc7a..93bcdf8c0 100644
--- a/vendor/knative.dev/eventing/pkg/apis/messaging/v1/subscription_validation.go
+++ b/vendor/knative.dev/eventing/pkg/apis/messaging/v1/subscription_validation.go
@@ -44,7 +44,7 @@ func (ss *SubscriptionSpec) Validate(ctx context.Context) *apis.FieldError {
 		fe := apis.ErrMissingField("channel")
 		fe.Details = "the Subscription must reference a channel"
 		return fe
-	} else if fe := isValidChannel(ss.Channel); fe != nil {
+	} else if fe := isValidChannel(ctx, ss.Channel); fe != nil {
 		errs = errs.Also(fe.ViaField("channel"))
 	}
 
diff --git a/vendor/knative.dev/pkg/apis/duck/v1beta1/destination.go b/vendor/knative.dev/pkg/apis/duck/v1beta1/destination.go
index fe0f5d171..4e369b872 100644
--- a/vendor/knative.dev/pkg/apis/duck/v1beta1/destination.go
+++ b/vendor/knative.dev/pkg/apis/duck/v1beta1/destination.go
@@ -136,10 +136,7 @@ func (dest *Destination) GetRef() *corev1.ObjectReference {
 	if dest.Ref != nil {
 		return dest.Ref
 	}
-	if ref := dest.deprecatedObjectReference(); ref != nil {
-		return ref
-	}
-	return nil
+	return dest.deprecatedObjectReference()
 }
 
 func validateDestinationRef(ref corev1.ObjectReference) *apis.FieldError {
diff --git a/vendor/knative.dev/pkg/leaderelection/chaosduck/main.go b/vendor/knative.dev/pkg/leaderelection/chaosduck/main.go
index 2ad685fe3..686b36e01 100644
--- a/vendor/knative.dev/pkg/leaderelection/chaosduck/main.go
+++ b/vendor/knative.dev/pkg/leaderelection/chaosduck/main.go
@@ -24,6 +24,7 @@ import (
 	"errors"
 	"flag"
 	"log"
+	"regexp"
 	"strings"
 	"time"
 
@@ -44,14 +45,16 @@ import (
 type components map[string]sets.String
 
 var (
-	disabledComponents kflag.StringSet
-	tributePeriod      time.Duration = 20 * time.Second
-	tributeFactor                    = 2.0
+	disabledComponents      kflag.StringSet
+	disabledComponentsRegex kflag.StringSet
+	tributePeriod           = 20 * time.Second
+	tributeFactor           = 2.0
 )
 
 func init() {
 	// Note that we don't explicitly call flag.Parse() because ParseAndGetConfigOrDie below does this already.
 	flag.Var(&disabledComponents, "disable", "A repeatable flag to disable chaos for certain components.")
+	flag.Var(&disabledComponentsRegex, "disableRegex", "A repeatable flag to disable chaos for components matching one of the passed regexes.")
 	flag.DurationVar(&tributePeriod, "period", tributePeriod, "How frequently to terminate a leader pod per component (this is the base duration used with the jitter factor from -factor).")
 	flag.Float64Var(&tributeFactor, "factor", tributeFactor, "The jitter factor to apply to the period.")
 }
@@ -116,11 +119,25 @@ func quack(ctx context.Context, kc kubernetes.Interface, component string, leade
 	return kc.CoreV1().Pods(system.Namespace()).Delete(ctx, tribute, metav1.DeleteOptions{})
 }
 
+// matchesAny returns true if any of the given regexes matches the given string.
+func matchesAny(regexes []*regexp.Regexp, str string) bool {
+	for _, re := range regexes {
+		if re.MatchString(str) {
+			return true
+		}
+	}
+	return false
+}
+
 func main() {
 	ctx, _ := injection.EnableInjectionOrDie(signals.NewContext(), nil)
-
 	kc := kubeclient.Get(ctx)
 
+	regexes := make([]*regexp.Regexp, 0, len(disabledComponentsRegex.Value))
+	for re := range disabledComponentsRegex.Value {
+		regexes = append(regexes, regexp.MustCompile(re))
+	}
+
 	// Until we are shutdown, build up an index of components and kill
 	// of a leader at the specified frequency.
 	wait.JitterUntilWithContext(ctx, func(ctx context.Context) {
@@ -132,9 +149,10 @@ func main() {
 
 		eg, ctx := errgroup.WithContext(ctx)
 		for name, leaders := range components {
-			if disabledComponents.Value.Has(name) {
+			if disabledComponents.Value.Has(name) || matchesAny(regexes, name) {
 				continue
 			}
+
 			name, leaders := name, leaders
 			eg.Go(func() error {
 				return quack(ctx, kc, name, leaders)
diff --git a/vendor/modules.txt b/vendor/modules.txt
index 1d57c578f..e9dc6f2fa 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -1015,7 +1015,7 @@ k8s.io/utils/buffer
 k8s.io/utils/integer
 k8s.io/utils/pointer
 k8s.io/utils/trace
-# knative.dev/eventing v0.23.0
+# knative.dev/eventing v0.23.1-0.20210519141116-23198cd5e612
 ## explicit
 knative.dev/eventing/pkg/apis/config
 knative.dev/eventing/pkg/apis/duck
@@ -1117,7 +1117,7 @@ knative.dev/eventing/test/test_images/request-sender
 # knative.dev/hack v0.0.0-20210428122153-93ad9129c268
 ## explicit
 knative.dev/hack
-# knative.dev/pkg v0.0.0-20210510175900-4564797bf3b7
+# knative.dev/pkg v0.0.0-20210518131015-67897f4ec290
 ## explicit
 knative.dev/pkg/apis
 knative.dev/pkg/apis/duck
@@ -1206,7 +1206,7 @@ knative.dev/pkg/webhook/certificates/resources
 knative.dev/pkg/webhook/resourcesemantics
 knative.dev/pkg/webhook/resourcesemantics/defaulting
 knative.dev/pkg/webhook/resourcesemantics/validation
-# knative.dev/reconciler-test v0.0.0-20210512062647-d5adf72546be
+# knative.dev/reconciler-test v0.0.0-20210514214942-8d70771450f1
 ## explicit
 knative.dev/reconciler-test/cmd/eventshub
 knative.dev/reconciler-test/pkg/environment


Test patch:
diff --git a/control-plane/pkg/reconciler/trigger/trigger_test.go b/control-plane/pkg/reconciler/trigger/trigger_test.go
index f9aa522cd..0b7cd65c6 100644
--- a/control-plane/pkg/reconciler/trigger/trigger_test.go
+++ b/control-plane/pkg/reconciler/trigger/trigger_test.go
@@ -148,7 +148,7 @@ func triggerReconciliation(t *testing.T, format string, configs broker.Configs)
 						withSubscriberURI,
 						reconcilertesting.WithTriggerDependencyReady(),
 						reconcilertesting.WithTriggerBrokerReady(),
-						reconcilertesting.WithTriggerSubscriberResolvedSucceeded(),
+						withTriggerSubscriberResolvedSucceeded(contract.DeliveryOrder_UNORDERED),
 					),
 				},
 			},
@@ -210,7 +210,7 @@ func triggerReconciliation(t *testing.T, format string, configs broker.Configs)
 						withSubscriberURI,
 						reconcilertesting.WithTriggerDependencyReady(),
 						reconcilertesting.WithTriggerBrokerReady(),
-						reconcilertesting.WithTriggerSubscriberResolvedSucceeded(),
+						withTriggerSubscriberResolvedSucceeded(contract.DeliveryOrder_ORDERED),
 						reconcilertesting.WithAnnotation(deliveryOrderAnnotation, deliveryOrderOrdered),
 					),
 				},
@@ -273,7 +273,7 @@ func triggerReconciliation(t *testing.T, format string, configs broker.Configs)
 						withSubscriberURI,
 						reconcilertesting.WithTriggerDependencyReady(),
 						reconcilertesting.WithTriggerBrokerReady(),
-						reconcilertesting.WithTriggerSubscriberResolvedSucceeded(),
+						withTriggerSubscriberResolvedSucceeded(contract.DeliveryOrder_UNORDERED),
 						reconcilertesting.WithAnnotation(deliveryOrderAnnotation, deliveryOrderUnordered),
 					),
 				},
@@ -342,7 +342,7 @@ func triggerReconciliation(t *testing.T, format string, configs broker.Configs)
 						withSubscriberURI,
 						reconcilertesting.WithTriggerDependencyReady(),
 						reconcilertesting.WithTriggerBrokerReady(),
-						reconcilertesting.WithTriggerSubscriberResolvedSucceeded(),
+						withTriggerSubscriberResolvedSucceeded(contract.DeliveryOrder_UNORDERED),
 					),
 				},
 			},
@@ -454,7 +454,7 @@ func triggerReconciliation(t *testing.T, format string, configs broker.Configs)
 						withSubscriberURI,
 						reconcilertesting.WithTriggerDependencyReady(),
 						reconcilertesting.WithTriggerBrokerReady(),
-						reconcilertesting.WithTriggerSubscriberResolvedSucceeded(),
+						withTriggerSubscriberResolvedSucceeded(contract.DeliveryOrder_UNORDERED),
 					),
 				},
 			},
@@ -751,7 +751,7 @@ func triggerReconciliation(t *testing.T, format string, configs broker.Configs)
 						withSubscriberURI,
 						reconcilertesting.WithTriggerDependencyReady(),
 						reconcilertesting.WithTriggerBrokerReady(),
-						reconcilertesting.WithTriggerSubscriberResolvedSucceeded(),
+						withTriggerSubscriberResolvedSucceeded(contract.DeliveryOrder_UNORDERED),
 					),
 				},
 			},
@@ -937,7 +937,7 @@ func triggerReconciliation(t *testing.T, format string, configs broker.Configs)
 						withSubscriberURI,
 						reconcilertesting.WithTriggerDependencyReady(),
 						reconcilertesting.WithTriggerBrokerReady(),
-						reconcilertesting.WithTriggerSubscriberResolvedSucceeded(),
+						withTriggerSubscriberResolvedSucceeded(contract.DeliveryOrder_UNORDERED),
 					),
 				},
 			},
@@ -1118,7 +1118,7 @@ func triggerReconciliation(t *testing.T, format string, configs broker.Configs)
 						withSubscriberURI,
 						reconcilertesting.WithTriggerDependencyReady(),
 						reconcilertesting.WithTriggerBrokerReady(),
-						reconcilertesting.WithTriggerSubscriberResolvedSucceeded(),
+						withTriggerSubscriberResolvedSucceeded(contract.DeliveryOrder_UNORDERED),
 					),
 				},
 			},
@@ -1363,7 +1363,7 @@ func triggerReconciliation(t *testing.T, format string, configs broker.Configs)
 						withSubscriberURI,
 						reconcilertesting.WithTriggerDependencyReady(),
 						reconcilertesting.WithTriggerBrokerReady(),
-						reconcilertesting.WithTriggerSubscriberResolvedSucceeded(),
+						withTriggerSubscriberResolvedSucceeded(contract.DeliveryOrder_UNORDERED),
 					),
 				},
 			},
@@ -2188,6 +2188,16 @@ func withSubscriberURI(trigger *eventing.Trigger) {
 	trigger.Status.SubscriberURI = u
 }
 
+func withTriggerSubscriberResolvedSucceeded(deliveryOrder contract.DeliveryOrder) func(*eventing.Trigger) {
+	return func(t *eventing.Trigger) {
+		t.GetConditionSet().Manage(&t.Status).MarkTrueWithReason(
+			eventing.TriggerConditionSubscriberResolved,
+			string(eventing.TriggerConditionSubscriberResolved),
+			fmt.Sprintf("Subscriber will receive events with the delivery order: %s", deliveryOrder.String()),
+		)
+	}
+}
+
 func patchFinalizers() clientgotesting.PatchActionImpl {
 	action := clientgotesting.PatchActionImpl{}
 	action.Name = triggerName
diff --git a/data-plane/core/src/test/java/dev/knative/eventing/kafka/broker/core/security/CredentialsValidatorTest.java b/data-plane/core/src/test/java/dev/knative/eventing/kafka/broker/core/security/CredentialsValidatorTest.java
index a4071a5b1..49d590128 100644
--- a/data-plane/core/src/test/java/dev/knative/eventing/kafka/broker/core/security/CredentialsValidatorTest.java
+++ b/data-plane/core/src/test/java/dev/knative/eventing/kafka/broker/core/security/CredentialsValidatorTest.java
@@ -13,7 +13,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package dev.knative.eventing.kafka.broker.core.security;
 
 import org.apache.kafka.common.security.auth.SecurityProtocol;
diff --git a/data-plane/core/src/test/java/dev/knative/eventing/kafka/broker/core/security/KafkaClientsAuthTest.java b/data-plane/core/src/test/java/dev/knative/eventing/kafka/broker/core/security/KafkaClientsAuthTest.java
index 4720d1bed..8b08e44f5 100644
--- a/data-plane/core/src/test/java/dev/knative/eventing/kafka/broker/core/security/KafkaClientsAuthTest.java
+++ b/data-plane/core/src/test/java/dev/knative/eventing/kafka/broker/core/security/KafkaClientsAuthTest.java
@@ -13,7 +13,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package dev.knative.eventing.kafka.broker.core.security;
 
 import static org.assertj.core.api.Assertions.assertThat;
diff --git a/data-plane/core/src/test/java/dev/knative/eventing/kafka/broker/core/security/KubernetesAuthProviderTest.java b/data-plane/core/src/test/java/dev/knative/eventing/kafka/broker/core/security/KubernetesAuthProviderTest.java
index 9e4e225e7..9192ee213 100644
--- a/data-plane/core/src/test/java/dev/knative/eventing/kafka/broker/core/security/KubernetesAuthProviderTest.java
+++ b/data-plane/core/src/test/java/dev/knative/eventing/kafka/broker/core/security/KubernetesAuthProviderTest.java
@@ -13,7 +13,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package dev.knative.eventing.kafka.broker.core.security;
 
 import io.fabric8.kubernetes.api.model.SecretBuilder;
diff --git a/data-plane/core/src/test/java/dev/knative/eventing/kafka/broker/core/security/KubernetesCredentialsTest.java b/data-plane/core/src/test/java/dev/knative/eventing/kafka/broker/core/security/KubernetesCredentialsTest.java
index a09fbc927..3638127b5 100644
--- a/data-plane/core/src/test/java/dev/knative/eventing/kafka/broker/core/security/KubernetesCredentialsTest.java
+++ b/data-plane/core/src/test/java/dev/knative/eventing/kafka/broker/core/security/KubernetesCredentialsTest.java
@@ -13,7 +13,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package dev.knative.eventing.kafka.broker.core.security;
 
 import io.fabric8.kubernetes.api.model.Secret;
diff --git a/data-plane/core/src/test/java/dev/knative/eventing/kafka/broker/core/testing/CloudEventSerializerMock.java b/data-plane/core/src/test/java/dev/knative/eventing/kafka/broker/core/testing/CloudEventSerializerMock.java
index c6023c4b9..d41ba3773 100644
--- a/data-plane/core/src/test/java/dev/knative/eventing/kafka/broker/core/testing/CloudEventSerializerMock.java
+++ b/data-plane/core/src/test/java/dev/knative/eventing/kafka/broker/core/testing/CloudEventSerializerMock.java
@@ -13,7 +13,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package dev.knative.eventing.kafka.broker.core.testing;
 
 import io.cloudevents.CloudEvent;
diff --git a/test/e2e_new/trigger_finalizer_test.go b/test/e2e_new/trigger_finalizer_test.go
index 5ef060171..3d903df12 100644
--- a/test/e2e_new/trigger_finalizer_test.go
+++ b/test/e2e_new/trigger_finalizer_test.go
@@ -52,6 +52,7 @@ func TestTriggerNoFinalizerOnBrokerNotFound(t *testing.T) {
 	env.Test(ctx, t, triggerNoFinalizerOnBrokerNotFound())
 }
 
+//nolint:golint,unused
 func triggerNoFinalizerOnBrokerNotFound() *feature.Feature {
 
 	f := feature.NewFeature()
diff --git a/vendor/knative.dev/eventing/pkg/reconciler/testing/v1/listers.go b/vendor/knative.dev/eventing/pkg/reconciler/testing/v1/listers.go
index cc6d07494..844955b57 100644
--- a/vendor/knative.dev/eventing/pkg/reconciler/testing/v1/listers.go
+++ b/vendor/knative.dev/eventing/pkg/reconciler/testing/v1/listers.go
@@ -37,14 +37,12 @@ import (
 	flowsv1 "knative.dev/eventing/pkg/apis/flows/v1"
 	messagingv1 "knative.dev/eventing/pkg/apis/messaging/v1"
 	sourcesv1 "knative.dev/eventing/pkg/apis/sources/v1"
-	sourcesv1beta2 "knative.dev/eventing/pkg/apis/sources/v1beta2"
 	fakeeventingclientset "knative.dev/eventing/pkg/client/clientset/versioned/fake"
 	eventinglisters "knative.dev/eventing/pkg/client/listers/eventing/v1"
 	eventingv1beta1listers "knative.dev/eventing/pkg/client/listers/eventing/v1beta1"
 	flowslisters "knative.dev/eventing/pkg/client/listers/flows/v1"
 	messaginglisters "knative.dev/eventing/pkg/client/listers/messaging/v1"
 	sourcelisters "knative.dev/eventing/pkg/client/listers/sources/v1"
-	sourcev1beta2listers "knative.dev/eventing/pkg/client/listers/sources/v1beta2"
 	duckv1 "knative.dev/pkg/apis/duck/v1"
 	"knative.dev/pkg/reconciler/testing"
 )
@@ -124,8 +122,8 @@ func (l *Listers) GetEventTypeLister() eventingv1beta1listers.EventTypeLister {
 	return eventingv1beta1listers.NewEventTypeLister(l.indexerFor(&eventingv1beta1.EventType{}))
 }
 
-func (l *Listers) GetPingSourceV1beta2Lister() sourcev1beta2listers.PingSourceLister {
-	return sourcev1beta2listers.NewPingSourceLister(l.indexerFor(&sourcesv1beta2.PingSource{}))
+func (l *Listers) GetPingSourceLister() sourcelisters.PingSourceLister {
+	return sourcelisters.NewPingSourceLister(l.indexerFor(&sourcesv1.PingSource{}))
 }
 
 func (l *Listers) GetSubscriptionLister() messaginglisters.SubscriptionLister {
diff --git a/vendor/knative.dev/eventing/pkg/reconciler/testing/v1/subscription.go b/vendor/knative.dev/eventing/pkg/reconciler/testing/v1/subscription.go
index d3f4415e2..b4dd4083a 100644
--- a/vendor/knative.dev/eventing/pkg/reconciler/testing/v1/subscription.go
+++ b/vendor/knative.dev/eventing/pkg/reconciler/testing/v1/subscription.go
@@ -23,7 +23,6 @@ import (
 
 	"k8s.io/apimachinery/pkg/types"
 
-	corev1 "k8s.io/api/core/v1"
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 
 	eventingduckv1 "knative.dev/eventing/pkg/apis/duck/v1"
@@ -118,7 +117,7 @@ func WithSubscriptionLabels(labels map[string]string) SubscriptionOption {
 
 func WithSubscriptionChannel(gvk metav1.GroupVersionKind, name string) SubscriptionOption {
 	return func(s *v1.Subscription) {
-		s.Spec.Channel = corev1.ObjectReference{
+		s.Spec.Channel = duckv1.KReference{
 			APIVersion: apiVersion(gvk),
 			Kind:       gvk.Kind,
 			Name:       name,
diff --git a/vendor/knative.dev/eventing/test/lib/resources/eventing.go b/vendor/knative.dev/eventing/test/lib/resources/eventing.go
index 6c71ca99b..cf7667330 100644
--- a/vendor/knative.dev/eventing/test/lib/resources/eventing.go
+++ b/vendor/knative.dev/eventing/test/lib/resources/eventing.go
@@ -23,14 +23,12 @@ import (
 
 	corev1 "k8s.io/api/core/v1"
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-	"knative.dev/pkg/apis"
-	duckv1 "knative.dev/pkg/apis/duck/v1"
-	pkgTest "knative.dev/pkg/test"
-
 	eventingduckv1 "knative.dev/eventing/pkg/apis/duck/v1"
 	eventingduckv1beta1 "knative.dev/eventing/pkg/apis/duck/v1beta1"
 	eventingv1 "knative.dev/eventing/pkg/apis/eventing/v1"
 	messagingv1 "knative.dev/eventing/pkg/apis/messaging/v1"
+	"knative.dev/pkg/apis"
+	duckv1 "knative.dev/pkg/apis/duck/v1"
 )
 
 // BrokerOption enables further configuration of a v1 Broker.
@@ -46,8 +44,12 @@ type SubscriptionOption func(*messagingv1.Subscription)
 type DeliveryOption func(*eventingduckv1beta1.DeliverySpec)
 
 // channelRef returns an ObjectReference for a given Channel name.
-func channelRef(name string, typemeta *metav1.TypeMeta) *corev1.ObjectReference {
-	return pkgTest.CoreV1ObjectReference(typemeta.Kind, typemeta.APIVersion, name)
+func channelRef(name string, typemeta *metav1.TypeMeta) duckv1.KReference {
+	return duckv1.KReference{
+		Kind:       typemeta.Kind,
+		APIVersion: typemeta.APIVersion,
+		Name:       name,
+	}
 }
 
 func KnativeRefForService(name, namespace string) *duckv1.KReference {
@@ -124,7 +126,7 @@ func Subscription(
 			Name: name,
 		},
 		Spec: messagingv1.SubscriptionSpec{
-			Channel: *channelRef(channelName, channelTypeMeta),
+			Channel: channelRef(channelName, channelTypeMeta),
 		},
 	}
 	for _, option := range options {