clusterapi

package
v1.9.1 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClusterWideKeyFunc

func ClusterWideKeyFunc(obj interface{}) (util.QueueKey, error)

ClusterWideKeyFunc generates a ClusterWideKey for object.

Types

type ClusterDetector

type ClusterDetector struct {
	ControllerPlaneConfig *rest.Config
	ClusterAPIConfig      *rest.Config
	ClusterAPIClient      client.Client
	InformerManager       genericmanager.SingleClusterInformerManager
	EventHandler          cache.ResourceEventHandler
	Processor             util.AsyncWorker
	ConcurrentReconciles  int
	// contains filtered or unexported fields
}

ClusterDetector is a cluster watcher which watched cluster object in cluster-api management cluster and reconcile the events.

func (*ClusterDetector) GetUnstructuredObject

func (d *ClusterDetector) GetUnstructuredObject(objectKey keys.ClusterWideKey) (*unstructured.Unstructured, error)

GetUnstructuredObject retrieves object by key and returned its unstructured.

func (*ClusterDetector) OnAdd

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

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

func (*ClusterDetector) OnDelete

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

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

func (*ClusterDetector) OnUpdate

func (d *ClusterDetector) OnUpdate(_, newObj interface{})

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

func (*ClusterDetector) Reconcile

func (d *ClusterDetector) 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 (*ClusterDetector) Start

func (d *ClusterDetector) Start(ctx context.Context) error

Start runs the detector, never stop until stopCh closed.

Jump to

Keyboard shortcuts

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