From fa01d913e64b588324f20aabfc270bf33847355d Mon Sep 17 00:00:00 2001 From: Scott Nichols Date: Thu, 23 Jul 2020 09:13:02 -0700 Subject: [PATCH 1/2] regenerate codegen --- .../configmappropagation/stub/controller.go | 54 ------------ .../configmappropagation/stub/reconciler.go | 87 ------------------- .../eventing/v1/broker/stub/controller.go | 63 -------------- .../eventing/v1/broker/stub/reconciler.go | 87 ------------------- .../eventing/v1/trigger/stub/controller.go | 54 ------------ .../eventing/v1/trigger/stub/reconciler.go | 87 ------------------- .../v1beta1/broker/stub/controller.go | 63 -------------- .../v1beta1/broker/stub/reconciler.go | 87 ------------------- .../v1beta1/eventtype/stub/controller.go | 54 ------------ .../v1beta1/eventtype/stub/reconciler.go | 87 ------------------- .../v1beta1/trigger/stub/controller.go | 54 ------------ .../v1beta1/trigger/stub/reconciler.go | 87 ------------------- .../flows/v1/parallel/stub/controller.go | 54 ------------ .../flows/v1/parallel/stub/reconciler.go | 87 ------------------- .../flows/v1/sequence/stub/controller.go | 54 ------------ .../flows/v1/sequence/stub/reconciler.go | 87 ------------------- .../flows/v1beta1/parallel/stub/controller.go | 54 ------------ .../flows/v1beta1/parallel/stub/reconciler.go | 87 ------------------- .../flows/v1beta1/sequence/stub/controller.go | 54 ------------ .../flows/v1beta1/sequence/stub/reconciler.go | 87 ------------------- .../messaging/v1/channel/stub/controller.go | 54 ------------ .../messaging/v1/channel/stub/reconciler.go | 87 ------------------- .../v1/inmemorychannel/stub/controller.go | 54 ------------ .../v1/inmemorychannel/stub/reconciler.go | 87 ------------------- .../v1/subscription/stub/controller.go | 54 ------------ .../v1/subscription/stub/reconciler.go | 87 ------------------- .../v1beta1/channel/stub/controller.go | 54 ------------ .../v1beta1/channel/stub/reconciler.go | 87 ------------------- .../inmemorychannel/stub/controller.go | 54 ------------ .../inmemorychannel/stub/reconciler.go | 87 ------------------- .../v1beta1/subscription/stub/controller.go | 54 ------------ .../v1beta1/subscription/stub/reconciler.go | 87 ------------------- .../apiserversource/stub/controller.go | 54 ------------ .../apiserversource/stub/reconciler.go | 87 ------------------- .../containersource/stub/controller.go | 54 ------------ .../containersource/stub/reconciler.go | 87 ------------------- .../v1alpha2/pingsource/stub/controller.go | 54 ------------ .../v1alpha2/pingsource/stub/reconciler.go | 87 ------------------- .../apiserversource/stub/controller.go | 54 ------------ .../apiserversource/stub/reconciler.go | 87 ------------------- .../containersource/stub/controller.go | 54 ------------ .../containersource/stub/reconciler.go | 87 ------------------- 42 files changed, 2979 deletions(-) delete mode 100644 pkg/client/injection/reconciler/configs/v1alpha1/configmappropagation/stub/controller.go delete mode 100644 pkg/client/injection/reconciler/configs/v1alpha1/configmappropagation/stub/reconciler.go delete mode 100644 pkg/client/injection/reconciler/eventing/v1/broker/stub/controller.go delete mode 100644 pkg/client/injection/reconciler/eventing/v1/broker/stub/reconciler.go delete mode 100644 pkg/client/injection/reconciler/eventing/v1/trigger/stub/controller.go delete mode 100644 pkg/client/injection/reconciler/eventing/v1/trigger/stub/reconciler.go delete mode 100644 pkg/client/injection/reconciler/eventing/v1beta1/broker/stub/controller.go delete mode 100644 pkg/client/injection/reconciler/eventing/v1beta1/broker/stub/reconciler.go delete mode 100644 pkg/client/injection/reconciler/eventing/v1beta1/eventtype/stub/controller.go delete mode 100644 pkg/client/injection/reconciler/eventing/v1beta1/eventtype/stub/reconciler.go delete mode 100644 pkg/client/injection/reconciler/eventing/v1beta1/trigger/stub/controller.go delete mode 100644 pkg/client/injection/reconciler/eventing/v1beta1/trigger/stub/reconciler.go delete mode 100644 pkg/client/injection/reconciler/flows/v1/parallel/stub/controller.go delete mode 100644 pkg/client/injection/reconciler/flows/v1/parallel/stub/reconciler.go delete mode 100644 pkg/client/injection/reconciler/flows/v1/sequence/stub/controller.go delete mode 100644 pkg/client/injection/reconciler/flows/v1/sequence/stub/reconciler.go delete mode 100644 pkg/client/injection/reconciler/flows/v1beta1/parallel/stub/controller.go delete mode 100644 pkg/client/injection/reconciler/flows/v1beta1/parallel/stub/reconciler.go delete mode 100644 pkg/client/injection/reconciler/flows/v1beta1/sequence/stub/controller.go delete mode 100644 pkg/client/injection/reconciler/flows/v1beta1/sequence/stub/reconciler.go delete mode 100644 pkg/client/injection/reconciler/messaging/v1/channel/stub/controller.go delete mode 100644 pkg/client/injection/reconciler/messaging/v1/channel/stub/reconciler.go delete mode 100644 pkg/client/injection/reconciler/messaging/v1/inmemorychannel/stub/controller.go delete mode 100644 pkg/client/injection/reconciler/messaging/v1/inmemorychannel/stub/reconciler.go delete mode 100644 pkg/client/injection/reconciler/messaging/v1/subscription/stub/controller.go delete mode 100644 pkg/client/injection/reconciler/messaging/v1/subscription/stub/reconciler.go delete mode 100644 pkg/client/injection/reconciler/messaging/v1beta1/channel/stub/controller.go delete mode 100644 pkg/client/injection/reconciler/messaging/v1beta1/channel/stub/reconciler.go delete mode 100644 pkg/client/injection/reconciler/messaging/v1beta1/inmemorychannel/stub/controller.go delete mode 100644 pkg/client/injection/reconciler/messaging/v1beta1/inmemorychannel/stub/reconciler.go delete mode 100644 pkg/client/injection/reconciler/messaging/v1beta1/subscription/stub/controller.go delete mode 100644 pkg/client/injection/reconciler/messaging/v1beta1/subscription/stub/reconciler.go delete mode 100644 pkg/client/injection/reconciler/sources/v1alpha2/apiserversource/stub/controller.go delete mode 100644 pkg/client/injection/reconciler/sources/v1alpha2/apiserversource/stub/reconciler.go delete mode 100644 pkg/client/injection/reconciler/sources/v1alpha2/containersource/stub/controller.go delete mode 100644 pkg/client/injection/reconciler/sources/v1alpha2/containersource/stub/reconciler.go delete mode 100644 pkg/client/injection/reconciler/sources/v1alpha2/pingsource/stub/controller.go delete mode 100644 pkg/client/injection/reconciler/sources/v1alpha2/pingsource/stub/reconciler.go delete mode 100644 pkg/client/injection/reconciler/sources/v1beta1/apiserversource/stub/controller.go delete mode 100644 pkg/client/injection/reconciler/sources/v1beta1/apiserversource/stub/reconciler.go delete mode 100644 pkg/client/injection/reconciler/sources/v1beta1/containersource/stub/controller.go delete mode 100644 pkg/client/injection/reconciler/sources/v1beta1/containersource/stub/reconciler.go diff --git a/pkg/client/injection/reconciler/configs/v1alpha1/configmappropagation/stub/controller.go b/pkg/client/injection/reconciler/configs/v1alpha1/configmappropagation/stub/controller.go deleted file mode 100644 index d14da2d1f99..00000000000 --- a/pkg/client/injection/reconciler/configs/v1alpha1/configmappropagation/stub/controller.go +++ /dev/null @@ -1,54 +0,0 @@ -/* -Copyright 2020 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by injection-gen. DO NOT EDIT. - -package configmappropagation - -import ( - context "context" - - configmappropagation "knative.dev/eventing/pkg/client/injection/informers/configs/v1alpha1/configmappropagation" - v1alpha1configmappropagation "knative.dev/eventing/pkg/client/injection/reconciler/configs/v1alpha1/configmappropagation" - configmap "knative.dev/pkg/configmap" - controller "knative.dev/pkg/controller" - logging "knative.dev/pkg/logging" -) - -// TODO: PLEASE COPY AND MODIFY THIS FILE AS A STARTING POINT - -// NewController creates a Reconciler for ConfigMapPropagation and returns the result of NewImpl. -func NewController( - ctx context.Context, - cmw configmap.Watcher, -) *controller.Impl { - logger := logging.FromContext(ctx) - - configmappropagationInformer := configmappropagation.Get(ctx) - - // TODO: setup additional informers here. - - r := &Reconciler{} - impl := v1alpha1configmappropagation.NewImpl(ctx, r) - - logger.Info("Setting up event handlers.") - - configmappropagationInformer.Informer().AddEventHandler(controller.HandleAll(impl.Enqueue)) - - // TODO: add additional informer event handlers here. - - return impl -} diff --git a/pkg/client/injection/reconciler/configs/v1alpha1/configmappropagation/stub/reconciler.go b/pkg/client/injection/reconciler/configs/v1alpha1/configmappropagation/stub/reconciler.go deleted file mode 100644 index f070b3f9b4e..00000000000 --- a/pkg/client/injection/reconciler/configs/v1alpha1/configmappropagation/stub/reconciler.go +++ /dev/null @@ -1,87 +0,0 @@ -/* -Copyright 2020 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by injection-gen. DO NOT EDIT. - -package configmappropagation - -import ( - context "context" - - v1 "k8s.io/api/core/v1" - v1alpha1 "knative.dev/eventing/pkg/apis/configs/v1alpha1" - configmappropagation "knative.dev/eventing/pkg/client/injection/reconciler/configs/v1alpha1/configmappropagation" - reconciler "knative.dev/pkg/reconciler" -) - -// TODO: PLEASE COPY AND MODIFY THIS FILE AS A STARTING POINT - -// newReconciledNormal makes a new reconciler event with event type Normal, and -// reason ConfigMapPropagationReconciled. -func newReconciledNormal(namespace, name string) reconciler.Event { - return reconciler.NewEvent(v1.EventTypeNormal, "ConfigMapPropagationReconciled", "ConfigMapPropagation reconciled: \"%s/%s\"", namespace, name) -} - -// Reconciler implements controller.Reconciler for ConfigMapPropagation resources. -type Reconciler struct { - // TODO: add additional requirements here. -} - -// Check that our Reconciler implements Interface -var _ configmappropagation.Interface = (*Reconciler)(nil) - -// Optionally check that our Reconciler implements Finalizer -//var _ configmappropagation.Finalizer = (*Reconciler)(nil) - -// Optionally check that our Reconciler implements ReadOnlyInterface -// Implement this to observe resources even when we are not the leader. -//var _ configmappropagation.ReadOnlyInterface = (*Reconciler)(nil) - -// Optionally check that our Reconciler implements ReadOnlyFinalizer -// Implement this to observe tombstoned resources even when we are not -// the leader (best effort). -//var _ configmappropagation.ReadOnlyFinalizer = (*Reconciler)(nil) - -// ReconcileKind implements Interface.ReconcileKind. -func (r *Reconciler) ReconcileKind(ctx context.Context, o *v1alpha1.ConfigMapPropagation) reconciler.Event { - // TODO: use this if the resource implements InitializeConditions. - // o.Status.InitializeConditions() - - // TODO: add custom reconciliation logic here. - - // TODO: use this if the object has .status.ObservedGeneration. - // o.Status.ObservedGeneration = o.Generation - return newReconciledNormal(o.Namespace, o.Name) -} - -// Optionally, use FinalizeKind to add finalizers. FinalizeKind will be called -// when the resource is deleted. -//func (r *Reconciler) FinalizeKind(ctx context.Context, o *v1alpha1.ConfigMapPropagation) reconciler.Event { -// // TODO: add custom finalization logic here. -// return nil -//} - -// Optionally, use ObserveKind to observe the resource when we are not the leader. -// func (r *Reconciler) ObserveKind(ctx context.Context, o *v1alpha1.ConfigMapPropagation) reconciler.Event { -// // TODO: add custom observation logic here. -// return nil -// } - -// Optionally, use ObserveFinalizeKind to observe resources being finalized when we are no the leader. -//func (r *Reconciler) ObserveFinalizeKind(ctx context.Context, o *v1alpha1.ConfigMapPropagation) reconciler.Event { -// // TODO: add custom observation logic here. -// return nil -//} diff --git a/pkg/client/injection/reconciler/eventing/v1/broker/stub/controller.go b/pkg/client/injection/reconciler/eventing/v1/broker/stub/controller.go deleted file mode 100644 index 8d6a39a0ba3..00000000000 --- a/pkg/client/injection/reconciler/eventing/v1/broker/stub/controller.go +++ /dev/null @@ -1,63 +0,0 @@ -/* -Copyright 2020 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by injection-gen. DO NOT EDIT. - -package broker - -import ( - context "context" - - cache "k8s.io/client-go/tools/cache" - broker "knative.dev/eventing/pkg/client/injection/informers/eventing/v1/broker" - v1broker "knative.dev/eventing/pkg/client/injection/reconciler/eventing/v1/broker" - configmap "knative.dev/pkg/configmap" - controller "knative.dev/pkg/controller" - logging "knative.dev/pkg/logging" - reconciler "knative.dev/pkg/reconciler" -) - -// TODO: PLEASE COPY AND MODIFY THIS FILE AS A STARTING POINT - -// NewController creates a Reconciler for Broker and returns the result of NewImpl. -func NewController( - ctx context.Context, - cmw configmap.Watcher, -) *controller.Impl { - logger := logging.FromContext(ctx) - - brokerInformer := broker.Get(ctx) - - classValue := "default" // TODO: update this to the appropriate value. - classFilter := reconciler.AnnotationFilterFunc(v1broker.ClassAnnotationKey, classValue, false /*allowUnset*/) - - // TODO: setup additional informers here. - // TODO: remember to use the classFilter from above to filter appropriately. - - r := &Reconciler{} - impl := v1broker.NewImpl(ctx, r, classValue) - - logger.Info("Setting up event handlers.") - - brokerInformer.Informer().AddEventHandler(cache.FilteringResourceEventHandler{ - FilterFunc: classFilter, - Handler: controller.HandleAll(impl.Enqueue), - }) - - // TODO: add additional informer event handlers here. - - return impl -} diff --git a/pkg/client/injection/reconciler/eventing/v1/broker/stub/reconciler.go b/pkg/client/injection/reconciler/eventing/v1/broker/stub/reconciler.go deleted file mode 100644 index 85855a23644..00000000000 --- a/pkg/client/injection/reconciler/eventing/v1/broker/stub/reconciler.go +++ /dev/null @@ -1,87 +0,0 @@ -/* -Copyright 2020 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by injection-gen. DO NOT EDIT. - -package broker - -import ( - context "context" - - v1 "k8s.io/api/core/v1" - eventingv1 "knative.dev/eventing/pkg/apis/eventing/v1" - broker "knative.dev/eventing/pkg/client/injection/reconciler/eventing/v1/broker" - reconciler "knative.dev/pkg/reconciler" -) - -// TODO: PLEASE COPY AND MODIFY THIS FILE AS A STARTING POINT - -// newReconciledNormal makes a new reconciler event with event type Normal, and -// reason BrokerReconciled. -func newReconciledNormal(namespace, name string) reconciler.Event { - return reconciler.NewEvent(v1.EventTypeNormal, "BrokerReconciled", "Broker reconciled: \"%s/%s\"", namespace, name) -} - -// Reconciler implements controller.Reconciler for Broker resources. -type Reconciler struct { - // TODO: add additional requirements here. -} - -// Check that our Reconciler implements Interface -var _ broker.Interface = (*Reconciler)(nil) - -// Optionally check that our Reconciler implements Finalizer -//var _ broker.Finalizer = (*Reconciler)(nil) - -// Optionally check that our Reconciler implements ReadOnlyInterface -// Implement this to observe resources even when we are not the leader. -//var _ broker.ReadOnlyInterface = (*Reconciler)(nil) - -// Optionally check that our Reconciler implements ReadOnlyFinalizer -// Implement this to observe tombstoned resources even when we are not -// the leader (best effort). -//var _ broker.ReadOnlyFinalizer = (*Reconciler)(nil) - -// ReconcileKind implements Interface.ReconcileKind. -func (r *Reconciler) ReconcileKind(ctx context.Context, o *eventingv1.Broker) reconciler.Event { - // TODO: use this if the resource implements InitializeConditions. - // o.Status.InitializeConditions() - - // TODO: add custom reconciliation logic here. - - // TODO: use this if the object has .status.ObservedGeneration. - // o.Status.ObservedGeneration = o.Generation - return newReconciledNormal(o.Namespace, o.Name) -} - -// Optionally, use FinalizeKind to add finalizers. FinalizeKind will be called -// when the resource is deleted. -//func (r *Reconciler) FinalizeKind(ctx context.Context, o *eventingv1.Broker) reconciler.Event { -// // TODO: add custom finalization logic here. -// return nil -//} - -// Optionally, use ObserveKind to observe the resource when we are not the leader. -// func (r *Reconciler) ObserveKind(ctx context.Context, o *eventingv1.Broker) reconciler.Event { -// // TODO: add custom observation logic here. -// return nil -// } - -// Optionally, use ObserveFinalizeKind to observe resources being finalized when we are no the leader. -//func (r *Reconciler) ObserveFinalizeKind(ctx context.Context, o *eventingv1.Broker) reconciler.Event { -// // TODO: add custom observation logic here. -// return nil -//} diff --git a/pkg/client/injection/reconciler/eventing/v1/trigger/stub/controller.go b/pkg/client/injection/reconciler/eventing/v1/trigger/stub/controller.go deleted file mode 100644 index 763d680a2b9..00000000000 --- a/pkg/client/injection/reconciler/eventing/v1/trigger/stub/controller.go +++ /dev/null @@ -1,54 +0,0 @@ -/* -Copyright 2020 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by injection-gen. DO NOT EDIT. - -package trigger - -import ( - context "context" - - trigger "knative.dev/eventing/pkg/client/injection/informers/eventing/v1/trigger" - v1trigger "knative.dev/eventing/pkg/client/injection/reconciler/eventing/v1/trigger" - configmap "knative.dev/pkg/configmap" - controller "knative.dev/pkg/controller" - logging "knative.dev/pkg/logging" -) - -// TODO: PLEASE COPY AND MODIFY THIS FILE AS A STARTING POINT - -// NewController creates a Reconciler for Trigger and returns the result of NewImpl. -func NewController( - ctx context.Context, - cmw configmap.Watcher, -) *controller.Impl { - logger := logging.FromContext(ctx) - - triggerInformer := trigger.Get(ctx) - - // TODO: setup additional informers here. - - r := &Reconciler{} - impl := v1trigger.NewImpl(ctx, r) - - logger.Info("Setting up event handlers.") - - triggerInformer.Informer().AddEventHandler(controller.HandleAll(impl.Enqueue)) - - // TODO: add additional informer event handlers here. - - return impl -} diff --git a/pkg/client/injection/reconciler/eventing/v1/trigger/stub/reconciler.go b/pkg/client/injection/reconciler/eventing/v1/trigger/stub/reconciler.go deleted file mode 100644 index 85b7ad70632..00000000000 --- a/pkg/client/injection/reconciler/eventing/v1/trigger/stub/reconciler.go +++ /dev/null @@ -1,87 +0,0 @@ -/* -Copyright 2020 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by injection-gen. DO NOT EDIT. - -package trigger - -import ( - context "context" - - v1 "k8s.io/api/core/v1" - eventingv1 "knative.dev/eventing/pkg/apis/eventing/v1" - trigger "knative.dev/eventing/pkg/client/injection/reconciler/eventing/v1/trigger" - reconciler "knative.dev/pkg/reconciler" -) - -// TODO: PLEASE COPY AND MODIFY THIS FILE AS A STARTING POINT - -// newReconciledNormal makes a new reconciler event with event type Normal, and -// reason TriggerReconciled. -func newReconciledNormal(namespace, name string) reconciler.Event { - return reconciler.NewEvent(v1.EventTypeNormal, "TriggerReconciled", "Trigger reconciled: \"%s/%s\"", namespace, name) -} - -// Reconciler implements controller.Reconciler for Trigger resources. -type Reconciler struct { - // TODO: add additional requirements here. -} - -// Check that our Reconciler implements Interface -var _ trigger.Interface = (*Reconciler)(nil) - -// Optionally check that our Reconciler implements Finalizer -//var _ trigger.Finalizer = (*Reconciler)(nil) - -// Optionally check that our Reconciler implements ReadOnlyInterface -// Implement this to observe resources even when we are not the leader. -//var _ trigger.ReadOnlyInterface = (*Reconciler)(nil) - -// Optionally check that our Reconciler implements ReadOnlyFinalizer -// Implement this to observe tombstoned resources even when we are not -// the leader (best effort). -//var _ trigger.ReadOnlyFinalizer = (*Reconciler)(nil) - -// ReconcileKind implements Interface.ReconcileKind. -func (r *Reconciler) ReconcileKind(ctx context.Context, o *eventingv1.Trigger) reconciler.Event { - // TODO: use this if the resource implements InitializeConditions. - // o.Status.InitializeConditions() - - // TODO: add custom reconciliation logic here. - - // TODO: use this if the object has .status.ObservedGeneration. - // o.Status.ObservedGeneration = o.Generation - return newReconciledNormal(o.Namespace, o.Name) -} - -// Optionally, use FinalizeKind to add finalizers. FinalizeKind will be called -// when the resource is deleted. -//func (r *Reconciler) FinalizeKind(ctx context.Context, o *eventingv1.Trigger) reconciler.Event { -// // TODO: add custom finalization logic here. -// return nil -//} - -// Optionally, use ObserveKind to observe the resource when we are not the leader. -// func (r *Reconciler) ObserveKind(ctx context.Context, o *eventingv1.Trigger) reconciler.Event { -// // TODO: add custom observation logic here. -// return nil -// } - -// Optionally, use ObserveFinalizeKind to observe resources being finalized when we are no the leader. -//func (r *Reconciler) ObserveFinalizeKind(ctx context.Context, o *eventingv1.Trigger) reconciler.Event { -// // TODO: add custom observation logic here. -// return nil -//} diff --git a/pkg/client/injection/reconciler/eventing/v1beta1/broker/stub/controller.go b/pkg/client/injection/reconciler/eventing/v1beta1/broker/stub/controller.go deleted file mode 100644 index 1deadfdf2e3..00000000000 --- a/pkg/client/injection/reconciler/eventing/v1beta1/broker/stub/controller.go +++ /dev/null @@ -1,63 +0,0 @@ -/* -Copyright 2020 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by injection-gen. DO NOT EDIT. - -package broker - -import ( - context "context" - - cache "k8s.io/client-go/tools/cache" - broker "knative.dev/eventing/pkg/client/injection/informers/eventing/v1beta1/broker" - v1beta1broker "knative.dev/eventing/pkg/client/injection/reconciler/eventing/v1beta1/broker" - configmap "knative.dev/pkg/configmap" - controller "knative.dev/pkg/controller" - logging "knative.dev/pkg/logging" - reconciler "knative.dev/pkg/reconciler" -) - -// TODO: PLEASE COPY AND MODIFY THIS FILE AS A STARTING POINT - -// NewController creates a Reconciler for Broker and returns the result of NewImpl. -func NewController( - ctx context.Context, - cmw configmap.Watcher, -) *controller.Impl { - logger := logging.FromContext(ctx) - - brokerInformer := broker.Get(ctx) - - classValue := "default" // TODO: update this to the appropriate value. - classFilter := reconciler.AnnotationFilterFunc(v1beta1broker.ClassAnnotationKey, classValue, false /*allowUnset*/) - - // TODO: setup additional informers here. - // TODO: remember to use the classFilter from above to filter appropriately. - - r := &Reconciler{} - impl := v1beta1broker.NewImpl(ctx, r, classValue) - - logger.Info("Setting up event handlers.") - - brokerInformer.Informer().AddEventHandler(cache.FilteringResourceEventHandler{ - FilterFunc: classFilter, - Handler: controller.HandleAll(impl.Enqueue), - }) - - // TODO: add additional informer event handlers here. - - return impl -} diff --git a/pkg/client/injection/reconciler/eventing/v1beta1/broker/stub/reconciler.go b/pkg/client/injection/reconciler/eventing/v1beta1/broker/stub/reconciler.go deleted file mode 100644 index 5e706112903..00000000000 --- a/pkg/client/injection/reconciler/eventing/v1beta1/broker/stub/reconciler.go +++ /dev/null @@ -1,87 +0,0 @@ -/* -Copyright 2020 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by injection-gen. DO NOT EDIT. - -package broker - -import ( - context "context" - - v1 "k8s.io/api/core/v1" - v1beta1 "knative.dev/eventing/pkg/apis/eventing/v1beta1" - broker "knative.dev/eventing/pkg/client/injection/reconciler/eventing/v1beta1/broker" - reconciler "knative.dev/pkg/reconciler" -) - -// TODO: PLEASE COPY AND MODIFY THIS FILE AS A STARTING POINT - -// newReconciledNormal makes a new reconciler event with event type Normal, and -// reason BrokerReconciled. -func newReconciledNormal(namespace, name string) reconciler.Event { - return reconciler.NewEvent(v1.EventTypeNormal, "BrokerReconciled", "Broker reconciled: \"%s/%s\"", namespace, name) -} - -// Reconciler implements controller.Reconciler for Broker resources. -type Reconciler struct { - // TODO: add additional requirements here. -} - -// Check that our Reconciler implements Interface -var _ broker.Interface = (*Reconciler)(nil) - -// Optionally check that our Reconciler implements Finalizer -//var _ broker.Finalizer = (*Reconciler)(nil) - -// Optionally check that our Reconciler implements ReadOnlyInterface -// Implement this to observe resources even when we are not the leader. -//var _ broker.ReadOnlyInterface = (*Reconciler)(nil) - -// Optionally check that our Reconciler implements ReadOnlyFinalizer -// Implement this to observe tombstoned resources even when we are not -// the leader (best effort). -//var _ broker.ReadOnlyFinalizer = (*Reconciler)(nil) - -// ReconcileKind implements Interface.ReconcileKind. -func (r *Reconciler) ReconcileKind(ctx context.Context, o *v1beta1.Broker) reconciler.Event { - // TODO: use this if the resource implements InitializeConditions. - // o.Status.InitializeConditions() - - // TODO: add custom reconciliation logic here. - - // TODO: use this if the object has .status.ObservedGeneration. - // o.Status.ObservedGeneration = o.Generation - return newReconciledNormal(o.Namespace, o.Name) -} - -// Optionally, use FinalizeKind to add finalizers. FinalizeKind will be called -// when the resource is deleted. -//func (r *Reconciler) FinalizeKind(ctx context.Context, o *v1beta1.Broker) reconciler.Event { -// // TODO: add custom finalization logic here. -// return nil -//} - -// Optionally, use ObserveKind to observe the resource when we are not the leader. -// func (r *Reconciler) ObserveKind(ctx context.Context, o *v1beta1.Broker) reconciler.Event { -// // TODO: add custom observation logic here. -// return nil -// } - -// Optionally, use ObserveFinalizeKind to observe resources being finalized when we are no the leader. -//func (r *Reconciler) ObserveFinalizeKind(ctx context.Context, o *v1beta1.Broker) reconciler.Event { -// // TODO: add custom observation logic here. -// return nil -//} diff --git a/pkg/client/injection/reconciler/eventing/v1beta1/eventtype/stub/controller.go b/pkg/client/injection/reconciler/eventing/v1beta1/eventtype/stub/controller.go deleted file mode 100644 index 34494104cad..00000000000 --- a/pkg/client/injection/reconciler/eventing/v1beta1/eventtype/stub/controller.go +++ /dev/null @@ -1,54 +0,0 @@ -/* -Copyright 2020 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by injection-gen. DO NOT EDIT. - -package eventtype - -import ( - context "context" - - eventtype "knative.dev/eventing/pkg/client/injection/informers/eventing/v1beta1/eventtype" - v1beta1eventtype "knative.dev/eventing/pkg/client/injection/reconciler/eventing/v1beta1/eventtype" - configmap "knative.dev/pkg/configmap" - controller "knative.dev/pkg/controller" - logging "knative.dev/pkg/logging" -) - -// TODO: PLEASE COPY AND MODIFY THIS FILE AS A STARTING POINT - -// NewController creates a Reconciler for EventType and returns the result of NewImpl. -func NewController( - ctx context.Context, - cmw configmap.Watcher, -) *controller.Impl { - logger := logging.FromContext(ctx) - - eventtypeInformer := eventtype.Get(ctx) - - // TODO: setup additional informers here. - - r := &Reconciler{} - impl := v1beta1eventtype.NewImpl(ctx, r) - - logger.Info("Setting up event handlers.") - - eventtypeInformer.Informer().AddEventHandler(controller.HandleAll(impl.Enqueue)) - - // TODO: add additional informer event handlers here. - - return impl -} diff --git a/pkg/client/injection/reconciler/eventing/v1beta1/eventtype/stub/reconciler.go b/pkg/client/injection/reconciler/eventing/v1beta1/eventtype/stub/reconciler.go deleted file mode 100644 index f2c89ad1540..00000000000 --- a/pkg/client/injection/reconciler/eventing/v1beta1/eventtype/stub/reconciler.go +++ /dev/null @@ -1,87 +0,0 @@ -/* -Copyright 2020 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by injection-gen. DO NOT EDIT. - -package eventtype - -import ( - context "context" - - v1 "k8s.io/api/core/v1" - v1beta1 "knative.dev/eventing/pkg/apis/eventing/v1beta1" - eventtype "knative.dev/eventing/pkg/client/injection/reconciler/eventing/v1beta1/eventtype" - reconciler "knative.dev/pkg/reconciler" -) - -// TODO: PLEASE COPY AND MODIFY THIS FILE AS A STARTING POINT - -// newReconciledNormal makes a new reconciler event with event type Normal, and -// reason EventTypeReconciled. -func newReconciledNormal(namespace, name string) reconciler.Event { - return reconciler.NewEvent(v1.EventTypeNormal, "EventTypeReconciled", "EventType reconciled: \"%s/%s\"", namespace, name) -} - -// Reconciler implements controller.Reconciler for EventType resources. -type Reconciler struct { - // TODO: add additional requirements here. -} - -// Check that our Reconciler implements Interface -var _ eventtype.Interface = (*Reconciler)(nil) - -// Optionally check that our Reconciler implements Finalizer -//var _ eventtype.Finalizer = (*Reconciler)(nil) - -// Optionally check that our Reconciler implements ReadOnlyInterface -// Implement this to observe resources even when we are not the leader. -//var _ eventtype.ReadOnlyInterface = (*Reconciler)(nil) - -// Optionally check that our Reconciler implements ReadOnlyFinalizer -// Implement this to observe tombstoned resources even when we are not -// the leader (best effort). -//var _ eventtype.ReadOnlyFinalizer = (*Reconciler)(nil) - -// ReconcileKind implements Interface.ReconcileKind. -func (r *Reconciler) ReconcileKind(ctx context.Context, o *v1beta1.EventType) reconciler.Event { - // TODO: use this if the resource implements InitializeConditions. - // o.Status.InitializeConditions() - - // TODO: add custom reconciliation logic here. - - // TODO: use this if the object has .status.ObservedGeneration. - // o.Status.ObservedGeneration = o.Generation - return newReconciledNormal(o.Namespace, o.Name) -} - -// Optionally, use FinalizeKind to add finalizers. FinalizeKind will be called -// when the resource is deleted. -//func (r *Reconciler) FinalizeKind(ctx context.Context, o *v1beta1.EventType) reconciler.Event { -// // TODO: add custom finalization logic here. -// return nil -//} - -// Optionally, use ObserveKind to observe the resource when we are not the leader. -// func (r *Reconciler) ObserveKind(ctx context.Context, o *v1beta1.EventType) reconciler.Event { -// // TODO: add custom observation logic here. -// return nil -// } - -// Optionally, use ObserveFinalizeKind to observe resources being finalized when we are no the leader. -//func (r *Reconciler) ObserveFinalizeKind(ctx context.Context, o *v1beta1.EventType) reconciler.Event { -// // TODO: add custom observation logic here. -// return nil -//} diff --git a/pkg/client/injection/reconciler/eventing/v1beta1/trigger/stub/controller.go b/pkg/client/injection/reconciler/eventing/v1beta1/trigger/stub/controller.go deleted file mode 100644 index 475669727fd..00000000000 --- a/pkg/client/injection/reconciler/eventing/v1beta1/trigger/stub/controller.go +++ /dev/null @@ -1,54 +0,0 @@ -/* -Copyright 2020 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by injection-gen. DO NOT EDIT. - -package trigger - -import ( - context "context" - - trigger "knative.dev/eventing/pkg/client/injection/informers/eventing/v1beta1/trigger" - v1beta1trigger "knative.dev/eventing/pkg/client/injection/reconciler/eventing/v1beta1/trigger" - configmap "knative.dev/pkg/configmap" - controller "knative.dev/pkg/controller" - logging "knative.dev/pkg/logging" -) - -// TODO: PLEASE COPY AND MODIFY THIS FILE AS A STARTING POINT - -// NewController creates a Reconciler for Trigger and returns the result of NewImpl. -func NewController( - ctx context.Context, - cmw configmap.Watcher, -) *controller.Impl { - logger := logging.FromContext(ctx) - - triggerInformer := trigger.Get(ctx) - - // TODO: setup additional informers here. - - r := &Reconciler{} - impl := v1beta1trigger.NewImpl(ctx, r) - - logger.Info("Setting up event handlers.") - - triggerInformer.Informer().AddEventHandler(controller.HandleAll(impl.Enqueue)) - - // TODO: add additional informer event handlers here. - - return impl -} diff --git a/pkg/client/injection/reconciler/eventing/v1beta1/trigger/stub/reconciler.go b/pkg/client/injection/reconciler/eventing/v1beta1/trigger/stub/reconciler.go deleted file mode 100644 index c62855674e4..00000000000 --- a/pkg/client/injection/reconciler/eventing/v1beta1/trigger/stub/reconciler.go +++ /dev/null @@ -1,87 +0,0 @@ -/* -Copyright 2020 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by injection-gen. DO NOT EDIT. - -package trigger - -import ( - context "context" - - v1 "k8s.io/api/core/v1" - v1beta1 "knative.dev/eventing/pkg/apis/eventing/v1beta1" - trigger "knative.dev/eventing/pkg/client/injection/reconciler/eventing/v1beta1/trigger" - reconciler "knative.dev/pkg/reconciler" -) - -// TODO: PLEASE COPY AND MODIFY THIS FILE AS A STARTING POINT - -// newReconciledNormal makes a new reconciler event with event type Normal, and -// reason TriggerReconciled. -func newReconciledNormal(namespace, name string) reconciler.Event { - return reconciler.NewEvent(v1.EventTypeNormal, "TriggerReconciled", "Trigger reconciled: \"%s/%s\"", namespace, name) -} - -// Reconciler implements controller.Reconciler for Trigger resources. -type Reconciler struct { - // TODO: add additional requirements here. -} - -// Check that our Reconciler implements Interface -var _ trigger.Interface = (*Reconciler)(nil) - -// Optionally check that our Reconciler implements Finalizer -//var _ trigger.Finalizer = (*Reconciler)(nil) - -// Optionally check that our Reconciler implements ReadOnlyInterface -// Implement this to observe resources even when we are not the leader. -//var _ trigger.ReadOnlyInterface = (*Reconciler)(nil) - -// Optionally check that our Reconciler implements ReadOnlyFinalizer -// Implement this to observe tombstoned resources even when we are not -// the leader (best effort). -//var _ trigger.ReadOnlyFinalizer = (*Reconciler)(nil) - -// ReconcileKind implements Interface.ReconcileKind. -func (r *Reconciler) ReconcileKind(ctx context.Context, o *v1beta1.Trigger) reconciler.Event { - // TODO: use this if the resource implements InitializeConditions. - // o.Status.InitializeConditions() - - // TODO: add custom reconciliation logic here. - - // TODO: use this if the object has .status.ObservedGeneration. - // o.Status.ObservedGeneration = o.Generation - return newReconciledNormal(o.Namespace, o.Name) -} - -// Optionally, use FinalizeKind to add finalizers. FinalizeKind will be called -// when the resource is deleted. -//func (r *Reconciler) FinalizeKind(ctx context.Context, o *v1beta1.Trigger) reconciler.Event { -// // TODO: add custom finalization logic here. -// return nil -//} - -// Optionally, use ObserveKind to observe the resource when we are not the leader. -// func (r *Reconciler) ObserveKind(ctx context.Context, o *v1beta1.Trigger) reconciler.Event { -// // TODO: add custom observation logic here. -// return nil -// } - -// Optionally, use ObserveFinalizeKind to observe resources being finalized when we are no the leader. -//func (r *Reconciler) ObserveFinalizeKind(ctx context.Context, o *v1beta1.Trigger) reconciler.Event { -// // TODO: add custom observation logic here. -// return nil -//} diff --git a/pkg/client/injection/reconciler/flows/v1/parallel/stub/controller.go b/pkg/client/injection/reconciler/flows/v1/parallel/stub/controller.go deleted file mode 100644 index 562b13dc5ca..00000000000 --- a/pkg/client/injection/reconciler/flows/v1/parallel/stub/controller.go +++ /dev/null @@ -1,54 +0,0 @@ -/* -Copyright 2020 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by injection-gen. DO NOT EDIT. - -package parallel - -import ( - context "context" - - parallel "knative.dev/eventing/pkg/client/injection/informers/flows/v1/parallel" - v1parallel "knative.dev/eventing/pkg/client/injection/reconciler/flows/v1/parallel" - configmap "knative.dev/pkg/configmap" - controller "knative.dev/pkg/controller" - logging "knative.dev/pkg/logging" -) - -// TODO: PLEASE COPY AND MODIFY THIS FILE AS A STARTING POINT - -// NewController creates a Reconciler for Parallel and returns the result of NewImpl. -func NewController( - ctx context.Context, - cmw configmap.Watcher, -) *controller.Impl { - logger := logging.FromContext(ctx) - - parallelInformer := parallel.Get(ctx) - - // TODO: setup additional informers here. - - r := &Reconciler{} - impl := v1parallel.NewImpl(ctx, r) - - logger.Info("Setting up event handlers.") - - parallelInformer.Informer().AddEventHandler(controller.HandleAll(impl.Enqueue)) - - // TODO: add additional informer event handlers here. - - return impl -} diff --git a/pkg/client/injection/reconciler/flows/v1/parallel/stub/reconciler.go b/pkg/client/injection/reconciler/flows/v1/parallel/stub/reconciler.go deleted file mode 100644 index bd2155588f5..00000000000 --- a/pkg/client/injection/reconciler/flows/v1/parallel/stub/reconciler.go +++ /dev/null @@ -1,87 +0,0 @@ -/* -Copyright 2020 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by injection-gen. DO NOT EDIT. - -package parallel - -import ( - context "context" - - v1 "k8s.io/api/core/v1" - flowsv1 "knative.dev/eventing/pkg/apis/flows/v1" - parallel "knative.dev/eventing/pkg/client/injection/reconciler/flows/v1/parallel" - reconciler "knative.dev/pkg/reconciler" -) - -// TODO: PLEASE COPY AND MODIFY THIS FILE AS A STARTING POINT - -// newReconciledNormal makes a new reconciler event with event type Normal, and -// reason ParallelReconciled. -func newReconciledNormal(namespace, name string) reconciler.Event { - return reconciler.NewEvent(v1.EventTypeNormal, "ParallelReconciled", "Parallel reconciled: \"%s/%s\"", namespace, name) -} - -// Reconciler implements controller.Reconciler for Parallel resources. -type Reconciler struct { - // TODO: add additional requirements here. -} - -// Check that our Reconciler implements Interface -var _ parallel.Interface = (*Reconciler)(nil) - -// Optionally check that our Reconciler implements Finalizer -//var _ parallel.Finalizer = (*Reconciler)(nil) - -// Optionally check that our Reconciler implements ReadOnlyInterface -// Implement this to observe resources even when we are not the leader. -//var _ parallel.ReadOnlyInterface = (*Reconciler)(nil) - -// Optionally check that our Reconciler implements ReadOnlyFinalizer -// Implement this to observe tombstoned resources even when we are not -// the leader (best effort). -//var _ parallel.ReadOnlyFinalizer = (*Reconciler)(nil) - -// ReconcileKind implements Interface.ReconcileKind. -func (r *Reconciler) ReconcileKind(ctx context.Context, o *flowsv1.Parallel) reconciler.Event { - // TODO: use this if the resource implements InitializeConditions. - // o.Status.InitializeConditions() - - // TODO: add custom reconciliation logic here. - - // TODO: use this if the object has .status.ObservedGeneration. - // o.Status.ObservedGeneration = o.Generation - return newReconciledNormal(o.Namespace, o.Name) -} - -// Optionally, use FinalizeKind to add finalizers. FinalizeKind will be called -// when the resource is deleted. -//func (r *Reconciler) FinalizeKind(ctx context.Context, o *flowsv1.Parallel) reconciler.Event { -// // TODO: add custom finalization logic here. -// return nil -//} - -// Optionally, use ObserveKind to observe the resource when we are not the leader. -// func (r *Reconciler) ObserveKind(ctx context.Context, o *flowsv1.Parallel) reconciler.Event { -// // TODO: add custom observation logic here. -// return nil -// } - -// Optionally, use ObserveFinalizeKind to observe resources being finalized when we are no the leader. -//func (r *Reconciler) ObserveFinalizeKind(ctx context.Context, o *flowsv1.Parallel) reconciler.Event { -// // TODO: add custom observation logic here. -// return nil -//} diff --git a/pkg/client/injection/reconciler/flows/v1/sequence/stub/controller.go b/pkg/client/injection/reconciler/flows/v1/sequence/stub/controller.go deleted file mode 100644 index 516bf046b04..00000000000 --- a/pkg/client/injection/reconciler/flows/v1/sequence/stub/controller.go +++ /dev/null @@ -1,54 +0,0 @@ -/* -Copyright 2020 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by injection-gen. DO NOT EDIT. - -package sequence - -import ( - context "context" - - sequence "knative.dev/eventing/pkg/client/injection/informers/flows/v1/sequence" - v1sequence "knative.dev/eventing/pkg/client/injection/reconciler/flows/v1/sequence" - configmap "knative.dev/pkg/configmap" - controller "knative.dev/pkg/controller" - logging "knative.dev/pkg/logging" -) - -// TODO: PLEASE COPY AND MODIFY THIS FILE AS A STARTING POINT - -// NewController creates a Reconciler for Sequence and returns the result of NewImpl. -func NewController( - ctx context.Context, - cmw configmap.Watcher, -) *controller.Impl { - logger := logging.FromContext(ctx) - - sequenceInformer := sequence.Get(ctx) - - // TODO: setup additional informers here. - - r := &Reconciler{} - impl := v1sequence.NewImpl(ctx, r) - - logger.Info("Setting up event handlers.") - - sequenceInformer.Informer().AddEventHandler(controller.HandleAll(impl.Enqueue)) - - // TODO: add additional informer event handlers here. - - return impl -} diff --git a/pkg/client/injection/reconciler/flows/v1/sequence/stub/reconciler.go b/pkg/client/injection/reconciler/flows/v1/sequence/stub/reconciler.go deleted file mode 100644 index c1b0532a7b6..00000000000 --- a/pkg/client/injection/reconciler/flows/v1/sequence/stub/reconciler.go +++ /dev/null @@ -1,87 +0,0 @@ -/* -Copyright 2020 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by injection-gen. DO NOT EDIT. - -package sequence - -import ( - context "context" - - v1 "k8s.io/api/core/v1" - flowsv1 "knative.dev/eventing/pkg/apis/flows/v1" - sequence "knative.dev/eventing/pkg/client/injection/reconciler/flows/v1/sequence" - reconciler "knative.dev/pkg/reconciler" -) - -// TODO: PLEASE COPY AND MODIFY THIS FILE AS A STARTING POINT - -// newReconciledNormal makes a new reconciler event with event type Normal, and -// reason SequenceReconciled. -func newReconciledNormal(namespace, name string) reconciler.Event { - return reconciler.NewEvent(v1.EventTypeNormal, "SequenceReconciled", "Sequence reconciled: \"%s/%s\"", namespace, name) -} - -// Reconciler implements controller.Reconciler for Sequence resources. -type Reconciler struct { - // TODO: add additional requirements here. -} - -// Check that our Reconciler implements Interface -var _ sequence.Interface = (*Reconciler)(nil) - -// Optionally check that our Reconciler implements Finalizer -//var _ sequence.Finalizer = (*Reconciler)(nil) - -// Optionally check that our Reconciler implements ReadOnlyInterface -// Implement this to observe resources even when we are not the leader. -//var _ sequence.ReadOnlyInterface = (*Reconciler)(nil) - -// Optionally check that our Reconciler implements ReadOnlyFinalizer -// Implement this to observe tombstoned resources even when we are not -// the leader (best effort). -//var _ sequence.ReadOnlyFinalizer = (*Reconciler)(nil) - -// ReconcileKind implements Interface.ReconcileKind. -func (r *Reconciler) ReconcileKind(ctx context.Context, o *flowsv1.Sequence) reconciler.Event { - // TODO: use this if the resource implements InitializeConditions. - // o.Status.InitializeConditions() - - // TODO: add custom reconciliation logic here. - - // TODO: use this if the object has .status.ObservedGeneration. - // o.Status.ObservedGeneration = o.Generation - return newReconciledNormal(o.Namespace, o.Name) -} - -// Optionally, use FinalizeKind to add finalizers. FinalizeKind will be called -// when the resource is deleted. -//func (r *Reconciler) FinalizeKind(ctx context.Context, o *flowsv1.Sequence) reconciler.Event { -// // TODO: add custom finalization logic here. -// return nil -//} - -// Optionally, use ObserveKind to observe the resource when we are not the leader. -// func (r *Reconciler) ObserveKind(ctx context.Context, o *flowsv1.Sequence) reconciler.Event { -// // TODO: add custom observation logic here. -// return nil -// } - -// Optionally, use ObserveFinalizeKind to observe resources being finalized when we are no the leader. -//func (r *Reconciler) ObserveFinalizeKind(ctx context.Context, o *flowsv1.Sequence) reconciler.Event { -// // TODO: add custom observation logic here. -// return nil -//} diff --git a/pkg/client/injection/reconciler/flows/v1beta1/parallel/stub/controller.go b/pkg/client/injection/reconciler/flows/v1beta1/parallel/stub/controller.go deleted file mode 100644 index ec7832db8ff..00000000000 --- a/pkg/client/injection/reconciler/flows/v1beta1/parallel/stub/controller.go +++ /dev/null @@ -1,54 +0,0 @@ -/* -Copyright 2020 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by injection-gen. DO NOT EDIT. - -package parallel - -import ( - context "context" - - parallel "knative.dev/eventing/pkg/client/injection/informers/flows/v1beta1/parallel" - v1beta1parallel "knative.dev/eventing/pkg/client/injection/reconciler/flows/v1beta1/parallel" - configmap "knative.dev/pkg/configmap" - controller "knative.dev/pkg/controller" - logging "knative.dev/pkg/logging" -) - -// TODO: PLEASE COPY AND MODIFY THIS FILE AS A STARTING POINT - -// NewController creates a Reconciler for Parallel and returns the result of NewImpl. -func NewController( - ctx context.Context, - cmw configmap.Watcher, -) *controller.Impl { - logger := logging.FromContext(ctx) - - parallelInformer := parallel.Get(ctx) - - // TODO: setup additional informers here. - - r := &Reconciler{} - impl := v1beta1parallel.NewImpl(ctx, r) - - logger.Info("Setting up event handlers.") - - parallelInformer.Informer().AddEventHandler(controller.HandleAll(impl.Enqueue)) - - // TODO: add additional informer event handlers here. - - return impl -} diff --git a/pkg/client/injection/reconciler/flows/v1beta1/parallel/stub/reconciler.go b/pkg/client/injection/reconciler/flows/v1beta1/parallel/stub/reconciler.go deleted file mode 100644 index fdc04fee7ce..00000000000 --- a/pkg/client/injection/reconciler/flows/v1beta1/parallel/stub/reconciler.go +++ /dev/null @@ -1,87 +0,0 @@ -/* -Copyright 2020 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by injection-gen. DO NOT EDIT. - -package parallel - -import ( - context "context" - - v1 "k8s.io/api/core/v1" - v1beta1 "knative.dev/eventing/pkg/apis/flows/v1beta1" - parallel "knative.dev/eventing/pkg/client/injection/reconciler/flows/v1beta1/parallel" - reconciler "knative.dev/pkg/reconciler" -) - -// TODO: PLEASE COPY AND MODIFY THIS FILE AS A STARTING POINT - -// newReconciledNormal makes a new reconciler event with event type Normal, and -// reason ParallelReconciled. -func newReconciledNormal(namespace, name string) reconciler.Event { - return reconciler.NewEvent(v1.EventTypeNormal, "ParallelReconciled", "Parallel reconciled: \"%s/%s\"", namespace, name) -} - -// Reconciler implements controller.Reconciler for Parallel resources. -type Reconciler struct { - // TODO: add additional requirements here. -} - -// Check that our Reconciler implements Interface -var _ parallel.Interface = (*Reconciler)(nil) - -// Optionally check that our Reconciler implements Finalizer -//var _ parallel.Finalizer = (*Reconciler)(nil) - -// Optionally check that our Reconciler implements ReadOnlyInterface -// Implement this to observe resources even when we are not the leader. -//var _ parallel.ReadOnlyInterface = (*Reconciler)(nil) - -// Optionally check that our Reconciler implements ReadOnlyFinalizer -// Implement this to observe tombstoned resources even when we are not -// the leader (best effort). -//var _ parallel.ReadOnlyFinalizer = (*Reconciler)(nil) - -// ReconcileKind implements Interface.ReconcileKind. -func (r *Reconciler) ReconcileKind(ctx context.Context, o *v1beta1.Parallel) reconciler.Event { - // TODO: use this if the resource implements InitializeConditions. - // o.Status.InitializeConditions() - - // TODO: add custom reconciliation logic here. - - // TODO: use this if the object has .status.ObservedGeneration. - // o.Status.ObservedGeneration = o.Generation - return newReconciledNormal(o.Namespace, o.Name) -} - -// Optionally, use FinalizeKind to add finalizers. FinalizeKind will be called -// when the resource is deleted. -//func (r *Reconciler) FinalizeKind(ctx context.Context, o *v1beta1.Parallel) reconciler.Event { -// // TODO: add custom finalization logic here. -// return nil -//} - -// Optionally, use ObserveKind to observe the resource when we are not the leader. -// func (r *Reconciler) ObserveKind(ctx context.Context, o *v1beta1.Parallel) reconciler.Event { -// // TODO: add custom observation logic here. -// return nil -// } - -// Optionally, use ObserveFinalizeKind to observe resources being finalized when we are no the leader. -//func (r *Reconciler) ObserveFinalizeKind(ctx context.Context, o *v1beta1.Parallel) reconciler.Event { -// // TODO: add custom observation logic here. -// return nil -//} diff --git a/pkg/client/injection/reconciler/flows/v1beta1/sequence/stub/controller.go b/pkg/client/injection/reconciler/flows/v1beta1/sequence/stub/controller.go deleted file mode 100644 index 09e5afe192b..00000000000 --- a/pkg/client/injection/reconciler/flows/v1beta1/sequence/stub/controller.go +++ /dev/null @@ -1,54 +0,0 @@ -/* -Copyright 2020 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by injection-gen. DO NOT EDIT. - -package sequence - -import ( - context "context" - - sequence "knative.dev/eventing/pkg/client/injection/informers/flows/v1beta1/sequence" - v1beta1sequence "knative.dev/eventing/pkg/client/injection/reconciler/flows/v1beta1/sequence" - configmap "knative.dev/pkg/configmap" - controller "knative.dev/pkg/controller" - logging "knative.dev/pkg/logging" -) - -// TODO: PLEASE COPY AND MODIFY THIS FILE AS A STARTING POINT - -// NewController creates a Reconciler for Sequence and returns the result of NewImpl. -func NewController( - ctx context.Context, - cmw configmap.Watcher, -) *controller.Impl { - logger := logging.FromContext(ctx) - - sequenceInformer := sequence.Get(ctx) - - // TODO: setup additional informers here. - - r := &Reconciler{} - impl := v1beta1sequence.NewImpl(ctx, r) - - logger.Info("Setting up event handlers.") - - sequenceInformer.Informer().AddEventHandler(controller.HandleAll(impl.Enqueue)) - - // TODO: add additional informer event handlers here. - - return impl -} diff --git a/pkg/client/injection/reconciler/flows/v1beta1/sequence/stub/reconciler.go b/pkg/client/injection/reconciler/flows/v1beta1/sequence/stub/reconciler.go deleted file mode 100644 index 1fcf98288ba..00000000000 --- a/pkg/client/injection/reconciler/flows/v1beta1/sequence/stub/reconciler.go +++ /dev/null @@ -1,87 +0,0 @@ -/* -Copyright 2020 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by injection-gen. DO NOT EDIT. - -package sequence - -import ( - context "context" - - v1 "k8s.io/api/core/v1" - v1beta1 "knative.dev/eventing/pkg/apis/flows/v1beta1" - sequence "knative.dev/eventing/pkg/client/injection/reconciler/flows/v1beta1/sequence" - reconciler "knative.dev/pkg/reconciler" -) - -// TODO: PLEASE COPY AND MODIFY THIS FILE AS A STARTING POINT - -// newReconciledNormal makes a new reconciler event with event type Normal, and -// reason SequenceReconciled. -func newReconciledNormal(namespace, name string) reconciler.Event { - return reconciler.NewEvent(v1.EventTypeNormal, "SequenceReconciled", "Sequence reconciled: \"%s/%s\"", namespace, name) -} - -// Reconciler implements controller.Reconciler for Sequence resources. -type Reconciler struct { - // TODO: add additional requirements here. -} - -// Check that our Reconciler implements Interface -var _ sequence.Interface = (*Reconciler)(nil) - -// Optionally check that our Reconciler implements Finalizer -//var _ sequence.Finalizer = (*Reconciler)(nil) - -// Optionally check that our Reconciler implements ReadOnlyInterface -// Implement this to observe resources even when we are not the leader. -//var _ sequence.ReadOnlyInterface = (*Reconciler)(nil) - -// Optionally check that our Reconciler implements ReadOnlyFinalizer -// Implement this to observe tombstoned resources even when we are not -// the leader (best effort). -//var _ sequence.ReadOnlyFinalizer = (*Reconciler)(nil) - -// ReconcileKind implements Interface.ReconcileKind. -func (r *Reconciler) ReconcileKind(ctx context.Context, o *v1beta1.Sequence) reconciler.Event { - // TODO: use this if the resource implements InitializeConditions. - // o.Status.InitializeConditions() - - // TODO: add custom reconciliation logic here. - - // TODO: use this if the object has .status.ObservedGeneration. - // o.Status.ObservedGeneration = o.Generation - return newReconciledNormal(o.Namespace, o.Name) -} - -// Optionally, use FinalizeKind to add finalizers. FinalizeKind will be called -// when the resource is deleted. -//func (r *Reconciler) FinalizeKind(ctx context.Context, o *v1beta1.Sequence) reconciler.Event { -// // TODO: add custom finalization logic here. -// return nil -//} - -// Optionally, use ObserveKind to observe the resource when we are not the leader. -// func (r *Reconciler) ObserveKind(ctx context.Context, o *v1beta1.Sequence) reconciler.Event { -// // TODO: add custom observation logic here. -// return nil -// } - -// Optionally, use ObserveFinalizeKind to observe resources being finalized when we are no the leader. -//func (r *Reconciler) ObserveFinalizeKind(ctx context.Context, o *v1beta1.Sequence) reconciler.Event { -// // TODO: add custom observation logic here. -// return nil -//} diff --git a/pkg/client/injection/reconciler/messaging/v1/channel/stub/controller.go b/pkg/client/injection/reconciler/messaging/v1/channel/stub/controller.go deleted file mode 100644 index 113f8222062..00000000000 --- a/pkg/client/injection/reconciler/messaging/v1/channel/stub/controller.go +++ /dev/null @@ -1,54 +0,0 @@ -/* -Copyright 2020 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by injection-gen. DO NOT EDIT. - -package channel - -import ( - context "context" - - channel "knative.dev/eventing/pkg/client/injection/informers/messaging/v1/channel" - v1channel "knative.dev/eventing/pkg/client/injection/reconciler/messaging/v1/channel" - configmap "knative.dev/pkg/configmap" - controller "knative.dev/pkg/controller" - logging "knative.dev/pkg/logging" -) - -// TODO: PLEASE COPY AND MODIFY THIS FILE AS A STARTING POINT - -// NewController creates a Reconciler for Channel and returns the result of NewImpl. -func NewController( - ctx context.Context, - cmw configmap.Watcher, -) *controller.Impl { - logger := logging.FromContext(ctx) - - channelInformer := channel.Get(ctx) - - // TODO: setup additional informers here. - - r := &Reconciler{} - impl := v1channel.NewImpl(ctx, r) - - logger.Info("Setting up event handlers.") - - channelInformer.Informer().AddEventHandler(controller.HandleAll(impl.Enqueue)) - - // TODO: add additional informer event handlers here. - - return impl -} diff --git a/pkg/client/injection/reconciler/messaging/v1/channel/stub/reconciler.go b/pkg/client/injection/reconciler/messaging/v1/channel/stub/reconciler.go deleted file mode 100644 index 703595245e8..00000000000 --- a/pkg/client/injection/reconciler/messaging/v1/channel/stub/reconciler.go +++ /dev/null @@ -1,87 +0,0 @@ -/* -Copyright 2020 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by injection-gen. DO NOT EDIT. - -package channel - -import ( - context "context" - - v1 "k8s.io/api/core/v1" - messagingv1 "knative.dev/eventing/pkg/apis/messaging/v1" - channel "knative.dev/eventing/pkg/client/injection/reconciler/messaging/v1/channel" - reconciler "knative.dev/pkg/reconciler" -) - -// TODO: PLEASE COPY AND MODIFY THIS FILE AS A STARTING POINT - -// newReconciledNormal makes a new reconciler event with event type Normal, and -// reason ChannelReconciled. -func newReconciledNormal(namespace, name string) reconciler.Event { - return reconciler.NewEvent(v1.EventTypeNormal, "ChannelReconciled", "Channel reconciled: \"%s/%s\"", namespace, name) -} - -// Reconciler implements controller.Reconciler for Channel resources. -type Reconciler struct { - // TODO: add additional requirements here. -} - -// Check that our Reconciler implements Interface -var _ channel.Interface = (*Reconciler)(nil) - -// Optionally check that our Reconciler implements Finalizer -//var _ channel.Finalizer = (*Reconciler)(nil) - -// Optionally check that our Reconciler implements ReadOnlyInterface -// Implement this to observe resources even when we are not the leader. -//var _ channel.ReadOnlyInterface = (*Reconciler)(nil) - -// Optionally check that our Reconciler implements ReadOnlyFinalizer -// Implement this to observe tombstoned resources even when we are not -// the leader (best effort). -//var _ channel.ReadOnlyFinalizer = (*Reconciler)(nil) - -// ReconcileKind implements Interface.ReconcileKind. -func (r *Reconciler) ReconcileKind(ctx context.Context, o *messagingv1.Channel) reconciler.Event { - // TODO: use this if the resource implements InitializeConditions. - // o.Status.InitializeConditions() - - // TODO: add custom reconciliation logic here. - - // TODO: use this if the object has .status.ObservedGeneration. - // o.Status.ObservedGeneration = o.Generation - return newReconciledNormal(o.Namespace, o.Name) -} - -// Optionally, use FinalizeKind to add finalizers. FinalizeKind will be called -// when the resource is deleted. -//func (r *Reconciler) FinalizeKind(ctx context.Context, o *messagingv1.Channel) reconciler.Event { -// // TODO: add custom finalization logic here. -// return nil -//} - -// Optionally, use ObserveKind to observe the resource when we are not the leader. -// func (r *Reconciler) ObserveKind(ctx context.Context, o *messagingv1.Channel) reconciler.Event { -// // TODO: add custom observation logic here. -// return nil -// } - -// Optionally, use ObserveFinalizeKind to observe resources being finalized when we are no the leader. -//func (r *Reconciler) ObserveFinalizeKind(ctx context.Context, o *messagingv1.Channel) reconciler.Event { -// // TODO: add custom observation logic here. -// return nil -//} diff --git a/pkg/client/injection/reconciler/messaging/v1/inmemorychannel/stub/controller.go b/pkg/client/injection/reconciler/messaging/v1/inmemorychannel/stub/controller.go deleted file mode 100644 index b0b445e8828..00000000000 --- a/pkg/client/injection/reconciler/messaging/v1/inmemorychannel/stub/controller.go +++ /dev/null @@ -1,54 +0,0 @@ -/* -Copyright 2020 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by injection-gen. DO NOT EDIT. - -package inmemorychannel - -import ( - context "context" - - inmemorychannel "knative.dev/eventing/pkg/client/injection/informers/messaging/v1/inmemorychannel" - v1inmemorychannel "knative.dev/eventing/pkg/client/injection/reconciler/messaging/v1/inmemorychannel" - configmap "knative.dev/pkg/configmap" - controller "knative.dev/pkg/controller" - logging "knative.dev/pkg/logging" -) - -// TODO: PLEASE COPY AND MODIFY THIS FILE AS A STARTING POINT - -// NewController creates a Reconciler for InMemoryChannel and returns the result of NewImpl. -func NewController( - ctx context.Context, - cmw configmap.Watcher, -) *controller.Impl { - logger := logging.FromContext(ctx) - - inmemorychannelInformer := inmemorychannel.Get(ctx) - - // TODO: setup additional informers here. - - r := &Reconciler{} - impl := v1inmemorychannel.NewImpl(ctx, r) - - logger.Info("Setting up event handlers.") - - inmemorychannelInformer.Informer().AddEventHandler(controller.HandleAll(impl.Enqueue)) - - // TODO: add additional informer event handlers here. - - return impl -} diff --git a/pkg/client/injection/reconciler/messaging/v1/inmemorychannel/stub/reconciler.go b/pkg/client/injection/reconciler/messaging/v1/inmemorychannel/stub/reconciler.go deleted file mode 100644 index dac28123423..00000000000 --- a/pkg/client/injection/reconciler/messaging/v1/inmemorychannel/stub/reconciler.go +++ /dev/null @@ -1,87 +0,0 @@ -/* -Copyright 2020 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by injection-gen. DO NOT EDIT. - -package inmemorychannel - -import ( - context "context" - - v1 "k8s.io/api/core/v1" - messagingv1 "knative.dev/eventing/pkg/apis/messaging/v1" - inmemorychannel "knative.dev/eventing/pkg/client/injection/reconciler/messaging/v1/inmemorychannel" - reconciler "knative.dev/pkg/reconciler" -) - -// TODO: PLEASE COPY AND MODIFY THIS FILE AS A STARTING POINT - -// newReconciledNormal makes a new reconciler event with event type Normal, and -// reason InMemoryChannelReconciled. -func newReconciledNormal(namespace, name string) reconciler.Event { - return reconciler.NewEvent(v1.EventTypeNormal, "InMemoryChannelReconciled", "InMemoryChannel reconciled: \"%s/%s\"", namespace, name) -} - -// Reconciler implements controller.Reconciler for InMemoryChannel resources. -type Reconciler struct { - // TODO: add additional requirements here. -} - -// Check that our Reconciler implements Interface -var _ inmemorychannel.Interface = (*Reconciler)(nil) - -// Optionally check that our Reconciler implements Finalizer -//var _ inmemorychannel.Finalizer = (*Reconciler)(nil) - -// Optionally check that our Reconciler implements ReadOnlyInterface -// Implement this to observe resources even when we are not the leader. -//var _ inmemorychannel.ReadOnlyInterface = (*Reconciler)(nil) - -// Optionally check that our Reconciler implements ReadOnlyFinalizer -// Implement this to observe tombstoned resources even when we are not -// the leader (best effort). -//var _ inmemorychannel.ReadOnlyFinalizer = (*Reconciler)(nil) - -// ReconcileKind implements Interface.ReconcileKind. -func (r *Reconciler) ReconcileKind(ctx context.Context, o *messagingv1.InMemoryChannel) reconciler.Event { - // TODO: use this if the resource implements InitializeConditions. - // o.Status.InitializeConditions() - - // TODO: add custom reconciliation logic here. - - // TODO: use this if the object has .status.ObservedGeneration. - // o.Status.ObservedGeneration = o.Generation - return newReconciledNormal(o.Namespace, o.Name) -} - -// Optionally, use FinalizeKind to add finalizers. FinalizeKind will be called -// when the resource is deleted. -//func (r *Reconciler) FinalizeKind(ctx context.Context, o *messagingv1.InMemoryChannel) reconciler.Event { -// // TODO: add custom finalization logic here. -// return nil -//} - -// Optionally, use ObserveKind to observe the resource when we are not the leader. -// func (r *Reconciler) ObserveKind(ctx context.Context, o *messagingv1.InMemoryChannel) reconciler.Event { -// // TODO: add custom observation logic here. -// return nil -// } - -// Optionally, use ObserveFinalizeKind to observe resources being finalized when we are no the leader. -//func (r *Reconciler) ObserveFinalizeKind(ctx context.Context, o *messagingv1.InMemoryChannel) reconciler.Event { -// // TODO: add custom observation logic here. -// return nil -//} diff --git a/pkg/client/injection/reconciler/messaging/v1/subscription/stub/controller.go b/pkg/client/injection/reconciler/messaging/v1/subscription/stub/controller.go deleted file mode 100644 index e1ed568ed09..00000000000 --- a/pkg/client/injection/reconciler/messaging/v1/subscription/stub/controller.go +++ /dev/null @@ -1,54 +0,0 @@ -/* -Copyright 2020 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by injection-gen. DO NOT EDIT. - -package subscription - -import ( - context "context" - - subscription "knative.dev/eventing/pkg/client/injection/informers/messaging/v1/subscription" - v1subscription "knative.dev/eventing/pkg/client/injection/reconciler/messaging/v1/subscription" - configmap "knative.dev/pkg/configmap" - controller "knative.dev/pkg/controller" - logging "knative.dev/pkg/logging" -) - -// TODO: PLEASE COPY AND MODIFY THIS FILE AS A STARTING POINT - -// NewController creates a Reconciler for Subscription and returns the result of NewImpl. -func NewController( - ctx context.Context, - cmw configmap.Watcher, -) *controller.Impl { - logger := logging.FromContext(ctx) - - subscriptionInformer := subscription.Get(ctx) - - // TODO: setup additional informers here. - - r := &Reconciler{} - impl := v1subscription.NewImpl(ctx, r) - - logger.Info("Setting up event handlers.") - - subscriptionInformer.Informer().AddEventHandler(controller.HandleAll(impl.Enqueue)) - - // TODO: add additional informer event handlers here. - - return impl -} diff --git a/pkg/client/injection/reconciler/messaging/v1/subscription/stub/reconciler.go b/pkg/client/injection/reconciler/messaging/v1/subscription/stub/reconciler.go deleted file mode 100644 index 41838da0f30..00000000000 --- a/pkg/client/injection/reconciler/messaging/v1/subscription/stub/reconciler.go +++ /dev/null @@ -1,87 +0,0 @@ -/* -Copyright 2020 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by injection-gen. DO NOT EDIT. - -package subscription - -import ( - context "context" - - v1 "k8s.io/api/core/v1" - messagingv1 "knative.dev/eventing/pkg/apis/messaging/v1" - subscription "knative.dev/eventing/pkg/client/injection/reconciler/messaging/v1/subscription" - reconciler "knative.dev/pkg/reconciler" -) - -// TODO: PLEASE COPY AND MODIFY THIS FILE AS A STARTING POINT - -// newReconciledNormal makes a new reconciler event with event type Normal, and -// reason SubscriptionReconciled. -func newReconciledNormal(namespace, name string) reconciler.Event { - return reconciler.NewEvent(v1.EventTypeNormal, "SubscriptionReconciled", "Subscription reconciled: \"%s/%s\"", namespace, name) -} - -// Reconciler implements controller.Reconciler for Subscription resources. -type Reconciler struct { - // TODO: add additional requirements here. -} - -// Check that our Reconciler implements Interface -var _ subscription.Interface = (*Reconciler)(nil) - -// Optionally check that our Reconciler implements Finalizer -//var _ subscription.Finalizer = (*Reconciler)(nil) - -// Optionally check that our Reconciler implements ReadOnlyInterface -// Implement this to observe resources even when we are not the leader. -//var _ subscription.ReadOnlyInterface = (*Reconciler)(nil) - -// Optionally check that our Reconciler implements ReadOnlyFinalizer -// Implement this to observe tombstoned resources even when we are not -// the leader (best effort). -//var _ subscription.ReadOnlyFinalizer = (*Reconciler)(nil) - -// ReconcileKind implements Interface.ReconcileKind. -func (r *Reconciler) ReconcileKind(ctx context.Context, o *messagingv1.Subscription) reconciler.Event { - // TODO: use this if the resource implements InitializeConditions. - // o.Status.InitializeConditions() - - // TODO: add custom reconciliation logic here. - - // TODO: use this if the object has .status.ObservedGeneration. - // o.Status.ObservedGeneration = o.Generation - return newReconciledNormal(o.Namespace, o.Name) -} - -// Optionally, use FinalizeKind to add finalizers. FinalizeKind will be called -// when the resource is deleted. -//func (r *Reconciler) FinalizeKind(ctx context.Context, o *messagingv1.Subscription) reconciler.Event { -// // TODO: add custom finalization logic here. -// return nil -//} - -// Optionally, use ObserveKind to observe the resource when we are not the leader. -// func (r *Reconciler) ObserveKind(ctx context.Context, o *messagingv1.Subscription) reconciler.Event { -// // TODO: add custom observation logic here. -// return nil -// } - -// Optionally, use ObserveFinalizeKind to observe resources being finalized when we are no the leader. -//func (r *Reconciler) ObserveFinalizeKind(ctx context.Context, o *messagingv1.Subscription) reconciler.Event { -// // TODO: add custom observation logic here. -// return nil -//} diff --git a/pkg/client/injection/reconciler/messaging/v1beta1/channel/stub/controller.go b/pkg/client/injection/reconciler/messaging/v1beta1/channel/stub/controller.go deleted file mode 100644 index 4dcf3e50717..00000000000 --- a/pkg/client/injection/reconciler/messaging/v1beta1/channel/stub/controller.go +++ /dev/null @@ -1,54 +0,0 @@ -/* -Copyright 2020 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by injection-gen. DO NOT EDIT. - -package channel - -import ( - context "context" - - channel "knative.dev/eventing/pkg/client/injection/informers/messaging/v1beta1/channel" - v1beta1channel "knative.dev/eventing/pkg/client/injection/reconciler/messaging/v1beta1/channel" - configmap "knative.dev/pkg/configmap" - controller "knative.dev/pkg/controller" - logging "knative.dev/pkg/logging" -) - -// TODO: PLEASE COPY AND MODIFY THIS FILE AS A STARTING POINT - -// NewController creates a Reconciler for Channel and returns the result of NewImpl. -func NewController( - ctx context.Context, - cmw configmap.Watcher, -) *controller.Impl { - logger := logging.FromContext(ctx) - - channelInformer := channel.Get(ctx) - - // TODO: setup additional informers here. - - r := &Reconciler{} - impl := v1beta1channel.NewImpl(ctx, r) - - logger.Info("Setting up event handlers.") - - channelInformer.Informer().AddEventHandler(controller.HandleAll(impl.Enqueue)) - - // TODO: add additional informer event handlers here. - - return impl -} diff --git a/pkg/client/injection/reconciler/messaging/v1beta1/channel/stub/reconciler.go b/pkg/client/injection/reconciler/messaging/v1beta1/channel/stub/reconciler.go deleted file mode 100644 index 10adc3a16c2..00000000000 --- a/pkg/client/injection/reconciler/messaging/v1beta1/channel/stub/reconciler.go +++ /dev/null @@ -1,87 +0,0 @@ -/* -Copyright 2020 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by injection-gen. DO NOT EDIT. - -package channel - -import ( - context "context" - - v1 "k8s.io/api/core/v1" - v1beta1 "knative.dev/eventing/pkg/apis/messaging/v1beta1" - channel "knative.dev/eventing/pkg/client/injection/reconciler/messaging/v1beta1/channel" - reconciler "knative.dev/pkg/reconciler" -) - -// TODO: PLEASE COPY AND MODIFY THIS FILE AS A STARTING POINT - -// newReconciledNormal makes a new reconciler event with event type Normal, and -// reason ChannelReconciled. -func newReconciledNormal(namespace, name string) reconciler.Event { - return reconciler.NewEvent(v1.EventTypeNormal, "ChannelReconciled", "Channel reconciled: \"%s/%s\"", namespace, name) -} - -// Reconciler implements controller.Reconciler for Channel resources. -type Reconciler struct { - // TODO: add additional requirements here. -} - -// Check that our Reconciler implements Interface -var _ channel.Interface = (*Reconciler)(nil) - -// Optionally check that our Reconciler implements Finalizer -//var _ channel.Finalizer = (*Reconciler)(nil) - -// Optionally check that our Reconciler implements ReadOnlyInterface -// Implement this to observe resources even when we are not the leader. -//var _ channel.ReadOnlyInterface = (*Reconciler)(nil) - -// Optionally check that our Reconciler implements ReadOnlyFinalizer -// Implement this to observe tombstoned resources even when we are not -// the leader (best effort). -//var _ channel.ReadOnlyFinalizer = (*Reconciler)(nil) - -// ReconcileKind implements Interface.ReconcileKind. -func (r *Reconciler) ReconcileKind(ctx context.Context, o *v1beta1.Channel) reconciler.Event { - // TODO: use this if the resource implements InitializeConditions. - // o.Status.InitializeConditions() - - // TODO: add custom reconciliation logic here. - - // TODO: use this if the object has .status.ObservedGeneration. - // o.Status.ObservedGeneration = o.Generation - return newReconciledNormal(o.Namespace, o.Name) -} - -// Optionally, use FinalizeKind to add finalizers. FinalizeKind will be called -// when the resource is deleted. -//func (r *Reconciler) FinalizeKind(ctx context.Context, o *v1beta1.Channel) reconciler.Event { -// // TODO: add custom finalization logic here. -// return nil -//} - -// Optionally, use ObserveKind to observe the resource when we are not the leader. -// func (r *Reconciler) ObserveKind(ctx context.Context, o *v1beta1.Channel) reconciler.Event { -// // TODO: add custom observation logic here. -// return nil -// } - -// Optionally, use ObserveFinalizeKind to observe resources being finalized when we are no the leader. -//func (r *Reconciler) ObserveFinalizeKind(ctx context.Context, o *v1beta1.Channel) reconciler.Event { -// // TODO: add custom observation logic here. -// return nil -//} diff --git a/pkg/client/injection/reconciler/messaging/v1beta1/inmemorychannel/stub/controller.go b/pkg/client/injection/reconciler/messaging/v1beta1/inmemorychannel/stub/controller.go deleted file mode 100644 index 149327a2888..00000000000 --- a/pkg/client/injection/reconciler/messaging/v1beta1/inmemorychannel/stub/controller.go +++ /dev/null @@ -1,54 +0,0 @@ -/* -Copyright 2020 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by injection-gen. DO NOT EDIT. - -package inmemorychannel - -import ( - context "context" - - inmemorychannel "knative.dev/eventing/pkg/client/injection/informers/messaging/v1beta1/inmemorychannel" - v1beta1inmemorychannel "knative.dev/eventing/pkg/client/injection/reconciler/messaging/v1beta1/inmemorychannel" - configmap "knative.dev/pkg/configmap" - controller "knative.dev/pkg/controller" - logging "knative.dev/pkg/logging" -) - -// TODO: PLEASE COPY AND MODIFY THIS FILE AS A STARTING POINT - -// NewController creates a Reconciler for InMemoryChannel and returns the result of NewImpl. -func NewController( - ctx context.Context, - cmw configmap.Watcher, -) *controller.Impl { - logger := logging.FromContext(ctx) - - inmemorychannelInformer := inmemorychannel.Get(ctx) - - // TODO: setup additional informers here. - - r := &Reconciler{} - impl := v1beta1inmemorychannel.NewImpl(ctx, r) - - logger.Info("Setting up event handlers.") - - inmemorychannelInformer.Informer().AddEventHandler(controller.HandleAll(impl.Enqueue)) - - // TODO: add additional informer event handlers here. - - return impl -} diff --git a/pkg/client/injection/reconciler/messaging/v1beta1/inmemorychannel/stub/reconciler.go b/pkg/client/injection/reconciler/messaging/v1beta1/inmemorychannel/stub/reconciler.go deleted file mode 100644 index cf3b954a1a3..00000000000 --- a/pkg/client/injection/reconciler/messaging/v1beta1/inmemorychannel/stub/reconciler.go +++ /dev/null @@ -1,87 +0,0 @@ -/* -Copyright 2020 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by injection-gen. DO NOT EDIT. - -package inmemorychannel - -import ( - context "context" - - v1 "k8s.io/api/core/v1" - v1beta1 "knative.dev/eventing/pkg/apis/messaging/v1beta1" - inmemorychannel "knative.dev/eventing/pkg/client/injection/reconciler/messaging/v1beta1/inmemorychannel" - reconciler "knative.dev/pkg/reconciler" -) - -// TODO: PLEASE COPY AND MODIFY THIS FILE AS A STARTING POINT - -// newReconciledNormal makes a new reconciler event with event type Normal, and -// reason InMemoryChannelReconciled. -func newReconciledNormal(namespace, name string) reconciler.Event { - return reconciler.NewEvent(v1.EventTypeNormal, "InMemoryChannelReconciled", "InMemoryChannel reconciled: \"%s/%s\"", namespace, name) -} - -// Reconciler implements controller.Reconciler for InMemoryChannel resources. -type Reconciler struct { - // TODO: add additional requirements here. -} - -// Check that our Reconciler implements Interface -var _ inmemorychannel.Interface = (*Reconciler)(nil) - -// Optionally check that our Reconciler implements Finalizer -//var _ inmemorychannel.Finalizer = (*Reconciler)(nil) - -// Optionally check that our Reconciler implements ReadOnlyInterface -// Implement this to observe resources even when we are not the leader. -//var _ inmemorychannel.ReadOnlyInterface = (*Reconciler)(nil) - -// Optionally check that our Reconciler implements ReadOnlyFinalizer -// Implement this to observe tombstoned resources even when we are not -// the leader (best effort). -//var _ inmemorychannel.ReadOnlyFinalizer = (*Reconciler)(nil) - -// ReconcileKind implements Interface.ReconcileKind. -func (r *Reconciler) ReconcileKind(ctx context.Context, o *v1beta1.InMemoryChannel) reconciler.Event { - // TODO: use this if the resource implements InitializeConditions. - // o.Status.InitializeConditions() - - // TODO: add custom reconciliation logic here. - - // TODO: use this if the object has .status.ObservedGeneration. - // o.Status.ObservedGeneration = o.Generation - return newReconciledNormal(o.Namespace, o.Name) -} - -// Optionally, use FinalizeKind to add finalizers. FinalizeKind will be called -// when the resource is deleted. -//func (r *Reconciler) FinalizeKind(ctx context.Context, o *v1beta1.InMemoryChannel) reconciler.Event { -// // TODO: add custom finalization logic here. -// return nil -//} - -// Optionally, use ObserveKind to observe the resource when we are not the leader. -// func (r *Reconciler) ObserveKind(ctx context.Context, o *v1beta1.InMemoryChannel) reconciler.Event { -// // TODO: add custom observation logic here. -// return nil -// } - -// Optionally, use ObserveFinalizeKind to observe resources being finalized when we are no the leader. -//func (r *Reconciler) ObserveFinalizeKind(ctx context.Context, o *v1beta1.InMemoryChannel) reconciler.Event { -// // TODO: add custom observation logic here. -// return nil -//} diff --git a/pkg/client/injection/reconciler/messaging/v1beta1/subscription/stub/controller.go b/pkg/client/injection/reconciler/messaging/v1beta1/subscription/stub/controller.go deleted file mode 100644 index 29307d77695..00000000000 --- a/pkg/client/injection/reconciler/messaging/v1beta1/subscription/stub/controller.go +++ /dev/null @@ -1,54 +0,0 @@ -/* -Copyright 2020 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by injection-gen. DO NOT EDIT. - -package subscription - -import ( - context "context" - - subscription "knative.dev/eventing/pkg/client/injection/informers/messaging/v1beta1/subscription" - v1beta1subscription "knative.dev/eventing/pkg/client/injection/reconciler/messaging/v1beta1/subscription" - configmap "knative.dev/pkg/configmap" - controller "knative.dev/pkg/controller" - logging "knative.dev/pkg/logging" -) - -// TODO: PLEASE COPY AND MODIFY THIS FILE AS A STARTING POINT - -// NewController creates a Reconciler for Subscription and returns the result of NewImpl. -func NewController( - ctx context.Context, - cmw configmap.Watcher, -) *controller.Impl { - logger := logging.FromContext(ctx) - - subscriptionInformer := subscription.Get(ctx) - - // TODO: setup additional informers here. - - r := &Reconciler{} - impl := v1beta1subscription.NewImpl(ctx, r) - - logger.Info("Setting up event handlers.") - - subscriptionInformer.Informer().AddEventHandler(controller.HandleAll(impl.Enqueue)) - - // TODO: add additional informer event handlers here. - - return impl -} diff --git a/pkg/client/injection/reconciler/messaging/v1beta1/subscription/stub/reconciler.go b/pkg/client/injection/reconciler/messaging/v1beta1/subscription/stub/reconciler.go deleted file mode 100644 index 8cb3d01c592..00000000000 --- a/pkg/client/injection/reconciler/messaging/v1beta1/subscription/stub/reconciler.go +++ /dev/null @@ -1,87 +0,0 @@ -/* -Copyright 2020 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by injection-gen. DO NOT EDIT. - -package subscription - -import ( - context "context" - - v1 "k8s.io/api/core/v1" - v1beta1 "knative.dev/eventing/pkg/apis/messaging/v1beta1" - subscription "knative.dev/eventing/pkg/client/injection/reconciler/messaging/v1beta1/subscription" - reconciler "knative.dev/pkg/reconciler" -) - -// TODO: PLEASE COPY AND MODIFY THIS FILE AS A STARTING POINT - -// newReconciledNormal makes a new reconciler event with event type Normal, and -// reason SubscriptionReconciled. -func newReconciledNormal(namespace, name string) reconciler.Event { - return reconciler.NewEvent(v1.EventTypeNormal, "SubscriptionReconciled", "Subscription reconciled: \"%s/%s\"", namespace, name) -} - -// Reconciler implements controller.Reconciler for Subscription resources. -type Reconciler struct { - // TODO: add additional requirements here. -} - -// Check that our Reconciler implements Interface -var _ subscription.Interface = (*Reconciler)(nil) - -// Optionally check that our Reconciler implements Finalizer -//var _ subscription.Finalizer = (*Reconciler)(nil) - -// Optionally check that our Reconciler implements ReadOnlyInterface -// Implement this to observe resources even when we are not the leader. -//var _ subscription.ReadOnlyInterface = (*Reconciler)(nil) - -// Optionally check that our Reconciler implements ReadOnlyFinalizer -// Implement this to observe tombstoned resources even when we are not -// the leader (best effort). -//var _ subscription.ReadOnlyFinalizer = (*Reconciler)(nil) - -// ReconcileKind implements Interface.ReconcileKind. -func (r *Reconciler) ReconcileKind(ctx context.Context, o *v1beta1.Subscription) reconciler.Event { - // TODO: use this if the resource implements InitializeConditions. - // o.Status.InitializeConditions() - - // TODO: add custom reconciliation logic here. - - // TODO: use this if the object has .status.ObservedGeneration. - // o.Status.ObservedGeneration = o.Generation - return newReconciledNormal(o.Namespace, o.Name) -} - -// Optionally, use FinalizeKind to add finalizers. FinalizeKind will be called -// when the resource is deleted. -//func (r *Reconciler) FinalizeKind(ctx context.Context, o *v1beta1.Subscription) reconciler.Event { -// // TODO: add custom finalization logic here. -// return nil -//} - -// Optionally, use ObserveKind to observe the resource when we are not the leader. -// func (r *Reconciler) ObserveKind(ctx context.Context, o *v1beta1.Subscription) reconciler.Event { -// // TODO: add custom observation logic here. -// return nil -// } - -// Optionally, use ObserveFinalizeKind to observe resources being finalized when we are no the leader. -//func (r *Reconciler) ObserveFinalizeKind(ctx context.Context, o *v1beta1.Subscription) reconciler.Event { -// // TODO: add custom observation logic here. -// return nil -//} diff --git a/pkg/client/injection/reconciler/sources/v1alpha2/apiserversource/stub/controller.go b/pkg/client/injection/reconciler/sources/v1alpha2/apiserversource/stub/controller.go deleted file mode 100644 index bfd7a1fe018..00000000000 --- a/pkg/client/injection/reconciler/sources/v1alpha2/apiserversource/stub/controller.go +++ /dev/null @@ -1,54 +0,0 @@ -/* -Copyright 2020 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by injection-gen. DO NOT EDIT. - -package apiserversource - -import ( - context "context" - - apiserversource "knative.dev/eventing/pkg/client/injection/informers/sources/v1alpha2/apiserversource" - v1alpha2apiserversource "knative.dev/eventing/pkg/client/injection/reconciler/sources/v1alpha2/apiserversource" - configmap "knative.dev/pkg/configmap" - controller "knative.dev/pkg/controller" - logging "knative.dev/pkg/logging" -) - -// TODO: PLEASE COPY AND MODIFY THIS FILE AS A STARTING POINT - -// NewController creates a Reconciler for ApiServerSource and returns the result of NewImpl. -func NewController( - ctx context.Context, - cmw configmap.Watcher, -) *controller.Impl { - logger := logging.FromContext(ctx) - - apiserversourceInformer := apiserversource.Get(ctx) - - // TODO: setup additional informers here. - - r := &Reconciler{} - impl := v1alpha2apiserversource.NewImpl(ctx, r) - - logger.Info("Setting up event handlers.") - - apiserversourceInformer.Informer().AddEventHandler(controller.HandleAll(impl.Enqueue)) - - // TODO: add additional informer event handlers here. - - return impl -} diff --git a/pkg/client/injection/reconciler/sources/v1alpha2/apiserversource/stub/reconciler.go b/pkg/client/injection/reconciler/sources/v1alpha2/apiserversource/stub/reconciler.go deleted file mode 100644 index cdb4357bdd9..00000000000 --- a/pkg/client/injection/reconciler/sources/v1alpha2/apiserversource/stub/reconciler.go +++ /dev/null @@ -1,87 +0,0 @@ -/* -Copyright 2020 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by injection-gen. DO NOT EDIT. - -package apiserversource - -import ( - context "context" - - v1 "k8s.io/api/core/v1" - v1alpha2 "knative.dev/eventing/pkg/apis/sources/v1alpha2" - apiserversource "knative.dev/eventing/pkg/client/injection/reconciler/sources/v1alpha2/apiserversource" - reconciler "knative.dev/pkg/reconciler" -) - -// TODO: PLEASE COPY AND MODIFY THIS FILE AS A STARTING POINT - -// newReconciledNormal makes a new reconciler event with event type Normal, and -// reason ApiServerSourceReconciled. -func newReconciledNormal(namespace, name string) reconciler.Event { - return reconciler.NewEvent(v1.EventTypeNormal, "ApiServerSourceReconciled", "ApiServerSource reconciled: \"%s/%s\"", namespace, name) -} - -// Reconciler implements controller.Reconciler for ApiServerSource resources. -type Reconciler struct { - // TODO: add additional requirements here. -} - -// Check that our Reconciler implements Interface -var _ apiserversource.Interface = (*Reconciler)(nil) - -// Optionally check that our Reconciler implements Finalizer -//var _ apiserversource.Finalizer = (*Reconciler)(nil) - -// Optionally check that our Reconciler implements ReadOnlyInterface -// Implement this to observe resources even when we are not the leader. -//var _ apiserversource.ReadOnlyInterface = (*Reconciler)(nil) - -// Optionally check that our Reconciler implements ReadOnlyFinalizer -// Implement this to observe tombstoned resources even when we are not -// the leader (best effort). -//var _ apiserversource.ReadOnlyFinalizer = (*Reconciler)(nil) - -// ReconcileKind implements Interface.ReconcileKind. -func (r *Reconciler) ReconcileKind(ctx context.Context, o *v1alpha2.ApiServerSource) reconciler.Event { - // TODO: use this if the resource implements InitializeConditions. - // o.Status.InitializeConditions() - - // TODO: add custom reconciliation logic here. - - // TODO: use this if the object has .status.ObservedGeneration. - // o.Status.ObservedGeneration = o.Generation - return newReconciledNormal(o.Namespace, o.Name) -} - -// Optionally, use FinalizeKind to add finalizers. FinalizeKind will be called -// when the resource is deleted. -//func (r *Reconciler) FinalizeKind(ctx context.Context, o *v1alpha2.ApiServerSource) reconciler.Event { -// // TODO: add custom finalization logic here. -// return nil -//} - -// Optionally, use ObserveKind to observe the resource when we are not the leader. -// func (r *Reconciler) ObserveKind(ctx context.Context, o *v1alpha2.ApiServerSource) reconciler.Event { -// // TODO: add custom observation logic here. -// return nil -// } - -// Optionally, use ObserveFinalizeKind to observe resources being finalized when we are no the leader. -//func (r *Reconciler) ObserveFinalizeKind(ctx context.Context, o *v1alpha2.ApiServerSource) reconciler.Event { -// // TODO: add custom observation logic here. -// return nil -//} diff --git a/pkg/client/injection/reconciler/sources/v1alpha2/containersource/stub/controller.go b/pkg/client/injection/reconciler/sources/v1alpha2/containersource/stub/controller.go deleted file mode 100644 index 361c9cc9994..00000000000 --- a/pkg/client/injection/reconciler/sources/v1alpha2/containersource/stub/controller.go +++ /dev/null @@ -1,54 +0,0 @@ -/* -Copyright 2020 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by injection-gen. DO NOT EDIT. - -package containersource - -import ( - context "context" - - containersource "knative.dev/eventing/pkg/client/injection/informers/sources/v1alpha2/containersource" - v1alpha2containersource "knative.dev/eventing/pkg/client/injection/reconciler/sources/v1alpha2/containersource" - configmap "knative.dev/pkg/configmap" - controller "knative.dev/pkg/controller" - logging "knative.dev/pkg/logging" -) - -// TODO: PLEASE COPY AND MODIFY THIS FILE AS A STARTING POINT - -// NewController creates a Reconciler for ContainerSource and returns the result of NewImpl. -func NewController( - ctx context.Context, - cmw configmap.Watcher, -) *controller.Impl { - logger := logging.FromContext(ctx) - - containersourceInformer := containersource.Get(ctx) - - // TODO: setup additional informers here. - - r := &Reconciler{} - impl := v1alpha2containersource.NewImpl(ctx, r) - - logger.Info("Setting up event handlers.") - - containersourceInformer.Informer().AddEventHandler(controller.HandleAll(impl.Enqueue)) - - // TODO: add additional informer event handlers here. - - return impl -} diff --git a/pkg/client/injection/reconciler/sources/v1alpha2/containersource/stub/reconciler.go b/pkg/client/injection/reconciler/sources/v1alpha2/containersource/stub/reconciler.go deleted file mode 100644 index 9da6acdf5f7..00000000000 --- a/pkg/client/injection/reconciler/sources/v1alpha2/containersource/stub/reconciler.go +++ /dev/null @@ -1,87 +0,0 @@ -/* -Copyright 2020 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by injection-gen. DO NOT EDIT. - -package containersource - -import ( - context "context" - - v1 "k8s.io/api/core/v1" - v1alpha2 "knative.dev/eventing/pkg/apis/sources/v1alpha2" - containersource "knative.dev/eventing/pkg/client/injection/reconciler/sources/v1alpha2/containersource" - reconciler "knative.dev/pkg/reconciler" -) - -// TODO: PLEASE COPY AND MODIFY THIS FILE AS A STARTING POINT - -// newReconciledNormal makes a new reconciler event with event type Normal, and -// reason ContainerSourceReconciled. -func newReconciledNormal(namespace, name string) reconciler.Event { - return reconciler.NewEvent(v1.EventTypeNormal, "ContainerSourceReconciled", "ContainerSource reconciled: \"%s/%s\"", namespace, name) -} - -// Reconciler implements controller.Reconciler for ContainerSource resources. -type Reconciler struct { - // TODO: add additional requirements here. -} - -// Check that our Reconciler implements Interface -var _ containersource.Interface = (*Reconciler)(nil) - -// Optionally check that our Reconciler implements Finalizer -//var _ containersource.Finalizer = (*Reconciler)(nil) - -// Optionally check that our Reconciler implements ReadOnlyInterface -// Implement this to observe resources even when we are not the leader. -//var _ containersource.ReadOnlyInterface = (*Reconciler)(nil) - -// Optionally check that our Reconciler implements ReadOnlyFinalizer -// Implement this to observe tombstoned resources even when we are not -// the leader (best effort). -//var _ containersource.ReadOnlyFinalizer = (*Reconciler)(nil) - -// ReconcileKind implements Interface.ReconcileKind. -func (r *Reconciler) ReconcileKind(ctx context.Context, o *v1alpha2.ContainerSource) reconciler.Event { - // TODO: use this if the resource implements InitializeConditions. - // o.Status.InitializeConditions() - - // TODO: add custom reconciliation logic here. - - // TODO: use this if the object has .status.ObservedGeneration. - // o.Status.ObservedGeneration = o.Generation - return newReconciledNormal(o.Namespace, o.Name) -} - -// Optionally, use FinalizeKind to add finalizers. FinalizeKind will be called -// when the resource is deleted. -//func (r *Reconciler) FinalizeKind(ctx context.Context, o *v1alpha2.ContainerSource) reconciler.Event { -// // TODO: add custom finalization logic here. -// return nil -//} - -// Optionally, use ObserveKind to observe the resource when we are not the leader. -// func (r *Reconciler) ObserveKind(ctx context.Context, o *v1alpha2.ContainerSource) reconciler.Event { -// // TODO: add custom observation logic here. -// return nil -// } - -// Optionally, use ObserveFinalizeKind to observe resources being finalized when we are no the leader. -//func (r *Reconciler) ObserveFinalizeKind(ctx context.Context, o *v1alpha2.ContainerSource) reconciler.Event { -// // TODO: add custom observation logic here. -// return nil -//} diff --git a/pkg/client/injection/reconciler/sources/v1alpha2/pingsource/stub/controller.go b/pkg/client/injection/reconciler/sources/v1alpha2/pingsource/stub/controller.go deleted file mode 100644 index 10f35e8c608..00000000000 --- a/pkg/client/injection/reconciler/sources/v1alpha2/pingsource/stub/controller.go +++ /dev/null @@ -1,54 +0,0 @@ -/* -Copyright 2020 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by injection-gen. DO NOT EDIT. - -package pingsource - -import ( - context "context" - - pingsource "knative.dev/eventing/pkg/client/injection/informers/sources/v1alpha2/pingsource" - v1alpha2pingsource "knative.dev/eventing/pkg/client/injection/reconciler/sources/v1alpha2/pingsource" - configmap "knative.dev/pkg/configmap" - controller "knative.dev/pkg/controller" - logging "knative.dev/pkg/logging" -) - -// TODO: PLEASE COPY AND MODIFY THIS FILE AS A STARTING POINT - -// NewController creates a Reconciler for PingSource and returns the result of NewImpl. -func NewController( - ctx context.Context, - cmw configmap.Watcher, -) *controller.Impl { - logger := logging.FromContext(ctx) - - pingsourceInformer := pingsource.Get(ctx) - - // TODO: setup additional informers here. - - r := &Reconciler{} - impl := v1alpha2pingsource.NewImpl(ctx, r) - - logger.Info("Setting up event handlers.") - - pingsourceInformer.Informer().AddEventHandler(controller.HandleAll(impl.Enqueue)) - - // TODO: add additional informer event handlers here. - - return impl -} diff --git a/pkg/client/injection/reconciler/sources/v1alpha2/pingsource/stub/reconciler.go b/pkg/client/injection/reconciler/sources/v1alpha2/pingsource/stub/reconciler.go deleted file mode 100644 index 81f70bdd100..00000000000 --- a/pkg/client/injection/reconciler/sources/v1alpha2/pingsource/stub/reconciler.go +++ /dev/null @@ -1,87 +0,0 @@ -/* -Copyright 2020 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by injection-gen. DO NOT EDIT. - -package pingsource - -import ( - context "context" - - v1 "k8s.io/api/core/v1" - v1alpha2 "knative.dev/eventing/pkg/apis/sources/v1alpha2" - pingsource "knative.dev/eventing/pkg/client/injection/reconciler/sources/v1alpha2/pingsource" - reconciler "knative.dev/pkg/reconciler" -) - -// TODO: PLEASE COPY AND MODIFY THIS FILE AS A STARTING POINT - -// newReconciledNormal makes a new reconciler event with event type Normal, and -// reason PingSourceReconciled. -func newReconciledNormal(namespace, name string) reconciler.Event { - return reconciler.NewEvent(v1.EventTypeNormal, "PingSourceReconciled", "PingSource reconciled: \"%s/%s\"", namespace, name) -} - -// Reconciler implements controller.Reconciler for PingSource resources. -type Reconciler struct { - // TODO: add additional requirements here. -} - -// Check that our Reconciler implements Interface -var _ pingsource.Interface = (*Reconciler)(nil) - -// Optionally check that our Reconciler implements Finalizer -//var _ pingsource.Finalizer = (*Reconciler)(nil) - -// Optionally check that our Reconciler implements ReadOnlyInterface -// Implement this to observe resources even when we are not the leader. -//var _ pingsource.ReadOnlyInterface = (*Reconciler)(nil) - -// Optionally check that our Reconciler implements ReadOnlyFinalizer -// Implement this to observe tombstoned resources even when we are not -// the leader (best effort). -//var _ pingsource.ReadOnlyFinalizer = (*Reconciler)(nil) - -// ReconcileKind implements Interface.ReconcileKind. -func (r *Reconciler) ReconcileKind(ctx context.Context, o *v1alpha2.PingSource) reconciler.Event { - // TODO: use this if the resource implements InitializeConditions. - // o.Status.InitializeConditions() - - // TODO: add custom reconciliation logic here. - - // TODO: use this if the object has .status.ObservedGeneration. - // o.Status.ObservedGeneration = o.Generation - return newReconciledNormal(o.Namespace, o.Name) -} - -// Optionally, use FinalizeKind to add finalizers. FinalizeKind will be called -// when the resource is deleted. -//func (r *Reconciler) FinalizeKind(ctx context.Context, o *v1alpha2.PingSource) reconciler.Event { -// // TODO: add custom finalization logic here. -// return nil -//} - -// Optionally, use ObserveKind to observe the resource when we are not the leader. -// func (r *Reconciler) ObserveKind(ctx context.Context, o *v1alpha2.PingSource) reconciler.Event { -// // TODO: add custom observation logic here. -// return nil -// } - -// Optionally, use ObserveFinalizeKind to observe resources being finalized when we are no the leader. -//func (r *Reconciler) ObserveFinalizeKind(ctx context.Context, o *v1alpha2.PingSource) reconciler.Event { -// // TODO: add custom observation logic here. -// return nil -//} diff --git a/pkg/client/injection/reconciler/sources/v1beta1/apiserversource/stub/controller.go b/pkg/client/injection/reconciler/sources/v1beta1/apiserversource/stub/controller.go deleted file mode 100644 index 530527250d9..00000000000 --- a/pkg/client/injection/reconciler/sources/v1beta1/apiserversource/stub/controller.go +++ /dev/null @@ -1,54 +0,0 @@ -/* -Copyright 2020 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by injection-gen. DO NOT EDIT. - -package apiserversource - -import ( - context "context" - - apiserversource "knative.dev/eventing/pkg/client/injection/informers/sources/v1beta1/apiserversource" - v1beta1apiserversource "knative.dev/eventing/pkg/client/injection/reconciler/sources/v1beta1/apiserversource" - configmap "knative.dev/pkg/configmap" - controller "knative.dev/pkg/controller" - logging "knative.dev/pkg/logging" -) - -// TODO: PLEASE COPY AND MODIFY THIS FILE AS A STARTING POINT - -// NewController creates a Reconciler for ApiServerSource and returns the result of NewImpl. -func NewController( - ctx context.Context, - cmw configmap.Watcher, -) *controller.Impl { - logger := logging.FromContext(ctx) - - apiserversourceInformer := apiserversource.Get(ctx) - - // TODO: setup additional informers here. - - r := &Reconciler{} - impl := v1beta1apiserversource.NewImpl(ctx, r) - - logger.Info("Setting up event handlers.") - - apiserversourceInformer.Informer().AddEventHandler(controller.HandleAll(impl.Enqueue)) - - // TODO: add additional informer event handlers here. - - return impl -} diff --git a/pkg/client/injection/reconciler/sources/v1beta1/apiserversource/stub/reconciler.go b/pkg/client/injection/reconciler/sources/v1beta1/apiserversource/stub/reconciler.go deleted file mode 100644 index 78aa620a8de..00000000000 --- a/pkg/client/injection/reconciler/sources/v1beta1/apiserversource/stub/reconciler.go +++ /dev/null @@ -1,87 +0,0 @@ -/* -Copyright 2020 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by injection-gen. DO NOT EDIT. - -package apiserversource - -import ( - context "context" - - v1 "k8s.io/api/core/v1" - v1beta1 "knative.dev/eventing/pkg/apis/sources/v1beta1" - apiserversource "knative.dev/eventing/pkg/client/injection/reconciler/sources/v1beta1/apiserversource" - reconciler "knative.dev/pkg/reconciler" -) - -// TODO: PLEASE COPY AND MODIFY THIS FILE AS A STARTING POINT - -// newReconciledNormal makes a new reconciler event with event type Normal, and -// reason ApiServerSourceReconciled. -func newReconciledNormal(namespace, name string) reconciler.Event { - return reconciler.NewEvent(v1.EventTypeNormal, "ApiServerSourceReconciled", "ApiServerSource reconciled: \"%s/%s\"", namespace, name) -} - -// Reconciler implements controller.Reconciler for ApiServerSource resources. -type Reconciler struct { - // TODO: add additional requirements here. -} - -// Check that our Reconciler implements Interface -var _ apiserversource.Interface = (*Reconciler)(nil) - -// Optionally check that our Reconciler implements Finalizer -//var _ apiserversource.Finalizer = (*Reconciler)(nil) - -// Optionally check that our Reconciler implements ReadOnlyInterface -// Implement this to observe resources even when we are not the leader. -//var _ apiserversource.ReadOnlyInterface = (*Reconciler)(nil) - -// Optionally check that our Reconciler implements ReadOnlyFinalizer -// Implement this to observe tombstoned resources even when we are not -// the leader (best effort). -//var _ apiserversource.ReadOnlyFinalizer = (*Reconciler)(nil) - -// ReconcileKind implements Interface.ReconcileKind. -func (r *Reconciler) ReconcileKind(ctx context.Context, o *v1beta1.ApiServerSource) reconciler.Event { - // TODO: use this if the resource implements InitializeConditions. - // o.Status.InitializeConditions() - - // TODO: add custom reconciliation logic here. - - // TODO: use this if the object has .status.ObservedGeneration. - // o.Status.ObservedGeneration = o.Generation - return newReconciledNormal(o.Namespace, o.Name) -} - -// Optionally, use FinalizeKind to add finalizers. FinalizeKind will be called -// when the resource is deleted. -//func (r *Reconciler) FinalizeKind(ctx context.Context, o *v1beta1.ApiServerSource) reconciler.Event { -// // TODO: add custom finalization logic here. -// return nil -//} - -// Optionally, use ObserveKind to observe the resource when we are not the leader. -// func (r *Reconciler) ObserveKind(ctx context.Context, o *v1beta1.ApiServerSource) reconciler.Event { -// // TODO: add custom observation logic here. -// return nil -// } - -// Optionally, use ObserveFinalizeKind to observe resources being finalized when we are no the leader. -//func (r *Reconciler) ObserveFinalizeKind(ctx context.Context, o *v1beta1.ApiServerSource) reconciler.Event { -// // TODO: add custom observation logic here. -// return nil -//} diff --git a/pkg/client/injection/reconciler/sources/v1beta1/containersource/stub/controller.go b/pkg/client/injection/reconciler/sources/v1beta1/containersource/stub/controller.go deleted file mode 100644 index f779273ba73..00000000000 --- a/pkg/client/injection/reconciler/sources/v1beta1/containersource/stub/controller.go +++ /dev/null @@ -1,54 +0,0 @@ -/* -Copyright 2020 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by injection-gen. DO NOT EDIT. - -package containersource - -import ( - context "context" - - containersource "knative.dev/eventing/pkg/client/injection/informers/sources/v1beta1/containersource" - v1beta1containersource "knative.dev/eventing/pkg/client/injection/reconciler/sources/v1beta1/containersource" - configmap "knative.dev/pkg/configmap" - controller "knative.dev/pkg/controller" - logging "knative.dev/pkg/logging" -) - -// TODO: PLEASE COPY AND MODIFY THIS FILE AS A STARTING POINT - -// NewController creates a Reconciler for ContainerSource and returns the result of NewImpl. -func NewController( - ctx context.Context, - cmw configmap.Watcher, -) *controller.Impl { - logger := logging.FromContext(ctx) - - containersourceInformer := containersource.Get(ctx) - - // TODO: setup additional informers here. - - r := &Reconciler{} - impl := v1beta1containersource.NewImpl(ctx, r) - - logger.Info("Setting up event handlers.") - - containersourceInformer.Informer().AddEventHandler(controller.HandleAll(impl.Enqueue)) - - // TODO: add additional informer event handlers here. - - return impl -} diff --git a/pkg/client/injection/reconciler/sources/v1beta1/containersource/stub/reconciler.go b/pkg/client/injection/reconciler/sources/v1beta1/containersource/stub/reconciler.go deleted file mode 100644 index fa7c68c2990..00000000000 --- a/pkg/client/injection/reconciler/sources/v1beta1/containersource/stub/reconciler.go +++ /dev/null @@ -1,87 +0,0 @@ -/* -Copyright 2020 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by injection-gen. DO NOT EDIT. - -package containersource - -import ( - context "context" - - v1 "k8s.io/api/core/v1" - v1beta1 "knative.dev/eventing/pkg/apis/sources/v1beta1" - containersource "knative.dev/eventing/pkg/client/injection/reconciler/sources/v1beta1/containersource" - reconciler "knative.dev/pkg/reconciler" -) - -// TODO: PLEASE COPY AND MODIFY THIS FILE AS A STARTING POINT - -// newReconciledNormal makes a new reconciler event with event type Normal, and -// reason ContainerSourceReconciled. -func newReconciledNormal(namespace, name string) reconciler.Event { - return reconciler.NewEvent(v1.EventTypeNormal, "ContainerSourceReconciled", "ContainerSource reconciled: \"%s/%s\"", namespace, name) -} - -// Reconciler implements controller.Reconciler for ContainerSource resources. -type Reconciler struct { - // TODO: add additional requirements here. -} - -// Check that our Reconciler implements Interface -var _ containersource.Interface = (*Reconciler)(nil) - -// Optionally check that our Reconciler implements Finalizer -//var _ containersource.Finalizer = (*Reconciler)(nil) - -// Optionally check that our Reconciler implements ReadOnlyInterface -// Implement this to observe resources even when we are not the leader. -//var _ containersource.ReadOnlyInterface = (*Reconciler)(nil) - -// Optionally check that our Reconciler implements ReadOnlyFinalizer -// Implement this to observe tombstoned resources even when we are not -// the leader (best effort). -//var _ containersource.ReadOnlyFinalizer = (*Reconciler)(nil) - -// ReconcileKind implements Interface.ReconcileKind. -func (r *Reconciler) ReconcileKind(ctx context.Context, o *v1beta1.ContainerSource) reconciler.Event { - // TODO: use this if the resource implements InitializeConditions. - // o.Status.InitializeConditions() - - // TODO: add custom reconciliation logic here. - - // TODO: use this if the object has .status.ObservedGeneration. - // o.Status.ObservedGeneration = o.Generation - return newReconciledNormal(o.Namespace, o.Name) -} - -// Optionally, use FinalizeKind to add finalizers. FinalizeKind will be called -// when the resource is deleted. -//func (r *Reconciler) FinalizeKind(ctx context.Context, o *v1beta1.ContainerSource) reconciler.Event { -// // TODO: add custom finalization logic here. -// return nil -//} - -// Optionally, use ObserveKind to observe the resource when we are not the leader. -// func (r *Reconciler) ObserveKind(ctx context.Context, o *v1beta1.ContainerSource) reconciler.Event { -// // TODO: add custom observation logic here. -// return nil -// } - -// Optionally, use ObserveFinalizeKind to observe resources being finalized when we are no the leader. -//func (r *Reconciler) ObserveFinalizeKind(ctx context.Context, o *v1beta1.ContainerSource) reconciler.Event { -// // TODO: add custom observation logic here. -// return nil -//} From 150d0471872e9c426903c322541769b2632381fa Mon Sep 17 00:00:00 2001 From: Scott Nichols Date: Thu, 23 Jul 2020 09:36:25 -0700 Subject: [PATCH 2/2] do not make reconciled events for each loop --- pkg/reconciler/apiserversource/apiserversource.go | 8 +------- .../apiserversource/apiserversource_test.go | 15 --------------- 2 files changed, 1 insertion(+), 22 deletions(-) diff --git a/pkg/reconciler/apiserversource/apiserversource.go b/pkg/reconciler/apiserversource/apiserversource.go index 2b7067960d7..5fde3b5d72d 100644 --- a/pkg/reconciler/apiserversource/apiserversource.go +++ b/pkg/reconciler/apiserversource/apiserversource.go @@ -55,12 +55,6 @@ const ( component = "apiserversource" ) -// newReconciledNormal makes a new reconciler event with event type Normal, and -// reason ApiServerSourceReconciled. -func newReconciledNormal(namespace, name string) pkgreconciler.Event { - return pkgreconciler.NewEvent(corev1.EventTypeNormal, "ApiServerSourceReconciled", "ApiServerSource reconciled: \"%s/%s\"", namespace, name) -} - func newWarningSinkNotFound(sink *duckv1.Destination) pkgreconciler.Event { b, _ := json.Marshal(sink) return pkgreconciler.NewEvent(corev1.EventTypeWarning, "SinkNotFound", "Sink not found: %s", string(b)) @@ -125,7 +119,7 @@ func (r *Reconciler) ReconcileKind(ctx context.Context, source *v1beta1.ApiServe source.Status.CloudEventAttributes = r.createCloudEventAttributes() - return newReconciledNormal(source.Namespace, source.Name) + return nil } func (r *Reconciler) createReceiveAdapter(ctx context.Context, src *v1beta1.ApiServerSource, sinkURI string) (*appsv1.Deployment, error) { diff --git a/pkg/reconciler/apiserversource/apiserversource_test.go b/pkg/reconciler/apiserversource/apiserversource_test.go index bb2a45a31dc..670dc5f3c61 100644 --- a/pkg/reconciler/apiserversource/apiserversource_test.go +++ b/pkg/reconciler/apiserversource/apiserversource_test.go @@ -164,9 +164,6 @@ func TestReconcile(t *testing.T) { makeAvailableReceiveAdapter(t), }, Key: testNS + "/" + sourceName, - WantEvents: []string{ - Eventf(corev1.EventTypeNormal, "ApiServerSourceReconciled", `ApiServerSource reconciled: "%s/%s"`, testNS, sourceName), - }, WantStatusUpdates: []clientgotesting.UpdateActionImpl{{ Object: rttesting.NewApiServerSourceV1Beta1(sourceName, testNS, rttesting.WithApiServerSourceSpecV1B1(sourcesv1beta1.ApiServerSourceSpec{ @@ -215,9 +212,6 @@ func TestReconcile(t *testing.T) { makeAvailableReceiveAdapter(t), }, Key: testNS + "/" + sourceName, - WantEvents: []string{ - Eventf(corev1.EventTypeNormal, "ApiServerSourceReconciled", `ApiServerSource reconciled: "%s/%s"`, testNS, sourceName), - }, WantStatusUpdates: []clientgotesting.UpdateActionImpl{{ Object: rttesting.NewApiServerSourceV1Beta1(sourceName, testNS, rttesting.WithApiServerSourceSpecV1B1(sourcesv1beta1.ApiServerSourceSpec{ @@ -271,9 +265,6 @@ func TestReconcile(t *testing.T) { makeAvailableReceiveAdapterWithTargetURI(t), }, Key: testNS + "/" + sourceName, - WantEvents: []string{ - Eventf(corev1.EventTypeNormal, "ApiServerSourceReconciled", `ApiServerSource reconciled: "%s/%s"`, testNS, sourceName), - }, WantStatusUpdates: []clientgotesting.UpdateActionImpl{{ Object: rttesting.NewApiServerSourceV1Beta1(sourceName, testNS, rttesting.WithApiServerSourceSpecV1B1(sourcesv1beta1.ApiServerSourceSpec{ @@ -329,7 +320,6 @@ func TestReconcile(t *testing.T) { Key: testNS + "/" + sourceName, WantEvents: []string{ Eventf(corev1.EventTypeNormal, "ApiServerSourceDeploymentUpdated", "Deployment \"apiserversource-test-apiserver-source-1234\" updated"), - Eventf(corev1.EventTypeNormal, "ApiServerSourceReconciled", `ApiServerSource reconciled: "%s/%s"`, testNS, sourceName), }, WantStatusUpdates: []clientgotesting.UpdateActionImpl{{ Object: rttesting.NewApiServerSourceV1Beta1(sourceName, testNS, @@ -387,7 +377,6 @@ func TestReconcile(t *testing.T) { Key: testNS + "/" + sourceName, WantEvents: []string{ Eventf(corev1.EventTypeNormal, "ApiServerSourceDeploymentUpdated", "Deployment \"apiserversource-test-apiserver-source-1234\" updated"), - Eventf(corev1.EventTypeNormal, "ApiServerSourceReconciled", `ApiServerSource reconciled: "%s/%s"`, testNS, sourceName), }, WantStatusUpdates: []clientgotesting.UpdateActionImpl{{ Object: rttesting.NewApiServerSourceV1Beta1(sourceName, testNS, @@ -445,7 +434,6 @@ func TestReconcile(t *testing.T) { Key: testNS + "/" + sourceName, WantEvents: []string{ Eventf(corev1.EventTypeNormal, "ApiServerSourceDeploymentUpdated", "Deployment \"apiserversource-test-apiserver-source-1234\" updated"), - Eventf(corev1.EventTypeNormal, "ApiServerSourceReconciled", `ApiServerSource reconciled: "%s/%s"`, testNS, sourceName), }, WantStatusUpdates: []clientgotesting.UpdateActionImpl{{ Object: rttesting.NewApiServerSourceV1Beta1(sourceName, testNS, @@ -498,9 +486,6 @@ func TestReconcile(t *testing.T) { makeAvailableReceiveAdapter(t), }, Key: testNS + "/" + sourceName, - WantEvents: []string{ - Eventf(corev1.EventTypeNormal, "ApiServerSourceReconciled", `ApiServerSource reconciled: "%s/%s"`, testNS, sourceName), - }, WantStatusUpdates: []clientgotesting.UpdateActionImpl{{ Object: rttesting.NewApiServerSourceV1Beta1(sourceName, testNS, rttesting.WithApiServerSourceSpecV1B1(sourcesv1beta1.ApiServerSourceSpec{