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, 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.



    This section is empty.


    This section is empty.


    func NewKindWithCache

    func NewKindWithCache(object client.Object, cache cache.Cache) source.SyncingSource

      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


      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

        func (ks *Kind) InjectCache(c cache.Cache) error

          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

            Start is internal and should be called only by the Controller to register an EventHandler with the Informer to enqueue reconcile.Requests.

            func (*Kind) String

            func (ks *Kind) String() string

            func (*Kind) WaitForSync

            func (ks *Kind) WaitForSync(ctx context.Context) error

              WaitForSync implements SyncingSource to allow controllers to wait with starting workers until the cache is synced.

              Source Files


              Path Synopsis
              This is taken from
              This is taken from