func WatchAll(config *rest.Config, ctrl controller.Controller, reconciler eventsSource, labelMaker LabelMaker) (chan struct{}, error) {
	options := WatchChildrenOptions{
		RESTConfig:              config,
		Controller:              ctrl,
		Reconciler:              reconciler,
		LabelMaker:              labelMaker,
		ScopeWatchesToNamespace: false,
	}
	return WatchChildren(options)
}
WatchAll creates a Watch on ctrl for all objects reconciled by recnl.
Deprecated: prefer WatchChildren (and consider setting ScopeWatchesToNamespace)
package declarative
import (
	"context"
	"fmt"
	"sync"
	"k8s.io/apimachinery/pkg/api/meta"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"k8s.io/apimachinery/pkg/labels"
	"k8s.io/apimachinery/pkg/runtime/schema"
	"k8s.io/client-go/dynamic"
	"k8s.io/client-go/rest"
	ctrl "sigs.k8s.io/controller-runtime"
	"sigs.k8s.io/controller-runtime/pkg/client/apiutil"
	"sigs.k8s.io/controller-runtime/pkg/controller"
	"sigs.k8s.io/controller-runtime/pkg/handler"
	"sigs.k8s.io/controller-runtime/pkg/log"
	"sigs.k8s.io/controller-runtime/pkg/source"
	"sigs.k8s.io/kubebuilder-declarative-pattern/pkg/patterns/declarative/pkg/manifest"
	"sigs.k8s.io/kubebuilder-declarative-pattern/pkg/patterns/declarative/pkg/watch"
)
type eventsSource interface {
	SetSink(sink Sink)
}
type DynamicWatch interface {
	Add(trigger schema.GroupVersionKind, options metav1.ListOptions, namespace string, target metav1.ObjectMeta) error
}
type WatchChildrenOptions struct {
	Manager ctrl.Manager
	RESTConfig *rest.Config
	LabelMaker LabelMaker
	Controller controller.Controller
	Reconciler eventsSource
	ScopeWatchesToNamespace bool
}