Documentation ¶
Overview ¶
Package source is a modification of the controller-runtime pkg/source package to use the same Kind based source but without the hard requirement to register them with the k8s API server. This source is meant to be used when the event source is not k8s and the event object cache is based on client-go informers.
NOTE: Based on https://github.com/kubernetes-sigs/controller-runtime/blob/v0.8.3/pkg/source/source.go, modified to enable running the source when the Kind is not registered with k8s API server. This is needed for the cache of external system objects.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewKindWithCache ¶
NewKindWithCache creates a Source without InjectCache, so that it is assured that the given cache is used and not overwritten. It can be used to watch objects in a different cluster by passing the cache from that other cluster
Types ¶
type Kind ¶
type Kind struct { // Type is the type of object to watch. e.g. &v1.Pod{} Type client.Object // contains filtered or unexported fields }
Kind is used to provide a source of events originating inside the cluster from Watches (e.g. Pod Create)
func (*Kind) InjectCache ¶
InjectCache is internal should be called only by the Controller. InjectCache is used to inject the Cache dependency initialized by the ControllerManager.
func (*Kind) Start ¶
func (ks *Kind) Start(ctx context.Context, handler handler.EventHandler, queue workqueue.RateLimitingInterface, prct ...predicate.Predicate) error
Start is internal and should be called only by the Controller to register an EventHandler with the Informer to enqueue reconcile.Requests.