Documentation
¶
Index ¶
- Variables
- func ConfigMapPredicates(logger logr.Logger) predicate.Funcs
- func InitScheme() (*runtime.Scheme, error)
- func Initialization(ctx context.Context, config *rest.Config, scheme *runtime.Scheme, ...)
- func RegisterFeatures(d deployer.DeployerInterface, setupLog logr.Logger)
- func RunHelmChartUpdateChecker(ctx context.Context, c client.Client, interval time.Duration, ...)
- func SecretPredicates(logger logr.Logger) predicate.Funcs
- func SetAgentInMgmtCluster(isInMgmtCluster bool)
- func SetCAPIOnboardAnnotation(key string)
- func SetClusterPromotionReconciler(...)
- func SetDriftDetectionRegistry(reg string)
- func SetDriftdetectionConfigMap(name string)
- func SetLuaCallStackSize(callStackSize int)
- func SetLuaConfigMap(name string)
- func SetLuaRegistrySize(registrySize int)
- func SetManagementClusterAccess(c client.Client, config *rest.Config, dc *discovery.DiscoveryClient)
- func SetPredicates(logger logr.Logger) predicate.Funcs
- func SetSveltosNamespace(namespace string)
- type ClusterProfileReconciler
- func (r *ClusterProfileReconciler) GetController() controller.Controller
- func (r *ClusterProfileReconciler) Reconcile(ctx context.Context, req ctrl.Request) (_ ctrl.Result, reterr error)
- func (r *ClusterProfileReconciler) SetupWithManager(mgr ctrl.Manager) error
- func (r *ClusterProfileReconciler) WatchForCAPI(mgr ctrl.Manager, c controller.Controller) error
- type ClusterPromotionCopiesSweeper
- type ClusterPromotionEnterpriseDeps
- type ClusterPromotionReconciler
- type ClusterSetReconciler
- func (r *ClusterSetReconciler) GetController() controller.Controller
- func (r *ClusterSetReconciler) Reconcile(ctx context.Context, req ctrl.Request) (_ ctrl.Result, reterr error)
- func (r *ClusterSetReconciler) SetupWithManager(mgr ctrl.Manager) error
- func (r *ClusterSetReconciler) WatchForCAPI(mgr ctrl.Manager, c controller.Controller) error
- type ClusterSummaryDeletedError
- type ClusterSummaryPredicate
- type ClusterSummaryReconciler
- func (r *ClusterSummaryReconciler) GetController() controller.Controller
- func (r *ClusterSummaryReconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, reterr error)
- func (r *ClusterSummaryReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager) error
- func (r *ClusterSummaryReconciler) WatchForCAPI(mgr ctrl.Manager, c controller.Controller) error
- func (r *ClusterSummaryReconciler) WatchForFlux(mgr ctrl.Manager, c controller.Controller) error
- type DependenciesHashChangedPredicate
- type FluxBucketPredicate
- func (p FluxBucketPredicate) Create(obj event.TypedCreateEvent[*sourcev1.Bucket]) bool
- func (p FluxBucketPredicate) Delete(obj event.TypedDeleteEvent[*sourcev1.Bucket]) bool
- func (p FluxBucketPredicate) Generic(obj event.TypedGenericEvent[*sourcev1.Bucket]) bool
- func (p FluxBucketPredicate) Update(obj event.TypedUpdateEvent[*sourcev1.Bucket]) bool
- type FluxGitRepositoryPredicate
- func (p FluxGitRepositoryPredicate) Create(obj event.TypedCreateEvent[*sourcev1.GitRepository]) bool
- func (p FluxGitRepositoryPredicate) Delete(obj event.TypedDeleteEvent[*sourcev1.GitRepository]) bool
- func (p FluxGitRepositoryPredicate) Generic(obj event.TypedGenericEvent[*sourcev1.GitRepository]) bool
- func (p FluxGitRepositoryPredicate) Update(obj event.TypedUpdateEvent[*sourcev1.GitRepository]) bool
- type FluxOCIRepositoryPredicate
- func (p FluxOCIRepositoryPredicate) Create(obj event.TypedCreateEvent[*sourcev1.OCIRepository]) bool
- func (p FluxOCIRepositoryPredicate) Delete(obj event.TypedDeleteEvent[*sourcev1.OCIRepository]) bool
- func (p FluxOCIRepositoryPredicate) Generic(obj event.TypedGenericEvent[*sourcev1.OCIRepository]) bool
- func (p FluxOCIRepositoryPredicate) Update(obj event.TypedUpdateEvent[*sourcev1.OCIRepository]) bool
- type LicenseManager
- func (m *LicenseManager) AddCluster(cluster *libsveltosv1beta1.SveltosCluster)
- func (m *LicenseManager) AddClusterPromotion(clusterpromotion *configv1beta1.ClusterPromotion)
- func (m *LicenseManager) IsClusterInTopX(namespace, name string, x int) bool
- func (m *LicenseManager) IsClusterPromotionInTopX(namespace, name string, x int) bool
- func (m *LicenseManager) RemoveCluster(namespace, name string)
- func (m *LicenseManager) RemoveClusterPromotion(namespace, name string)
- type ProfileReconciler
- func (r *ProfileReconciler) GetController() controller.Controller
- func (r *ProfileReconciler) Reconcile(ctx context.Context, req ctrl.Request) (_ ctrl.Result, reterr error)
- func (r *ProfileReconciler) SetupWithManager(mgr ctrl.Manager) error
- func (r *ProfileReconciler) WatchForCAPI(mgr ctrl.Manager, c controller.Controller) error
- type ReportMode
- type SetReconciler
- func (r *SetReconciler) GetController() controller.Controller
- func (r *SetReconciler) Reconcile(ctx context.Context, req ctrl.Request) (_ ctrl.Result, reterr error)
- func (r *SetReconciler) SetupWithManager(mgr ctrl.Manager) error
- func (r *SetReconciler) WatchForCAPI(mgr ctrl.Manager, c controller.Controller) error
- type SortedHelmCharts
- type SortedKustomizationRefs
- type SortedPatches
- type SortedPolicyRefs
- type SortedTemplateResourceRefs
- type SortedValidateHealths
- type SortedValueFroms
- type SveltosClusterReconciler
Constants ¶
This section is empty.
Variables ¶
var ( CreateFuncTrue = func(e event.CreateEvent, logger logr.Logger) bool { log := logger.WithValues("predicate", "createEvent", e.Object.GetObjectKind(), e.Object.GetName(), ) log.V(logs.LogVerbose).Info(fmt.Sprintf( "%s did match expected conditions. Will attempt to reconcile associated ClusterSummaries.", e.Object.GetObjectKind())) return true } DeleteFuncTrue = func(e event.DeleteEvent, logger logr.Logger) bool { log := logger.WithValues("predicate", "deleteEvent", e.Object.GetObjectKind(), e.Object.GetName(), ) log.V(logs.LogVerbose).Info(fmt.Sprintf( "%s did match expected conditions. Will attempt to reconcile associated ClusterSummaries.", e.Object.GetObjectKind())) return true } GenericFuncFalse = func(e event.GenericEvent, logger logr.Logger) bool { log := logger.WithValues("predicate", "genericEvent", e.Object.GetObjectKind(), e.Object.GetName(), ) log.V(logs.LogVerbose).Info(fmt.Sprintf( "%s did not match expected conditions. Will not attempt to reconcile associated ClusterSummaries.", e.Object.GetObjectKind())) return false } )
Functions ¶
func ConfigMapPredicates ¶
ConfigMapPredicates predicates for ConfigMaps. ClusterSummaryReconciler watches ConfigMap events and react to those by reconciling itself based on following predicates
func InitScheme ¶
func Initialization ¶ added in v1.5.0
func RegisterFeatures ¶
func RegisterFeatures(d deployer.DeployerInterface, setupLog logr.Logger)
func RunHelmChartUpdateChecker ¶ added in v1.13.0
func RunHelmChartUpdateChecker(ctx context.Context, c client.Client, interval time.Duration, logger logr.Logger)
RunHelmChartUpdateChecker runs checkOutdatedHelmCharts once immediately, then on every tick of interval, until ctx is done. Only ever started for the default (unsharded) addon-controller deployment: see the shardKey == "" gate in cmd/main.go.
func SecretPredicates ¶
SecretPredicates predicates for Secrets. ClusterSummaryReconciler 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 SetCAPIOnboardAnnotation ¶ added in v0.49.0
func SetCAPIOnboardAnnotation(key string)
func SetClusterPromotionReconciler ¶ added in v1.14.0
func SetClusterPromotionReconciler(fn func(ctx context.Context, deps ClusterPromotionEnterpriseDeps, promotionScope *scope.ClusterPromotionScope, isInFreeTopX bool, logger logr.Logger) reconcile.Result)
SetClusterPromotionReconciler overrides the ClusterPromotion stage-advancement implementation. Called by a Sveltos Enterprise build's composition root before starting the manager.
func SetDriftDetectionRegistry ¶ added in v0.50.0
func SetDriftDetectionRegistry(reg string)
func SetDriftdetectionConfigMap ¶ added in v0.34.0
func SetDriftdetectionConfigMap(name string)
func SetLuaCallStackSize ¶ added in v1.2.1
func SetLuaCallStackSize(callStackSize int)
func SetLuaConfigMap ¶ added in v0.46.0
func SetLuaConfigMap(name string)
func SetLuaRegistrySize ¶ added in v1.2.1
func SetLuaRegistrySize(registrySize int)
func SetPredicates ¶ added in v0.26.0
SetPredicates predicates for ClusterSet/Set. ClusterProfileReconciler watches ClusterSet/Set events and react to those by reconciling itself based on following predicates
func SetSveltosNamespace ¶ added in v1.11.0
func SetSveltosNamespace(namespace string)
Types ¶
type ClusterProfileReconciler ¶
type ClusterProfileReconciler struct {
client.Client
Scheme *runtime.Scheme
ConcurrentReconciles int
Logger logr.Logger
// use a Mutex to update Map as MaxConcurrentReconciles is higher than one
Mux sync.Mutex
// key: ClusterSet: value ClusterProfiles currently referencing the ClusterSet
ClusterSetMap map[corev1.ObjectReference]*libsveltosset.Set
// key: Sveltos/Cluster; value: set of all ClusterProfiles matching the Cluster
ClusterMap map[corev1.ObjectReference]*libsveltosset.Set
// key: ClusterProfile; value ClusterProfile Selector
ClusterProfiles map[corev1.ObjectReference]libsveltosv1beta1.Selector
// For each cluster contains current labels
// This is needed in following scenario:
// - ClusterProfile is created
// - Cluster is created with labels matching ClusterProfile
// - When first control plane machine in such cluster becomes available
// we need Cluster labels to know which ClusterProfile to reconcile
ClusterLabels map[corev1.ObjectReference]map[string]string
// contains filtered or unexported fields
}
ClusterProfileReconciler reconciles a ClusterProfile object
func (*ClusterProfileReconciler) GetController ¶ added in v0.26.0
func (r *ClusterProfileReconciler) GetController() controller.Controller
func (*ClusterProfileReconciler) SetupWithManager ¶
func (r *ClusterProfileReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
func (*ClusterProfileReconciler) WatchForCAPI ¶
func (r *ClusterProfileReconciler) WatchForCAPI(mgr ctrl.Manager, c controller.Controller) error
type ClusterPromotionCopiesSweeper ¶ added in v1.16.0
type ClusterPromotionCopiesSweeper struct {
client.Client
Interval time.Duration
GracePeriod time.Duration
Logger logr.Logger
}
ClusterPromotionCopiesSweeper periodically removes the ConfigMaps/Secrets ClusterPromotion created for a stage when they are not needed anymore: the ClusterProfile they were created for is gone, or does not reference them anymore. It is a safety net. Normally they are removed by the Kubernetes garbage collector when the ClusterPromotion is deleted, and by ClusterPromotion itself when it stops referencing them. It does not rely on the ClusterPromotion still existing.
func NewClusterPromotionCopiesSweeper ¶ added in v1.16.0
func NewClusterPromotionCopiesSweeper(c client.Client, logger logr.Logger) *ClusterPromotionCopiesSweeper
NewClusterPromotionCopiesSweeper returns a sweeper using the default interval and grace period
type ClusterPromotionEnterpriseDeps ¶ added in v1.14.0
type ClusterPromotionEnterpriseDeps struct {
Client client.Client
Config *rest.Config
Scheme *runtime.Scheme
EventRecorder events.EventRecorder
SveltosNamespace string
}
ClusterPromotionEnterpriseDeps bundles what the Sveltos Enterprise ClusterPromotion implementation needs.
type ClusterPromotionReconciler ¶ added in v1.2.0
type ClusterPromotionReconciler struct {
client.Client
Config *rest.Config
Scheme *runtime.Scheme
ConcurrentReconciles int
PolicyMux sync.Mutex // use a Mutex to update ReferenceMap as MaxConcurrentReconciles is higher than one
ReferenceMap map[corev1.ObjectReference]*libsveltosset.Set // key: Referenced object; value: set of all ClusterPromotions referencing the resource
// contains filtered or unexported fields
}
ClusterPromotionReconciler reconciles a ClusterPromotion object
func (*ClusterPromotionReconciler) SetupWithManager ¶ added in v1.2.0
func (r *ClusterPromotionReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type ClusterSetReconciler ¶ added in v0.26.0
type ClusterSetReconciler struct {
client.Client
Scheme *runtime.Scheme
ConcurrentReconciles int
Logger logr.Logger
// use a Mutex to update Map as MaxConcurrentReconciles is higher than one
Mux sync.Mutex
// key: Sveltos/Cluster; value: set of all ClusterSets matching the Cluster
ClusterMap map[corev1.ObjectReference]*libsveltosset.Set
// key: ClusterSet; value: set of Sveltos/CAPI Clusters matched
ClusterSetMap map[corev1.ObjectReference]*libsveltosset.Set
// key: ClusterSets; value ClusterSet Selector
ClusterSets map[corev1.ObjectReference]libsveltosv1beta1.Selector
// For each cluster contains current labels
// This is needed in following scenario:
// - ClusterSet is created
// - Cluster is created with labels matching ClusterSet
// - When first control plane machine in such cluster becomes available
// we need Cluster labels to know which ClusterSet to reconcile
ClusterLabels map[corev1.ObjectReference]map[string]string
// contains filtered or unexported fields
}
ClusterSetReconciler reconciles a ClusterSet object
func (*ClusterSetReconciler) GetController ¶ added in v0.26.0
func (r *ClusterSetReconciler) GetController() controller.Controller
func (*ClusterSetReconciler) SetupWithManager ¶ added in v0.26.0
func (r *ClusterSetReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
func (*ClusterSetReconciler) WatchForCAPI ¶ added in v0.26.0
func (r *ClusterSetReconciler) WatchForCAPI(mgr ctrl.Manager, c controller.Controller) error
type ClusterSummaryDeletedError ¶ added in v1.1.0
type ClusterSummaryDeletedError struct {
Message string
}
func (*ClusterSummaryDeletedError) Error ¶ added in v1.1.0
func (r *ClusterSummaryDeletedError) Error() string
type ClusterSummaryPredicate ¶ added in v1.0.0
ClusterSummaryStatusPredicate is a custom predicate that filters ClusterSummary s events
func (ClusterSummaryPredicate) Create ¶ added in v1.0.0
func (p ClusterSummaryPredicate) Create(e event.CreateEvent) bool
func (ClusterSummaryPredicate) Delete ¶ added in v1.0.0
func (p ClusterSummaryPredicate) Delete(e event.DeleteEvent) bool
func (ClusterSummaryPredicate) Generic ¶ added in v1.0.0
func (p ClusterSummaryPredicate) Generic(e event.GenericEvent) bool
func (ClusterSummaryPredicate) Update ¶ added in v1.0.0
func (p ClusterSummaryPredicate) Update(e event.UpdateEvent) bool
type ClusterSummaryReconciler ¶
type ClusterSummaryReconciler struct {
*rest.Config
client.Client
Scheme *runtime.Scheme
Logger logr.Logger
ReportMode ReportMode
ShardKey string // when set, only clusters matching the ShardKey will be reconciled
Version string
Deployer deployer.DeployerInterface
ConcurrentReconciles int
PolicyMux sync.Mutex // use a Mutex to update Map as MaxConcurrentReconciles is higher than one
ReferenceMap map[corev1.ObjectReference]*libsveltosset.Set // key: Referenced object; value: set of all ClusterSummaries referencing the resource
ClusterMap map[corev1.ObjectReference]*libsveltosset.Set // key: Sveltos/Cluster; value: set of all ClusterSummaries for that Cluster
ConflictRetryTime time.Duration
HealthErrorRetryTime time.Duration
DeletedInstances map[types.NamespacedName]time.Time
NextReconcileTimes map[types.NamespacedName]reconcileCooldown // in-memory cooldown, survives status-patch conflicts
// contains filtered or unexported fields
}
ClusterSummaryReconciler reconciles a ClusterSummary object
func (*ClusterSummaryReconciler) GetController ¶ added in v0.26.0
func (r *ClusterSummaryReconciler) GetController() controller.Controller
func (*ClusterSummaryReconciler) SetupWithManager ¶
SetupWithManager sets up the controller with the Manager.
func (*ClusterSummaryReconciler) WatchForCAPI ¶
func (r *ClusterSummaryReconciler) WatchForCAPI(mgr ctrl.Manager, c controller.Controller) error
func (*ClusterSummaryReconciler) WatchForFlux ¶
func (r *ClusterSummaryReconciler) WatchForFlux(mgr ctrl.Manager, c controller.Controller) error
type DependenciesHashChangedPredicate ¶ added in v1.2.0
DependenciesHashChangedPredicate implements a default update predicate function that triggers reconciliation only when the DependenciesHash in the Status changes.
func (DependenciesHashChangedPredicate) Update ¶ added in v1.2.0
func (DependenciesHashChangedPredicate) Update(e event.UpdateEvent) bool
Update implements default UpdateEvent filter for validating DependenciesHash change.
type FluxBucketPredicate ¶ added in v0.29.0
func (FluxBucketPredicate) Create ¶ added in v0.29.0
func (p FluxBucketPredicate) Create(obj event.TypedCreateEvent[*sourcev1.Bucket]) bool
func (FluxBucketPredicate) Delete ¶ added in v0.29.0
func (p FluxBucketPredicate) Delete(obj event.TypedDeleteEvent[*sourcev1.Bucket]) bool
func (FluxBucketPredicate) Generic ¶ added in v0.29.0
func (p FluxBucketPredicate) Generic(obj event.TypedGenericEvent[*sourcev1.Bucket]) bool
func (FluxBucketPredicate) Update ¶ added in v0.29.0
func (p FluxBucketPredicate) Update(obj event.TypedUpdateEvent[*sourcev1.Bucket]) bool
type FluxGitRepositoryPredicate ¶ added in v0.29.0
func (FluxGitRepositoryPredicate) Create ¶ added in v0.29.0
func (p FluxGitRepositoryPredicate) Create(obj event.TypedCreateEvent[*sourcev1.GitRepository]) bool
func (FluxGitRepositoryPredicate) Delete ¶ added in v0.29.0
func (p FluxGitRepositoryPredicate) Delete(obj event.TypedDeleteEvent[*sourcev1.GitRepository]) bool
func (FluxGitRepositoryPredicate) Generic ¶ added in v0.29.0
func (p FluxGitRepositoryPredicate) Generic(obj event.TypedGenericEvent[*sourcev1.GitRepository]) bool
func (FluxGitRepositoryPredicate) Update ¶ added in v0.29.0
func (p FluxGitRepositoryPredicate) Update(obj event.TypedUpdateEvent[*sourcev1.GitRepository]) bool
type FluxOCIRepositoryPredicate ¶ added in v0.29.0
func (FluxOCIRepositoryPredicate) Create ¶ added in v0.29.0
func (p FluxOCIRepositoryPredicate) Create(obj event.TypedCreateEvent[*sourcev1.OCIRepository]) bool
func (FluxOCIRepositoryPredicate) Delete ¶ added in v0.29.0
func (p FluxOCIRepositoryPredicate) Delete(obj event.TypedDeleteEvent[*sourcev1.OCIRepository]) bool
func (FluxOCIRepositoryPredicate) Generic ¶ added in v0.29.0
func (p FluxOCIRepositoryPredicate) Generic(obj event.TypedGenericEvent[*sourcev1.OCIRepository]) bool
func (FluxOCIRepositoryPredicate) Update ¶ added in v0.29.0
func (p FluxOCIRepositoryPredicate) Update(obj event.TypedUpdateEvent[*sourcev1.OCIRepository]) bool
type LicenseManager ¶ added in v1.2.0
type LicenseManager struct {
// contains filtered or unexported fields
}
The LicenseManager is responsible for tracking two specific resource types: -SveltosCluster instances operating in Pull Mode. - ClusterPromotion instances. It is important to note that the order in which these resources are processed may change if the Add-on Controller restarts. However, if the count of either SveltosClusters in Pull Mode or unlicensed ClusterPromotions exceeds the allowed limit (X), the configuration is considered invalid.
func GetLicenseManager ¶ added in v1.2.0
func GetLicenseManager() *LicenseManager
func NewLicenseManager ¶ added in v1.2.0
func NewLicenseManager() *LicenseManager
NewLicenseManager creates and returns a new initialized LicenseManager.
func (*LicenseManager) AddCluster ¶ added in v1.2.0
func (m *LicenseManager) AddCluster(cluster *libsveltosv1beta1.SveltosCluster)
AddCluster adds a SveltosCluster to the manager's collection. It ensures that the cluster is not added if it already exists (based on Name and Namespace). This method is thread-safe.
func (*LicenseManager) AddClusterPromotion ¶ added in v1.2.0
func (m *LicenseManager) AddClusterPromotion(clusterpromotion *configv1beta1.ClusterPromotion)
AddClusterPromotion adds a ClusterPromotion to the manager's collection. It ensures that the clusterPromotion is not added if it already exists (based on Name and Namespace). This method is thread-safe.
func (*LicenseManager) IsClusterInTopX ¶ added in v1.2.0
func (m *LicenseManager) IsClusterInTopX(namespace, name string, x int) bool
IsInTopX checks if a SveltosCluster, identified by its name and namespace, is among the first 'x' registered clusters in the manager's collection. This method is thread-safe.
func (*LicenseManager) IsClusterPromotionInTopX ¶ added in v1.2.0
func (m *LicenseManager) IsClusterPromotionInTopX(namespace, name string, x int) bool
IsClusterPromotionInTopX checks if a ClusterPromotion, identified by its name and namespace, is among the first 'x' registered clusterPromotions in the manager's collection. This method is thread-safe.
func (*LicenseManager) RemoveCluster ¶ added in v1.2.0
func (m *LicenseManager) RemoveCluster(namespace, name string)
RemoveCluster removes a SveltosCluster from the manager's collection identified by its name and namespace. This method is thread-safe.
func (*LicenseManager) RemoveClusterPromotion ¶ added in v1.2.0
func (m *LicenseManager) RemoveClusterPromotion(namespace, name string)
RemoveClusterPromotion removes a ClusterPromotion from the manager's collection identified by its name and namespace. This method is thread-safe.
type ProfileReconciler ¶ added in v0.21.0
type ProfileReconciler struct {
client.Client
Scheme *runtime.Scheme
ConcurrentReconciles int
Logger logr.Logger
// use a Mutex to update Map as MaxConcurrentReconciles is higher than one
Mux sync.Mutex
// key: Set; value: set of Profiles currently referencing the Set
SetMap map[corev1.ObjectReference]*libsveltosset.Set
// key: Sveltos/Cluster; value: set of all Profiles matching the Cluster
ClusterMap map[corev1.ObjectReference]*libsveltosset.Set
// key: Profile; value Profile Selector
Profiles map[corev1.ObjectReference]libsveltosv1beta1.Selector
// For each cluster contains current labels
// This is needed in following scenario:
// - Profile is created
// - Cluster is created with labels matching Profile
// - When first control plane machine in such cluster becomes available
// we need Cluster labels to know which Profile to reconcile
ClusterLabels map[corev1.ObjectReference]map[string]string
// contains filtered or unexported fields
}
ProfileReconciler reconciles a Profile object
func (*ProfileReconciler) GetController ¶ added in v0.26.0
func (r *ProfileReconciler) GetController() controller.Controller
func (*ProfileReconciler) SetupWithManager ¶ added in v0.21.0
func (r *ProfileReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
func (*ProfileReconciler) WatchForCAPI ¶ added in v0.21.0
func (r *ProfileReconciler) WatchForCAPI(mgr ctrl.Manager, c controller.Controller) error
type ReportMode ¶
type ReportMode int
const ( // Default mode. In this mode, addon-controller running // in the management cluster periodically collects/processes // ResourceSummaries from Sveltos/CAPI Clusters CollectFromManagementCluster ReportMode = iota // In this mode, drift detection manager sends ResourceSummaries // updates to management cluster. AgentSendUpdatesNoGateway )
type SetReconciler ¶ added in v0.26.0
type SetReconciler struct {
client.Client
Scheme *runtime.Scheme
ConcurrentReconciles int
Logger logr.Logger
// use a Mutex to update Map as MaxConcurrentReconciles is higher than one
Mux sync.Mutex
// key: Sveltos/Cluster; value: set of all Sets matching the Cluster
ClusterMap map[corev1.ObjectReference]*libsveltosset.Set
// key: Set; value: set of Sveltos/CAPI Clusters matched
SetMap map[corev1.ObjectReference]*libsveltosset.Set
// key: Sets; value Set Selector
Sets map[corev1.ObjectReference]libsveltosv1beta1.Selector
// For each cluster contains current labels
// This is needed in following scenario:
// - Set is created
// - Cluster is created with labels matching Set
// - When first control plane machine in such cluster becomes available
// we need Cluster labels to know which Set to reconcile
ClusterLabels map[corev1.ObjectReference]map[string]string
// contains filtered or unexported fields
}
SetReconciler reconciles a Set object
func (*SetReconciler) GetController ¶ added in v0.26.0
func (r *SetReconciler) GetController() controller.Controller
func (*SetReconciler) SetupWithManager ¶ added in v0.26.0
func (r *SetReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
func (*SetReconciler) WatchForCAPI ¶ added in v0.26.0
func (r *SetReconciler) WatchForCAPI(mgr ctrl.Manager, c controller.Controller) error
type SortedHelmCharts ¶ added in v0.48.1
type SortedHelmCharts []configv1beta1.HelmChart
func (SortedHelmCharts) Len ¶ added in v0.48.1
func (a SortedHelmCharts) Len() int
func (SortedHelmCharts) Less ¶ added in v0.48.1
func (a SortedHelmCharts) Less(i, j int) bool
func (SortedHelmCharts) Swap ¶ added in v0.48.1
func (a SortedHelmCharts) Swap(i, j int)
type SortedKustomizationRefs ¶ added in v0.48.1
type SortedKustomizationRefs []configv1beta1.KustomizationRef
func (SortedKustomizationRefs) Len ¶ added in v0.48.1
func (a SortedKustomizationRefs) Len() int
func (SortedKustomizationRefs) Less ¶ added in v0.48.1
func (a SortedKustomizationRefs) Less(i, j int) bool
func (SortedKustomizationRefs) Swap ¶ added in v0.48.1
func (a SortedKustomizationRefs) Swap(i, j int)
type SortedPatches ¶ added in v1.2.0
type SortedPatches []libsveltosv1beta1.Patch
func (SortedPatches) Len ¶ added in v1.2.0
func (a SortedPatches) Len() int
func (SortedPatches) Less ¶ added in v1.2.0
func (a SortedPatches) Less(i, j int) bool
func (SortedPatches) Swap ¶ added in v1.2.0
func (a SortedPatches) Swap(i, j int)
type SortedPolicyRefs ¶ added in v1.2.0
type SortedPolicyRefs []configv1beta1.PolicyRef
func (SortedPolicyRefs) Len ¶ added in v1.2.0
func (a SortedPolicyRefs) Len() int
func (SortedPolicyRefs) Less ¶ added in v1.2.0
func (a SortedPolicyRefs) Less(i, j int) bool
func (SortedPolicyRefs) Swap ¶ added in v1.2.0
func (a SortedPolicyRefs) Swap(i, j int)
type SortedTemplateResourceRefs ¶ added in v1.2.0
type SortedTemplateResourceRefs []configv1beta1.TemplateResourceRef
func (SortedTemplateResourceRefs) Len ¶ added in v1.2.0
func (a SortedTemplateResourceRefs) Len() int
func (SortedTemplateResourceRefs) Less ¶ added in v1.2.0
func (a SortedTemplateResourceRefs) Less(i, j int) bool
func (SortedTemplateResourceRefs) Swap ¶ added in v1.2.0
func (a SortedTemplateResourceRefs) Swap(i, j int)
type SortedValidateHealths ¶ added in v1.2.0
type SortedValidateHealths []libsveltosv1beta1.ValidateHealth
func (SortedValidateHealths) Len ¶ added in v1.2.0
func (a SortedValidateHealths) Len() int
func (SortedValidateHealths) Less ¶ added in v1.2.0
func (a SortedValidateHealths) Less(i, j int) bool
func (SortedValidateHealths) Swap ¶ added in v1.2.0
func (a SortedValidateHealths) Swap(i, j int)
type SortedValueFroms ¶ added in v1.11.0
type SortedValueFroms []configv1beta1.ValueFrom
func (SortedValueFroms) Len ¶ added in v1.11.0
func (a SortedValueFroms) Len() int
func (SortedValueFroms) Less ¶ added in v1.11.0
func (a SortedValueFroms) Less(i, j int) bool
func (SortedValueFroms) Swap ¶ added in v1.11.0
func (a SortedValueFroms) Swap(i, j int)
type SveltosClusterReconciler ¶ added in v1.0.0
SveltosClusterReconciler reconciles a SveltosCluster object
func (*SveltosClusterReconciler) SetupWithManager ¶ added in v1.0.0
func (r *SveltosClusterReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
Source Files
¶
- clusterprofile_controller.go
- clusterprofile_predicates.go
- clusterprofile_transformations.go
- clusterpromotion_controller.go
- clusterpromotion_copies_sweeper.go
- clusterpromotion_default.go
- clusterpromotion_transformations.go
- clusterset_controller.go
- clusterset_transformations.go
- clustersummary_controller.go
- clustersummary_deployer.go
- clustersummary_features.go
- clustersummary_predicates.go
- clustersummary_transformations.go
- clustersummary_transition.go
- clustersummary_watchers.go
- conflicts.go
- delete_checks.go
- deployment_context.go
- drift_detection_upgrade.go
- flux_source.go
- handlers_helm.go
- handlers_kustomize.go
- handlers_resources.go
- handlers_utils.go
- helmchart_outdated_check.go
- helmchart_semver.go
- helmchart_version_source.go
- init_container_work.go
- license_manager.go
- lua_instantiation.go
- management_cluster.go
- metrics.go
- profile_controller.go
- profile_transformation_common.go
- profile_transformations.go
- profile_utils.go
- resourcesummary.go
- resourcesummary_collection.go
- rest_getter.go
- set_controller.go
- set_transformations.go
- set_utils.go
- sort.go
- source_integrity.go
- sveltoscluster_controller.go
- template_instantiation.go
- templateresourcedef_utils.go
- url_source.go
- utils.go