Documentation ¶
Index ¶
- Constants
- func ClusterPredicates(logger logr.Logger) predicate.Funcs
- 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 MachinePredicates(logger logr.Logger) predicate.Funcs
- 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 ClusterReconciler
- type HealthCheckReconciler
- type ReloaderReportReconciler
- type ReportMode
- type SveltosClusterReconciler
Constants ¶
const (
// Namespace where reports will be generated
ReportNamespace = "projectsveltos"
)
Variables ¶
This section is empty.
Functions ¶
func ClusterPredicates ¶
ClusterPredicates predicates for v1Cluster. ClusterHealthCheckReconciler watches v1Cluster events and react to those by reconciling itself based on following predicates
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 MachinePredicates ¶
MachinePredicates predicates for v1Machine. ClusterHealthCheckReconciler watches v1Machine events and react to those by reconciling itself based on following predicates
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 // 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]libsveltosv1alpha1.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 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 }
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 ReloaderReportReconciler ¶ added in v0.15.0
type ReloaderReportReconciler struct { client.Client Scheme *runtime.Scheme ReloaderReportMode ReportMode }
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