From fc440242aca128e5126d3ee8b80bc7a44fd03c78 Mon Sep 17 00:00:00 2001 From: Ali Ok Date: Tue, 27 Apr 2021 18:28:53 +0300 Subject: [PATCH] More v1 (#5316) * More v1 * Address comments, fix tests * Goimports * Revert mistake * Fix test --- pkg/adapter/apiserver/adapter.go | 4 +-- .../eventing/v1/trigger_validation_test.go | 10 ++++---- pkg/apis/flows/v1/sequence_lifecycle_test.go | 4 +-- ...ubscribable_channelable_validation_test.go | 4 +-- .../sources/v1/apiserver_defaults_test.go | 8 +++--- .../sources/v1/apiserver_validation_test.go | 12 ++++----- .../sources/v1/container_validation_test.go | 2 +- .../apiserversource/apiserversource_test.go | 3 +-- pkg/reconciler/broker/config_test.go | 2 +- .../broker/testdata/config-broker.yaml | 2 +- pkg/reconciler/parallel/parallel_test.go | 4 +-- pkg/reconciler/sequence/sequence_test.go | 4 +-- .../subscription/subscription_test.go | 25 +++++++++---------- pkg/reconciler/testing/listers.go | 4 +-- pkg/reconciler/testing/v1/listers.go | 4 +-- 15 files changed, 45 insertions(+), 47 deletions(-) diff --git a/pkg/adapter/apiserver/adapter.go b/pkg/adapter/apiserver/adapter.go index 793672bd0fa..48dfef9b815 100644 --- a/pkg/adapter/apiserver/adapter.go +++ b/pkg/adapter/apiserver/adapter.go @@ -30,7 +30,7 @@ import ( "k8s.io/client-go/dynamic" "k8s.io/client-go/tools/cache" "knative.dev/eventing/pkg/adapter/v2" - "knative.dev/eventing/pkg/apis/sources/v1alpha2" + v1 "knative.dev/eventing/pkg/apis/sources/v1" ) type envConfig struct { @@ -66,7 +66,7 @@ func (a *apiServerAdapter) start(ctx context.Context, stopCh <-chan struct{}) er ce: a.ce, source: a.source, logger: a.logger, - ref: a.config.EventMode == v1alpha2.ReferenceMode, + ref: a.config.EventMode == v1.ReferenceMode, } if a.config.ResourceOwner != nil { diff --git a/pkg/apis/eventing/v1/trigger_validation_test.go b/pkg/apis/eventing/v1/trigger_validation_test.go index 7229f032cec..1d4d165e543 100644 --- a/pkg/apis/eventing/v1/trigger_validation_test.go +++ b/pkg/apis/eventing/v1/trigger_validation_test.go @@ -41,14 +41,14 @@ var ( Namespace: "namespace", Name: "subscriber_test", Kind: "Service", - APIVersion: "serving.knative.dev/v1alpha1", + APIVersion: "serving.knative.dev/v1", }, } invalidSubscriber = duckv1.Destination{ Ref: &duckv1.KReference{ Namespace: "namespace", Kind: "Service", - APIVersion: "serving.knative.dev/v1alpha1", + APIVersion: "serving.knative.dev/v1", }, } // Dependency annotation @@ -114,7 +114,7 @@ func TestTriggerValidation(t *testing.T) { ObjectMeta: v1.ObjectMeta{ Namespace: "test-ns-1", Annotations: map[string]string{ - DependencyAnnotation: `{"kind":"PingSource","namespace":"test-ns-2", "name":"test-ping-source","apiVersion":"sources.knative.dev/v1alpha1"}`, + DependencyAnnotation: `{"kind":"PingSource","namespace":"test-ns-2", "name":"test-ping-source","apiVersion":"sources.knative.dev/v1beta2"}`, }}, Spec: TriggerSpec{ Broker: "test_broker", @@ -132,7 +132,7 @@ func TestTriggerValidation(t *testing.T) { ObjectMeta: v1.ObjectMeta{ Namespace: "test-ns", Annotations: map[string]string{ - DependencyAnnotation: `{"name":"test-ping-source","apiVersion":"sources.knative.dev/v1alpha1"}`, + DependencyAnnotation: `{"name":"test-ping-source","apiVersion":"sources.knative.dev/v1beta2"}`, }}, Spec: TriggerSpec{ Broker: "test_broker", @@ -149,7 +149,7 @@ func TestTriggerValidation(t *testing.T) { ObjectMeta: v1.ObjectMeta{ Namespace: "test-ns", Annotations: map[string]string{ - DependencyAnnotation: `{"kind":"PingSource","apiVersion":"sources.knative.dev/v1alpha1"}`, + DependencyAnnotation: `{"kind":"PingSource","apiVersion":"sources.knative.dev/v1"}`, }}, Spec: TriggerSpec{ Broker: "test_broker", diff --git a/pkg/apis/flows/v1/sequence_lifecycle_test.go b/pkg/apis/flows/v1/sequence_lifecycle_test.go index 8d406f4aa09..6190e71c4e0 100644 --- a/pkg/apis/flows/v1/sequence_lifecycle_test.go +++ b/pkg/apis/flows/v1/sequence_lifecycle_test.go @@ -45,7 +45,7 @@ func TestSequenceGetConditionSet(t *testing.T) { func getSubscription(name string, ready bool) *messagingv1.Subscription { s := messagingv1.Subscription{ TypeMeta: metav1.TypeMeta{ - APIVersion: "eventing.knative.dev/v1alpha1", + APIVersion: "messaging.knative.dev/v1", Kind: "Subscription", }, ObjectMeta: metav1.ObjectMeta{ @@ -217,7 +217,7 @@ func TestSequencePropagateSubscriptionStatuses(t *testing.T) { name: "empty status", subs: []*messagingv1.Subscription{{ TypeMeta: metav1.TypeMeta{ - APIVersion: "eventing.knative.dev/v1alpha1", + APIVersion: "messaging.knative.dev/v1", Kind: "Subscription", }, ObjectMeta: metav1.ObjectMeta{ diff --git a/pkg/apis/messaging/v1/subscribable_channelable_validation_test.go b/pkg/apis/messaging/v1/subscribable_channelable_validation_test.go index c0d7b253c24..0a7af6785f4 100644 --- a/pkg/apis/messaging/v1/subscribable_channelable_validation_test.go +++ b/pkg/apis/messaging/v1/subscribable_channelable_validation_test.go @@ -33,7 +33,7 @@ var validationTests = []struct { name: "valid object ref", ref: corev1.ObjectReference{ Name: "boaty-mcboatface", - APIVersion: "messaging.knative.dev/v1alpha1", + APIVersion: "messaging.knative.dev/v1", Kind: "MyChannel", }, want: nil, @@ -42,7 +42,7 @@ var validationTests = []struct { name: "invalid object ref", ref: corev1.ObjectReference{ Name: "boaty-mcboatface", - APIVersion: "messaging.knative.dev/v1alpha1", + APIVersion: "messaging.knative.dev/v1", Kind: "", }, want: apis.ErrMissingField("kind"), diff --git a/pkg/apis/sources/v1/apiserver_defaults_test.go b/pkg/apis/sources/v1/apiserver_defaults_test.go index 894b3b5d4ab..d82c7cfc28b 100644 --- a/pkg/apis/sources/v1/apiserver_defaults_test.go +++ b/pkg/apis/sources/v1/apiserver_defaults_test.go @@ -45,7 +45,7 @@ func TestApiServerSourceDefaults(t *testing.T) { SourceSpec: duckv1.SourceSpec{ Sink: duckv1.Destination{ Ref: &duckv1.KReference{ - APIVersion: "v1alpha1", + APIVersion: "v1", Kind: "broker", Name: "default", }, @@ -68,7 +68,7 @@ func TestApiServerSourceDefaults(t *testing.T) { SourceSpec: duckv1.SourceSpec{ Sink: duckv1.Destination{ Ref: &duckv1.KReference{ - APIVersion: "v1alpha1", + APIVersion: "v1", Kind: "broker", Name: "default", }, @@ -92,7 +92,7 @@ func TestApiServerSourceDefaults(t *testing.T) { SourceSpec: duckv1.SourceSpec{ Sink: duckv1.Destination{ Ref: &duckv1.KReference{ - APIVersion: "v1alpha1", + APIVersion: "v1", Kind: "broker", Name: "default", }, @@ -115,7 +115,7 @@ func TestApiServerSourceDefaults(t *testing.T) { SourceSpec: duckv1.SourceSpec{ Sink: duckv1.Destination{ Ref: &duckv1.KReference{ - APIVersion: "v1alpha1", + APIVersion: "v1", Kind: "broker", Name: "default", }, diff --git a/pkg/apis/sources/v1/apiserver_validation_test.go b/pkg/apis/sources/v1/apiserver_validation_test.go index 1d714708475..62e68db2ee4 100644 --- a/pkg/apis/sources/v1/apiserver_validation_test.go +++ b/pkg/apis/sources/v1/apiserver_validation_test.go @@ -43,7 +43,7 @@ func TestAPIServerValidation(t *testing.T) { SourceSpec: duckv1.SourceSpec{ Sink: duckv1.Destination{ Ref: &duckv1.KReference{ - APIVersion: "v1alpha1", + APIVersion: "v1", Kind: "broker", Name: "default", }, @@ -76,7 +76,7 @@ func TestAPIServerValidation(t *testing.T) { SourceSpec: duckv1.SourceSpec{ Sink: duckv1.Destination{ Ref: &duckv1.KReference{ - APIVersion: "v1alpha1", + APIVersion: "v1", Kind: "broker", Name: "default", }, @@ -99,7 +99,7 @@ func TestAPIServerValidation(t *testing.T) { SourceSpec: duckv1.SourceSpec{ Sink: duckv1.Destination{ Ref: &duckv1.KReference{ - APIVersion: "v1alpha1", + APIVersion: "v1", Kind: "broker", Name: "default", }, @@ -117,7 +117,7 @@ func TestAPIServerValidation(t *testing.T) { SourceSpec: duckv1.SourceSpec{ Sink: duckv1.Destination{ Ref: &duckv1.KReference{ - APIVersion: "v1alpha1", + APIVersion: "v1", Kind: "broker", Name: "default", }, @@ -136,7 +136,7 @@ func TestAPIServerValidation(t *testing.T) { SourceSpec: duckv1.SourceSpec{ Sink: duckv1.Destination{ Ref: &duckv1.KReference{ - APIVersion: "v1alpha1", + APIVersion: "v1", Kind: "broker", Name: "default", }, @@ -159,7 +159,7 @@ func TestAPIServerValidation(t *testing.T) { SourceSpec: duckv1.SourceSpec{ Sink: duckv1.Destination{ Ref: &duckv1.KReference{ - APIVersion: "v1alpha1", + APIVersion: "v1", Kind: "broker", Name: "default", }, diff --git a/pkg/apis/sources/v1/container_validation_test.go b/pkg/apis/sources/v1/container_validation_test.go index 79ce0fe8507..6917b96d5ec 100644 --- a/pkg/apis/sources/v1/container_validation_test.go +++ b/pkg/apis/sources/v1/container_validation_test.go @@ -38,7 +38,7 @@ func TestContainerSourceValidation(t *testing.T) { SourceSpec: duckv1.SourceSpec{ Sink: duckv1.Destination{ Ref: &duckv1.KReference{ - APIVersion: "v1beta1", + APIVersion: "v1", Kind: "Broker", Name: "default", }, diff --git a/pkg/reconciler/apiserversource/apiserversource_test.go b/pkg/reconciler/apiserversource/apiserversource_test.go index 49a7d4c3661..7bf11f979f2 100644 --- a/pkg/reconciler/apiserversource/apiserversource_test.go +++ b/pkg/reconciler/apiserversource/apiserversource_test.go @@ -37,7 +37,6 @@ import ( reconcilersource "knative.dev/eventing/pkg/reconciler/source" "knative.dev/pkg/apis" duckv1 "knative.dev/pkg/apis/duck/v1" - duckv1alpha1 "knative.dev/pkg/apis/duck/v1alpha1" "knative.dev/pkg/client/injection/ducks/duck/v1/addressable" _ "knative.dev/pkg/client/injection/ducks/duck/v1beta1/addressable/fake" fakekubeclient "knative.dev/pkg/client/injection/kube/client/fake" @@ -93,7 +92,7 @@ func init() { // Add types to scheme _ = appsv1.AddToScheme(scheme.Scheme) _ = corev1.AddToScheme(scheme.Scheme) - _ = duckv1alpha1.AddToScheme(scheme.Scheme) + _ = duckv1.AddToScheme(scheme.Scheme) } func TestReconcile(t *testing.T) { diff --git a/pkg/reconciler/broker/config_test.go b/pkg/reconciler/broker/config_test.go index 1f02315bc8e..3ff3b66d16f 100644 --- a/pkg/reconciler/broker/config_test.go +++ b/pkg/reconciler/broker/config_test.go @@ -48,7 +48,7 @@ func TestOurConfig(t *testing.T) { want: &Config{ DefaultChannelTemplate: messagingv1.ChannelTemplateSpec{ TypeMeta: metav1.TypeMeta{ - APIVersion: "messaging.knative.dev/v1alpha1", + APIVersion: "messaging.knative.dev/v1", Kind: "InMemoryChannel", }, Spec: &exampleSpec, diff --git a/pkg/reconciler/broker/testdata/config-broker.yaml b/pkg/reconciler/broker/testdata/config-broker.yaml index 8e5d290e426..6ff073a20ae 100644 --- a/pkg/reconciler/broker/testdata/config-broker.yaml +++ b/pkg/reconciler/broker/testdata/config-broker.yaml @@ -39,7 +39,7 @@ data: channelTemplateSpec: | # The api and version of the kind of channel to use inthe broker. # This field required. - apiVersion: messaging.knative.dev/v1alpha1 + apiVersion: messaging.knative.dev/v1 # The api and version of the kind of channel to use inthe broker. # This field required. diff --git a/pkg/reconciler/parallel/parallel_test.go b/pkg/reconciler/parallel/parallel_test.go index 7f57797cc07..a660b421c78 100644 --- a/pkg/reconciler/parallel/parallel_test.go +++ b/pkg/reconciler/parallel/parallel_test.go @@ -60,8 +60,8 @@ const ( var ( subscriberGVK = metav1.GroupVersionKind{ - Group: "eventing.knative.dev", - Version: "v1alpha1", + Group: "messaging.knative.dev", + Version: "v1", Kind: "Subscriber", } ) diff --git a/pkg/reconciler/sequence/sequence_test.go b/pkg/reconciler/sequence/sequence_test.go index df3881d8866..b1d39a92dca 100644 --- a/pkg/reconciler/sequence/sequence_test.go +++ b/pkg/reconciler/sequence/sequence_test.go @@ -58,8 +58,8 @@ const ( var ( subscriberGVK = metav1.GroupVersionKind{ - Group: "eventing.knative.dev", - Version: "v1alpha1", + Group: "messaging.knative.dev", + Version: "v1", Kind: "Subscriber", } ) diff --git a/pkg/reconciler/subscription/subscription_test.go b/pkg/reconciler/subscription/subscription_test.go index b1b96425b54..e26f740f417 100644 --- a/pkg/reconciler/subscription/subscription_test.go +++ b/pkg/reconciler/subscription/subscription_test.go @@ -39,7 +39,6 @@ import ( clientgotesting "k8s.io/client-go/testing" "knative.dev/pkg/apis" duckv1 "knative.dev/pkg/apis/duck/v1" - duckv1alpha1 "knative.dev/pkg/apis/duck/v1alpha1" "knative.dev/pkg/client/injection/ducks/duck/v1/addressable" "knative.dev/pkg/configmap" "knative.dev/pkg/controller" @@ -95,14 +94,14 @@ var ( dlc2DNS = "dlc2.mynamespace.svc." + network.GetClusterDomainName() subscriberGVK = metav1.GroupVersionKind{ - Group: "eventing.knative.dev", - Version: "v1alpha1", + Group: "messaging.knative.dev", + Version: "v1", Kind: "Subscriber", } nonAddressableGVK = metav1.GroupVersionKind{ Group: "eventing.knative.dev", - Version: "v1alpha1", + Version: "v1", Kind: "Trigger", } @@ -134,7 +133,7 @@ var ( func init() { // Add types to scheme _ = eventingv1.AddToScheme(scheme.Scheme) - _ = duckv1alpha1.AddToScheme(scheme.Scheme) + _ = duckv1.AddToScheme(scheme.Scheme) _ = apiextensionsv1.AddToScheme(scheme.Scheme) _ = messagingv1.AddToScheme(scheme.Scheme) } @@ -294,7 +293,7 @@ func TestAllCases(t *testing.T) { Key: testNS + "/" + subscriptionName, WantEvents: []string{ Eventf(corev1.EventTypeNormal, "FinalizerUpdate", "Updated %q finalizers", subscriptionName), - Eventf(corev1.EventTypeWarning, "SubscriberResolveFailed", "Failed to resolve spec.subscriber: address not set for &ObjectReference{Kind:Subscriber,Namespace:testnamespace,Name:subscriber,UID:,APIVersion:eventing.knative.dev/v1alpha1,ResourceVersion:,FieldPath:,}"), + Eventf(corev1.EventTypeWarning, "SubscriberResolveFailed", "Failed to resolve spec.subscriber: address not set for &ObjectReference{Kind:Subscriber,Namespace:testnamespace,Name:subscriber,UID:,APIVersion:messaging.knative.dev/v1,ResourceVersion:,FieldPath:,}"), }, WantStatusUpdates: []clientgotesting.UpdateActionImpl{{ Object: NewSubscription(subscriptionName, testNS, @@ -303,7 +302,7 @@ func TestAllCases(t *testing.T) { WithSubscriptionSubscriberRef(subscriberGVK, subscriberName, testNS), // The first reconciliation will initialize the status conditions. WithInitSubscriptionConditions, - WithSubscriptionReferencesNotResolved(subscriberResolveFailed, "Failed to resolve spec.subscriber: address not set for &ObjectReference{Kind:Subscriber,Namespace:testnamespace,Name:subscriber,UID:,APIVersion:eventing.knative.dev/v1alpha1,ResourceVersion:,FieldPath:,}"), + WithSubscriptionReferencesNotResolved(subscriberResolveFailed, "Failed to resolve spec.subscriber: address not set for &ObjectReference{Kind:Subscriber,Namespace:testnamespace,Name:subscriber,UID:,APIVersion:messaging.knative.dev/v1,ResourceVersion:,FieldPath:,}"), ), }}, WantPatches: []clientgotesting.PatchActionImpl{ @@ -325,7 +324,7 @@ func TestAllCases(t *testing.T) { Key: testNS + "/" + subscriptionName, WantEvents: []string{ Eventf(corev1.EventTypeNormal, "FinalizerUpdate", "Updated %q finalizers", subscriptionName), - Eventf(corev1.EventTypeWarning, "SubscriberResolveFailed", "Failed to resolve spec.subscriber: subscribers.eventing.knative.dev %q not found", subscriberName), + Eventf(corev1.EventTypeWarning, "SubscriberResolveFailed", "Failed to resolve spec.subscriber: subscribers.messaging.knative.dev %q not found", subscriberName), }, WantStatusUpdates: []clientgotesting.UpdateActionImpl{{ Object: NewSubscription(subscriptionName, testNS, @@ -334,7 +333,7 @@ func TestAllCases(t *testing.T) { WithSubscriptionSubscriberRef(subscriberGVK, subscriberName, testNS), // The first reconciliation will initialize the status conditions. WithInitSubscriptionConditions, - WithSubscriptionReferencesNotResolved(subscriberResolveFailed, `Failed to resolve spec.subscriber: subscribers.eventing.knative.dev "subscriber" not found`), + WithSubscriptionReferencesNotResolved(subscriberResolveFailed, `Failed to resolve spec.subscriber: subscribers.messaging.knative.dev "subscriber" not found`), ), }}, WantPatches: []clientgotesting.PatchActionImpl{ @@ -397,7 +396,7 @@ func TestAllCases(t *testing.T) { Key: testNS + "/" + subscriptionName, WantEvents: []string{ Eventf(corev1.EventTypeNormal, "FinalizerUpdate", "Updated %q finalizers", subscriptionName), - Eventf(corev1.EventTypeWarning, replyResolveFailed, "Failed to resolve spec.reply: address not set for &ObjectReference{Kind:Trigger,Namespace:testnamespace,Name:reply,UID:,APIVersion:eventing.knative.dev/v1alpha1,ResourceVersion:,FieldPath:,}"), + Eventf(corev1.EventTypeWarning, replyResolveFailed, "Failed to resolve spec.reply: address not set for &ObjectReference{Kind:Trigger,Namespace:testnamespace,Name:reply,UID:,APIVersion:eventing.knative.dev/v1,ResourceVersion:,FieldPath:,}"), }, WantStatusUpdates: []clientgotesting.UpdateActionImpl{{ Object: NewSubscription(subscriptionName, testNS, @@ -408,7 +407,7 @@ func TestAllCases(t *testing.T) { WithSubscriptionReply(nonAddressableGVK, replyName, testNS), // The first reconciliation will initialize the status conditions. WithInitSubscriptionConditions, - WithSubscriptionReferencesNotResolved(replyResolveFailed, "Failed to resolve spec.reply: address not set for &ObjectReference{Kind:Trigger,Namespace:testnamespace,Name:reply,UID:,APIVersion:eventing.knative.dev/v1alpha1,ResourceVersion:,FieldPath:,}"), + WithSubscriptionReferencesNotResolved(replyResolveFailed, "Failed to resolve spec.reply: address not set for &ObjectReference{Kind:Trigger,Namespace:testnamespace,Name:reply,UID:,APIVersion:eventing.knative.dev/v1,ResourceVersion:,FieldPath:,}"), ), }}, WantPatches: []clientgotesting.PatchActionImpl{ @@ -478,7 +477,7 @@ func TestAllCases(t *testing.T) { WantErr: false, WantEvents: []string{ Eventf(corev1.EventTypeNormal, "FinalizerUpdate", "Updated %q finalizers", subscriptionName), - Eventf(corev1.EventTypeWarning, "DeadLetterSinkResolveFailed", `Failed to resolve spec.delivery.deadLetterSink: subscribers.eventing.knative.dev "dlc" not found`), + Eventf(corev1.EventTypeWarning, "DeadLetterSinkResolveFailed", `Failed to resolve spec.delivery.deadLetterSink: subscribers.messaging.knative.dev "dlc" not found`), }, WantStatusUpdates: []clientgotesting.UpdateActionImpl{{ Object: NewSubscription(subscriptionName, testNS, @@ -488,7 +487,7 @@ func TestAllCases(t *testing.T) { WithSubscriptionDeliveryRef(subscriberGVK, dlcName, testNS), // The first reconciliation will initialize the status conditions. WithInitSubscriptionConditions, - WithSubscriptionReferencesNotResolved("DeadLetterSinkResolveFailed", `Failed to resolve spec.delivery.deadLetterSink: subscribers.eventing.knative.dev "dlc" not found`), + WithSubscriptionReferencesNotResolved("DeadLetterSinkResolveFailed", `Failed to resolve spec.delivery.deadLetterSink: subscribers.messaging.knative.dev "dlc" not found`), WithSubscriptionPhysicalSubscriptionSubscriber(subscriberURI), ), }}, diff --git a/pkg/reconciler/testing/listers.go b/pkg/reconciler/testing/listers.go index b77f058f077..34b98df6d97 100644 --- a/pkg/reconciler/testing/listers.go +++ b/pkg/reconciler/testing/listers.go @@ -45,12 +45,12 @@ import ( ) var subscriberAddToScheme = func(scheme *runtime.Scheme) error { - scheme.AddKnownTypeWithName(schema.GroupVersionKind{Group: "testing.eventing.knative.dev", Version: "v1alpha1", Kind: "Subscriber"}, &unstructured.Unstructured{}) + scheme.AddKnownTypeWithName(schema.GroupVersionKind{Group: "testing.eventing.knative.dev", Version: "v1", Kind: "Subscriber"}, &unstructured.Unstructured{}) return nil } var sourceAddToScheme = func(scheme *runtime.Scheme) error { - scheme.AddKnownTypeWithName(schema.GroupVersionKind{Group: "testing.sources.knative.dev", Version: "v1alpha1", Kind: "TestSource"}, &duckv1.Source{}) + scheme.AddKnownTypeWithName(schema.GroupVersionKind{Group: "testing.sources.knative.dev", Version: "v1", Kind: "TestSource"}, &duckv1.Source{}) return nil } diff --git a/pkg/reconciler/testing/v1/listers.go b/pkg/reconciler/testing/v1/listers.go index 3ed846a85e7..5e9bf8d8480 100644 --- a/pkg/reconciler/testing/v1/listers.go +++ b/pkg/reconciler/testing/v1/listers.go @@ -50,12 +50,12 @@ import ( ) var subscriberAddToScheme = func(scheme *runtime.Scheme) error { - scheme.AddKnownTypeWithName(schema.GroupVersionKind{Group: "testing.eventing.knative.dev", Version: "v1alpha1", Kind: "Subscriber"}, &unstructured.Unstructured{}) + scheme.AddKnownTypeWithName(schema.GroupVersionKind{Group: "testing.eventing.knative.dev", Version: "v1", Kind: "Subscriber"}, &unstructured.Unstructured{}) return nil } var sourceAddToScheme = func(scheme *runtime.Scheme) error { - scheme.AddKnownTypeWithName(schema.GroupVersionKind{Group: "testing.sources.knative.dev", Version: "v1alpha1", Kind: "TestSource"}, &duckv1.Source{}) + scheme.AddKnownTypeWithName(schema.GroupVersionKind{Group: "testing.sources.knative.dev", Version: "v1", Kind: "TestSource"}, &duckv1.Source{}) return nil }