Documentation ¶
Index ¶
- Constants
- func ClusterSummaryPredicates(logger logr.Logger) predicate.Funcs
- func HealthCheckPredicates(logger logr.Logger) predicate.Funcs
- func HealthCheckReportPredicates(logger logr.Logger) predicate.Funcs
- func InitScheme() (*runtime.Scheme, error)
- func RegisterFeatures(d deployer.DeployerInterface, setupLog logr.Logger)
- func SetManagementRecorder(r record.EventRecorder)
- func SveltosClusterPredicates(logger logr.Logger) predicate.Funcs
- type ClusterHealthCheckReconciler
- func (r *ClusterHealthCheckReconciler) Reconcile(ctx context.Context, req ctrl.Request) (_ ctrl.Result, reterr error)
- func (r *ClusterHealthCheckReconciler) SetupWithManager(mgr ctrl.Manager) (controller.Controller, error)
- func (r *ClusterHealthCheckReconciler) WatchForCAPI(mgr ctrl.Manager, c controller.Controller) error
- type ClusterPredicate
- func (p ClusterPredicate) Create(obj event.TypedCreateEvent[*clusterv1.Cluster]) bool
- func (p ClusterPredicate) Delete(obj event.TypedDeleteEvent[*clusterv1.Cluster]) bool
- func (p ClusterPredicate) Generic(obj event.TypedGenericEvent[*clusterv1.Cluster]) bool
- func (p ClusterPredicate) Update(obj event.TypedUpdateEvent[*clusterv1.Cluster]) bool
- type ClusterReconciler
- type HealthCheckReconciler
- type MachinePredicate
- func (p MachinePredicate) Create(obj event.TypedCreateEvent[*clusterv1.Machine]) bool
- func (p MachinePredicate) Delete(obj event.TypedDeleteEvent[*clusterv1.Machine]) bool
- func (p MachinePredicate) Generic(obj event.TypedGenericEvent[*clusterv1.Machine]) bool
- func (p MachinePredicate) Update(obj event.TypedUpdateEvent[*clusterv1.Machine]) bool
- type ReloaderReportReconciler
- type ReportMode
- type SveltosClusterReconciler
Constants ¶
const (
// Namespace where reports will be generated
ReportNamespace = "projectsveltos"
)
Variables ¶
This section is empty.
Functions ¶
func ClusterSummaryPredicates ¶
ClusterSummaryPredicates predicates for clustersummary. ClusterHealthCheckReconciler watches sveltos ClusterSummary events and react to those by reconciling itself based on following predicates
func HealthCheckPredicates ¶ added in v0.7.0
HealthCheckPredicates predicates for HealthCheck. ClusterHealthCheckReconciler watches sveltos HealthCheck events and react to those by reconciling itself based on following predicates
func HealthCheckReportPredicates ¶ added in v0.7.0
HealthCheckReportPredicates predicates for HealthCheckReport. ClusterHealthCheckReconciler watches sveltos HealthCheckReport events and react to those by reconciling itself based on following predicates
func InitScheme ¶
func RegisterFeatures ¶
func RegisterFeatures(d deployer.DeployerInterface, setupLog logr.Logger)
func SetManagementRecorder ¶
func SetManagementRecorder(r record.EventRecorder)
Types ¶
type ClusterHealthCheckReconciler ¶
type ClusterHealthCheckReconciler struct { client.Client Scheme *runtime.Scheme ConcurrentReconciles int Deployer deployer.DeployerInterface ShardKey string // when set, only clusters matching the ShardKey will be reconciled // use a Mutex to update Map as MaxConcurrentReconciles is higher than one Mux sync.Mutex // key: Sveltos/CAPI Cluster: value: set of all ClusterHealthCheck instances matching the Cluster ClusterMap map[corev1.ObjectReference]*libsveltosset.Set // key: ClusterHealthCheck: value: set of Sveltos/CAPI Clusters matched CHCToClusterMap map[types.NamespacedName]*libsveltosset.Set // key: ClusterHealthCheck; value ClusterHealthCheck Selector ClusterHealthChecks map[corev1.ObjectReference]libsveltosv1beta1.Selector // For each cluster contains current labels // This is needed in following scenario: // - ClusterHealthCheck is created // - Cluster is created with labels matching ClusterHealthCheck // - When first control plane machine in such cluster becomes available // we need Cluster labels to know which ClusterHealthCheck to reconcile ClusterLabels map[corev1.ObjectReference]map[string]string // key: HealthCheck: value: set of all ClusterHealthCheck referencing it HealthCheckMap map[corev1.ObjectReference]*libsveltosset.Set // Key: ClusterHealthCheck: value: set of HealthChecks referenced CHCToHealthCheckMap map[types.NamespacedName]*libsveltosset.Set }
ClusterHealthCheckReconciler reconciles a ClusterHealthCheck object
func (*ClusterHealthCheckReconciler) SetupWithManager ¶
func (r *ClusterHealthCheckReconciler) SetupWithManager(mgr ctrl.Manager) (controller.Controller, error)
SetupWithManager sets up the controller with the Manager.
func (*ClusterHealthCheckReconciler) WatchForCAPI ¶
func (r *ClusterHealthCheckReconciler) WatchForCAPI(mgr ctrl.Manager, c controller.Controller) error
type ClusterPredicate ¶ added in v0.29.0
func (ClusterPredicate) Create ¶ added in v0.29.0
func (p ClusterPredicate) Create(obj event.TypedCreateEvent[*clusterv1.Cluster]) bool
func (ClusterPredicate) Delete ¶ added in v0.29.0
func (p ClusterPredicate) Delete(obj event.TypedDeleteEvent[*clusterv1.Cluster]) bool
func (ClusterPredicate) Generic ¶ added in v0.29.0
func (p ClusterPredicate) Generic(obj event.TypedGenericEvent[*clusterv1.Cluster]) bool
func (ClusterPredicate) Update ¶ added in v0.29.0
func (p ClusterPredicate) Update(obj event.TypedUpdateEvent[*clusterv1.Cluster]) bool
type ClusterReconciler ¶ added in v0.7.0
ClusterReconciler reconciles a Cluster object
func (*ClusterReconciler) SetupWithManager ¶ added in v0.7.0
func (r *ClusterReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type HealthCheckReconciler ¶ added in v0.7.0
type HealthCheckReconciler struct { client.Client Scheme *runtime.Scheme HealthCheckReportMode ReportMode ShardKey string // when set, only clusters matching the ShardKey will be reconciled Version string }
HealthCheckReconciler reconciles a HealthCheck object
func (*HealthCheckReconciler) Reconcile ¶ added in v0.7.0
func (r *HealthCheckReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
+kubebuilder:rbac:groups=lib.projectsveltos.io,resources=healthchecks,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=lib.projectsveltos.io,resources=healthchecks/status,verbs=get;update;patch +kubebuilder:rbac:groups=lib.projectsveltos.io,resources=healthchecks/finalizers,verbs=update
func (*HealthCheckReconciler) SetupWithManager ¶ added in v0.7.0
func (r *HealthCheckReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type MachinePredicate ¶ added in v0.29.0
func (MachinePredicate) Create ¶ added in v0.29.0
func (p MachinePredicate) Create(obj event.TypedCreateEvent[*clusterv1.Machine]) bool
func (MachinePredicate) Delete ¶ added in v0.29.0
func (p MachinePredicate) Delete(obj event.TypedDeleteEvent[*clusterv1.Machine]) bool
func (MachinePredicate) Generic ¶ added in v0.29.0
func (p MachinePredicate) Generic(obj event.TypedGenericEvent[*clusterv1.Machine]) bool
func (MachinePredicate) Update ¶ added in v0.29.0
func (p MachinePredicate) Update(obj event.TypedUpdateEvent[*clusterv1.Machine]) bool
type ReloaderReportReconciler ¶ added in v0.15.0
type ReloaderReportReconciler struct { client.Client Scheme *runtime.Scheme ReloaderReportMode ReportMode ShardKey string // when set, only clusters matching the ShardKey will be reconciled Version string }
ReloaderReportReconciler reconciles a ReloaderReport object
func (*ReloaderReportReconciler) SetupWithManager ¶ added in v0.15.0
func (r *ReloaderReportReconciler) SetupWithManager(mgr ctrl.Manager, collectionInterval int) error
SetupWithManager sets up the controller with the Manager.
type ReportMode ¶ added in v0.7.0
type ReportMode int
const ( // Default mode. In this mode, healthCheckManager running // in the management cluster periodically collects // HealthCheckReport from Sveltos/CAPI clusters CollectFromManagementCluster ReportMode = iota // In this mode, sveltos agent sends HealthCheckReport // to management cluster. // SveltosAgent is provided with Kubeconfig to access // management cluster and can only update HealthCheckReport (and ClassifierReport) AgentSendReportsNoGateway )
type SveltosClusterReconciler ¶ added in v0.7.0
SveltosClusterReconciler reconciles a SveltosCluster object
func (*SveltosClusterReconciler) SetupWithManager ¶ added in v0.7.0
func (r *SveltosClusterReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
Source Files ¶
- cluster_controller.go
- clusterhealthcheck_controller.go
- clusterhealthcheck_deployer.go
- clusterhealthcheck_features.go
- clusterhealthcheck_predicates.go
- clusterhealthcheck_transformations.go
- healthcheck_controller.go
- healthcheckreport_collection.go
- liveness.go
- metrics.go
- notification.go
- recorder.go
- reloaderreport_collection.go
- reloaderreport_controller.go
- sveltoscluster_controller.go
- utils.go