dependenciesdistributor

package
v1.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 25, 2022 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DependenciesDistributor

type DependenciesDistributor struct {
	// Client is used to retrieve objects, it is often more convenient than lister.
	Client client.Client
	// DynamicClient used to fetch arbitrary resources.
	DynamicClient dynamic.Interface

	InformerManager     informermanager.SingleClusterInformerManager
	EventHandler        cache.ResourceEventHandler
	Processor           util.AsyncWorker
	RESTMapper          meta.RESTMapper
	ResourceInterpreter resourceinterpreter.ResourceInterpreter
	// contains filtered or unexported fields
}

DependenciesDistributor is to automatically propagate relevant resources. Resource binding will be created when a resource(e.g. deployment) is matched by a propagation policy, we call it independent binding in DependenciesDistributor. And when DependenciesDistributor works, it will create or update reference resource bindings of relevant resources(e.g. secret), which we call them attached bindings.

func (*DependenciesDistributor) NeedLeaderElection

func (d *DependenciesDistributor) NeedLeaderElection() bool

NeedLeaderElection implements LeaderElectionRunnable interface. So that the distributor could run in the leader election mode.

func (*DependenciesDistributor) OnAdd

func (d *DependenciesDistributor) OnAdd(obj interface{})

OnAdd handles object add event and push the object to queue.

func (*DependenciesDistributor) OnDelete

func (d *DependenciesDistributor) OnDelete(obj interface{})

OnDelete handles object delete event and push the object to queue.

func (*DependenciesDistributor) OnResourceBindingDelete

func (d *DependenciesDistributor) OnResourceBindingDelete(obj interface{})

OnResourceBindingDelete handles object delete event and push the object to queue.

func (*DependenciesDistributor) OnResourceBindingUpdate

func (d *DependenciesDistributor) OnResourceBindingUpdate(oldObj, newObj interface{})

OnResourceBindingUpdate handles object update event and push the object to queue.

func (*DependenciesDistributor) OnUpdate

func (d *DependenciesDistributor) OnUpdate(oldObj, newObj interface{})

OnUpdate handles object update event and push the object to queue.

func (*DependenciesDistributor) Reconcile

func (d *DependenciesDistributor) Reconcile(key util.QueueKey) error

Reconcile performs a full reconciliation for the object referred to by the key. The key will be re-queued if an error is non-nil.

func (*DependenciesDistributor) ReconcileResourceBinding

func (d *DependenciesDistributor) ReconcileResourceBinding(key util.QueueKey) error

ReconcileResourceBinding handles ResourceBinding object changes.

func (*DependenciesDistributor) Start

Start runs the distributor, never stop until stopCh closed.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL