Documentation ¶
Index ¶
- type DependenciesDistributor
- func (d *DependenciesDistributor) NeedLeaderElection() bool
- func (d *DependenciesDistributor) OnAdd(obj interface{})
- func (d *DependenciesDistributor) OnDelete(obj interface{})
- func (d *DependenciesDistributor) OnResourceBindingDelete(obj interface{})
- func (d *DependenciesDistributor) OnResourceBindingUpdate(oldObj, newObj interface{})
- func (d *DependenciesDistributor) OnUpdate(oldObj, newObj interface{})
- func (d *DependenciesDistributor) Reconcile(key util.QueueKey) error
- func (d *DependenciesDistributor) ReconcileResourceBinding(key util.QueueKey) error
- func (d *DependenciesDistributor) Start(ctx context.Context) error
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.