Documentation
¶
Index ¶
- func ClassifierPredicate(logger logr.Logger) predicate.Funcs
- func ClassifierReportPredicate(logger logr.Logger) predicate.Funcs
- func ConfigMapPredicates(logger logr.Logger) predicate.Funcs
- func GetSveltosAgentRegistry() string
- func InitScheme() (*runtime.Scheme, error)
- func RegisterFeatures(d deployer.DeployerInterface, setupLog logr.Logger)
- func SecretPredicates(logger logr.Logger) predicate.Funcs
- func SetAgentInMgmtCluster(isInMgmtCluster bool)
- func SetManagementClusterAccess(config *rest.Config, c client.Client)
- func SetSveltosAgentConfigMap(name string)
- func SetSveltosAgentRegistry(reg string)
- func SetVersion(v string)
- type ClassifierReconciler
- type ClusterReconciler
- type ReportMode
- type SveltosClusterReconciler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClassifierPredicate ¶
ClassifierPredicate predicates for Classifier. ClassifierReconciler watches Classifier events and react to those by reconciling itself based on following predicates
func ClassifierReportPredicate ¶
ClassifierReportPredicate predicates for ClassifierReport. ClassifierReconciler watches ClassifierReport events and react to those by reconciling itself based on following predicates
func ConfigMapPredicates ¶ added in v0.34.0
ConfigMapPredicates predicates for ConfigMap. ClassifierReconciler watches ConfigMap events and react to those by reconciling itself based on following predicates
func GetSveltosAgentRegistry ¶ added in v0.50.0
func GetSveltosAgentRegistry() string
func InitScheme ¶
func RegisterFeatures ¶
func RegisterFeatures(d deployer.DeployerInterface, setupLog logr.Logger)
func SecretPredicates ¶ added in v0.3.0
SecretPredicates predicates for Secret. ClassifierReconciler watches Secret events and react to those by reconciling itself based on following predicates
func SetAgentInMgmtCluster ¶ added in v0.52.0
func SetAgentInMgmtCluster(isInMgmtCluster bool)
func SetManagementClusterAccess ¶ added in v0.18.0
func SetSveltosAgentConfigMap ¶ added in v0.34.0
func SetSveltosAgentConfigMap(name string)
func SetSveltosAgentRegistry ¶ added in v0.50.0
func SetSveltosAgentRegistry(reg string)
func SetVersion ¶ added in v0.22.0
func SetVersion(v string)
Types ¶
type ClassifierReconciler ¶
type ClassifierReconciler struct { client.Client Scheme *runtime.Scheme Deployer deployer.DeployerInterface ConcurrentReconciles int ClassifierReportMode ReportMode AgentInMgmtCluster bool // if true, indicates sveltos-agent needs to be started in the management cluster // Management cluster controlplane endpoint. This is needed when mode is AgentSendReportsNoGateway. // It will be used by classifier-agent to send classifierreports back to management cluster. ControlPlaneEndpoint string ShardKey string // when set, only clusters matching the ShardKey will be reconciled CapiOnboardAnnotation string // when set, only capi clusters with this annotation are considered // use a Mutex to update in-memory structure as MaxConcurrentReconciles is higher than one Mux sync.Mutex // key: Sveltos/CAPI Cluster namespace/name; value: set of all Classifiers deployed int the Cluster // When a Cluster changes, we need to reconcile one or more Classifier (as of now all Classifier // are deployed in all Clusters). In order to do so, Classifier reconciler watches for Sveltos/CAPI Cluster // changes. Inside a MapFunc there should be no I/O (if that fails, there is no way to recover). // So keeps track of Classifier sets deployed in each Sveltos/CAPI Cluster, so that when Sveltos/CAPI Cluster changes // list of Classifiers that need reconciliation is in memory. // Even though currently each Classifier is deployed in each Sveltos/CAPI Cluster, do not simply keep an in-memory // list of all existing Classifier. Rather keep a map per Sveltos/CAPI cluster. If in future, not all Classifiers // are deployed in all clusters, map will come in handy. // key: Sveltos/CAPI Cluster namespace/name; value: set of all ClusterProfiles matching the Cluster ClusterMap map[corev1.ObjectReference]*libsveltosset.Set // key: Classifier; value: set of Sveltos/CAPI Clusters matched ClassifierMap map[corev1.ObjectReference]*libsveltosset.Set // Contains list of all Classifier with at least one conflict ClassifierSet libsveltosset.Set // List of current existing Classifiers AllClassifierSet libsveltosset.Set }
ClassifierReconciler reconciles a Classifier object
func (*ClassifierReconciler) SetupWithManager ¶
func (r *ClassifierReconciler) SetupWithManager(mgr ctrl.Manager) (controller.Controller, error)
SetupWithManager sets up the controller with the Manager.
func (*ClassifierReconciler) WatchForCAPI ¶ added in v0.3.0
func (r *ClassifierReconciler) WatchForCAPI(mgr ctrl.Manager, c controller.Controller) error
type ClusterReconciler ¶
ClusterReconciler reconciles a Cluster object
func (*ClusterReconciler) SetupWithManager ¶
func (r *ClusterReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type ReportMode ¶
type ReportMode int
const ( // Default mode. In this mode, Classifier running // in the management cluster periodically collect // ClassifierReport from Sveltos/CAPI clusters CollectFromManagementCluster ReportMode = iota // In this mode, classifier agent sends ClassifierReport // to management cluster. // SveltosAgent is provided with Kubeconfig to access // management cluster and can only update ClassifierReport/ // HealthCheckReport/EventReport AgentSendReportsNoGateway )
type SveltosClusterReconciler ¶ added in v0.3.0
SveltosClusterReconciler reconciles a SveltosCluster object
func (*SveltosClusterReconciler) SetupWithManager ¶ added in v0.3.0
func (r *SveltosClusterReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.