dependenciesdistributor

package
v1.9.0-preview2 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2023 License: Apache-2.0 Imports: 40 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     genericmanager.SingleClusterInformerManager
	EventRecorder       record.EventRecorder
	RESTMapper          meta.RESTMapper
	ResourceInterpreter resourceinterpreter.ResourceInterpreter
	RateLimiterOptions  ratelimiterflag.Options
	// 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) OnUpdate

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

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

func (*DependenciesDistributor) Reconcile

Reconcile performs a full reconciliation for the object referred to by the Request. The Controller will requeue the Request to be processed again if an error is non-nil or Result.Requeue is true, otherwise upon completion it will remove the work from the queue.

func (*DependenciesDistributor) SetupWithManager added in v1.7.0

func (d *DependenciesDistributor) SetupWithManager(mgr controllerruntime.Manager) error

SetupWithManager creates a controller and register to controller manager.

func (*DependenciesDistributor) Start

Start runs the distributor, never stop until stopCh closed.

type LabelsKey added in v1.7.0

type LabelsKey struct {
	keys.ClusterWideKey
	// Labels is the labels of the referencing object.
	Labels map[string]string
}

LabelsKey is the object key which is a unique identifier under a cluster, across all resources.

Jump to

Keyboard shortcuts

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