Documentation ¶
Index ¶
- type DependenciesDistributor
- func (d *DependenciesDistributor) NeedLeaderElection() bool
- func (d *DependenciesDistributor) OnAdd(obj interface{})
- func (d *DependenciesDistributor) OnDelete(obj interface{})
- func (d *DependenciesDistributor) OnUpdate(oldObj, newObj interface{})
- func (d *DependenciesDistributor) Reconcile(ctx context.Context, request reconcile.Request) (reconcile.Result, error)
- func (d *DependenciesDistributor) SetupWithManager(mgr controllerruntime.Manager) error
- func (d *DependenciesDistributor) Start(ctx context.Context) error
- type LabelsKey
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. ResourceBinding 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 resourceBindings 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 ¶
func (d *DependenciesDistributor) Reconcile(ctx context.Context, request reconcile.Request) (reconcile.Result, error)
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.