controllers

package
v0.28.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigMapPredicates added in v0.15.0

func ConfigMapPredicates(logger logr.Logger) predicate.Funcs

ConfigMapPredicates predicates for ConfigMaps. Reloader contains list of Deployments/StatefulSets/DaemonSets instances deployed by Sveltos which needs to be reloaded when mounted ConfigMap changes. ReloaderReconciler starts a watcher on ConfigMap. When ConfigMap Data/BinaryData changes no reloader instance is queued for reconciliation. Instead ConfigMap itself is queued to be examined by evaluation manager. Manager has info on which Deployments/StatefulSets/DaemonSets are currently mounting this ConfigMap.

func InitScheme

func InitScheme() (*runtime.Scheme, error)

func SecretPredicates added in v0.15.0

func SecretPredicates(logger logr.Logger) predicate.Funcs

SecretMapPredicates predicates for Secrets Reloader contains list of Deployments/StatefulSets/DaemonSets instances deployed by Sveltos which needs to be reloaded when mounted Secret changes. ReloaderReconciler starts a watcher on Secret. When Secret Data/StringData changes no reloader instance is queued for reconciliation. Instead Secret itself is queued to be examined by evaluation manager. Manager has info on which Deployments/StatefulSets/DaemonSets are currently mounting this Secret.

Types

type ClassifierReconciler

type ClassifierReconciler struct {
	client.Client
	Scheme           *runtime.Scheme
	RunMode          Mode
	ClusterNamespace string
	ClusterName      string
	ClusterType      libsveltosv1alpha1.ClusterType
	// Used to update internal maps and sets
	Mux sync.RWMutex
	// key: GVK, Value: list of Classifiers based on that GVK
	GVKClassifiers map[schema.GroupVersionKind]*libsveltosset.Set
	// List of Classifier instances based on Kubernetes version
	VersionClassifiers libsveltosset.Set
}

ClassifierReconciler reconciles a Classifier object

func (*ClassifierReconciler) Reconcile

func (r *ClassifierReconciler) Reconcile(ctx context.Context, req ctrl.Request) (_ ctrl.Result, reterr error)

func (*ClassifierReconciler) SetupWithManager

func (r *ClassifierReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type EventReportReconciler

type EventReportReconciler struct {
	client.Client
	Scheme *runtime.Scheme
}

EventReportReconciler reconciles a EventReport object

func (*EventReportReconciler) Reconcile

func (r *EventReportReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

func (*EventReportReconciler) SetupWithManager

func (r *EventReportReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type EventSourceReconciler

type EventSourceReconciler struct {
	client.Client
	Scheme *runtime.Scheme

	RunMode          Mode
	ClusterNamespace string
	ClusterName      string
	ClusterType      libsveltosv1alpha1.ClusterType
	// Used to update internal maps and sets
	Mux sync.RWMutex
	// key: GVK, Value: list of EventSources based on that GVK
	GVKEventSources map[schema.GroupVersionKind]*libsveltosset.Set
}

EventSourceReconciler reconciles a EventSource object

func (*EventSourceReconciler) Reconcile

func (r *EventSourceReconciler) Reconcile(ctx context.Context, req ctrl.Request) (_ ctrl.Result, reterr error)

func (*EventSourceReconciler) SetupWithManager

func (r *EventSourceReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type HealthCheckReconciler

type HealthCheckReconciler struct {
	client.Client
	Scheme *runtime.Scheme

	RunMode          Mode
	ClusterNamespace string
	ClusterName      string
	ClusterType      libsveltosv1alpha1.ClusterType
	// Used to update internal maps and sets
	Mux sync.RWMutex
	// key: GVK, Value: list of HealthChecks based on that GVK
	GVKHealthChecks map[schema.GroupVersionKind]*libsveltosset.Set
}

HealthCheckReconciler reconciles a HealthCheck object

func (*HealthCheckReconciler) Reconcile

func (r *HealthCheckReconciler) Reconcile(ctx context.Context, req ctrl.Request) (_ ctrl.Result, reterr error)

func (*HealthCheckReconciler) SetupWithManager

func (r *HealthCheckReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type HealthCheckReportReconciler

type HealthCheckReportReconciler struct {
	client.Client
	Scheme *runtime.Scheme
}

HealthCheckReportReconciler reconciles a HealthCheckReport object

func (*HealthCheckReportReconciler) Reconcile

func (*HealthCheckReportReconciler) SetupWithManager

func (r *HealthCheckReportReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type Mode

type Mode int64
const (
	SendReports Mode = iota
	DoNotSendReports
)

type NodeReconciler

type NodeReconciler struct {
	client.Client
	*rest.Config
	Scheme *runtime.Scheme
	// contains filtered or unexported fields
}

NodeReconciler reconciles a Node object

func (*NodeReconciler) Reconcile

func (r *NodeReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

+kubebuilder:rbac:groups="",resources=nodes,verbs=get;list;watch

func (*NodeReconciler) SetupWithManager

func (r *NodeReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type ReloaderReconciler added in v0.15.0

type ReloaderReconciler struct {
	client.Client
	Scheme *runtime.Scheme

	// Used to update internal maps and sets
	Mux sync.RWMutex
	// key: GVK, Value: list of Reloaders based on that GVK
	// For instance, for a Deployment, this will contain list of Reloaders
	// listing at least one Deployment
	GVKReloaders map[schema.GroupVersionKind]*libsveltosset.Set

	RunMode          Mode
	ClusterNamespace string
	ClusterName      string
	ClusterType      libsveltosv1alpha1.ClusterType
}

ReloaderReconciler reconciles a Reloader object

func (*ReloaderReconciler) Reconcile added in v0.15.0

func (r *ReloaderReconciler) Reconcile(ctx context.Context, req ctrl.Request) (_ ctrl.Result, reterr error)

func (*ReloaderReconciler) SetupWithManager added in v0.15.0

func (r *ReloaderReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

Jump to

Keyboard shortcuts

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