Documentation
¶
Index ¶
- Variables
- func ConfigMapPredicates(logger logr.Logger) predicate.Funcs
- func IfNewDeletedOrSpecChange(logger logr.Logger) predicate.Funcs
- func InitScheme() (*runtime.Scheme, error)
- func RegisterFeatures(d deployer.DeployerInterface, setupLog logr.Logger)
- func SecretPredicates(logger logr.Logger) predicate.Funcs
- func SveltosClusterPredicates(logger logr.Logger) predicate.Funcs
- type AccessRequestReconciler
- 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 RoleRequestReconciler
- func (r *RoleRequestReconciler) Reconcile(ctx context.Context, req ctrl.Request) (_ ctrl.Result, reterr error)
- func (r *RoleRequestReconciler) SetupWithManager(mgr ctrl.Manager) (controller.Controller, error)
- func (r *RoleRequestReconciler) WatchForCAPI(mgr ctrl.Manager, c controller.Controller) error
Constants ¶
This section is empty.
Variables ¶
View Source
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 RoleRequests.", 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 RoleRequests.", 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 RoleRequests.", e.Object.GetObjectKind())) return false } )
Functions ¶
func ConfigMapPredicates ¶ added in v0.4.0
ConfigMapPredicates predicates for ConfigMaps. ClusterSummaryReconciler watches ConfigMap events and react to those by reconciling itself based on following predicates
func IfNewDeletedOrSpecChange ¶
IfNewDeletedOrSpecChange returns a predicate that returns true only if Spec changes or object is new/deleted
func InitScheme ¶
func RegisterFeatures ¶ added in v0.4.0
func RegisterFeatures(d deployer.DeployerInterface, setupLog logr.Logger)
func SecretPredicates ¶ added in v0.4.0
SecretPredicates predicates for Secrets. ClusterSummaryReconciler watches Secret events and react to those by reconciling itself based on following predicates
Types ¶
type AccessRequestReconciler ¶
type AccessRequestReconciler struct { client.Client *rest.Config Scheme *runtime.Scheme ConcurrentReconciles int }
AccessRequestReconciler reconciles a AccessRequest obje©∫ct
func (*AccessRequestReconciler) SetupWithManager ¶
func (r *AccessRequestReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
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 RoleRequestReconciler ¶ added in v0.4.0
type RoleRequestReconciler struct { client.Client Scheme *runtime.Scheme ConcurrentReconciles int Deployer deployer.DeployerInterface // key: RoleRequest; value RoleRequest Selector RoleRequests map[corev1.ObjectReference]libsveltosv1beta1.Selector // use a Mutex to update Map as MaxConcurrentReconciles is higher than one Mux sync.Mutex // key: Referenced object; value: set of all RoleRequests referencing the resource ReferenceMap map[corev1.ObjectReference]*libsveltosset.Set // key: RoleRequest object; value: set of referenced resources RoleRequestReferenceMap map[corev1.ObjectReference]*libsveltosset.Set // key: Sveltos/CAPI Cluster; value: set of all RoleRequests for that cluster ClusterMap map[corev1.ObjectReference]*libsveltosset.Set // key: RoleRequest; value: set of Sveltos/CAPI Clusters matched RoleRequestClusterMap map[corev1.ObjectReference]*libsveltosset.Set }
RoleRequestReconciler reconciles a RoleRequest object
func (*RoleRequestReconciler) SetupWithManager ¶ added in v0.4.0
func (r *RoleRequestReconciler) SetupWithManager(mgr ctrl.Manager) (controller.Controller, error)
SetupWithManager sets up the controller with the Manager.
func (*RoleRequestReconciler) WatchForCAPI ¶ added in v0.4.0
func (r *RoleRequestReconciler) WatchForCAPI(mgr ctrl.Manager, c controller.Controller) error
Click to show internal directories.
Click to hide internal directories.