Documentation ¶
Index ¶
- func SetupControllers(mgr ctrl.Manager, qManager *queue.Manager, cc *cache.Cache, ...) (string, error)
- func WithLeadingManager(mgr ctrl.Manager, reconciler reconcile.Reconciler, obj client.Object, ...) reconcile.Reconciler
- type AdmissionCheckReconciler
- func (r *AdmissionCheckReconciler) AddUpdateWatchers(watchers ...AdmissionCheckUpdateWatcher)
- func (r *AdmissionCheckReconciler) Create(e event.CreateEvent) bool
- func (r *AdmissionCheckReconciler) Delete(e event.DeleteEvent) bool
- func (r *AdmissionCheckReconciler) Generic(e event.GenericEvent) bool
- func (r *AdmissionCheckReconciler) NotifyClusterQueueUpdate(oldCq *kueue.ClusterQueue, newCq *kueue.ClusterQueue)
- func (r *AdmissionCheckReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *AdmissionCheckReconciler) SetupWithManager(mgr ctrl.Manager, cfg *config.Configuration) error
- func (r *AdmissionCheckReconciler) Update(e event.UpdateEvent) bool
- type AdmissionCheckUpdateWatcher
- type ClusterQueueReconciler
- func (r *ClusterQueueReconciler) Create(e event.CreateEvent) bool
- func (r *ClusterQueueReconciler) Delete(e event.DeleteEvent) bool
- func (r *ClusterQueueReconciler) Generic(e event.GenericEvent) bool
- func (r *ClusterQueueReconciler) NotifyAdmissionCheckUpdate(oldAc, newAc *kueue.AdmissionCheck)
- func (r *ClusterQueueReconciler) NotifyResourceFlavorUpdate(oldRF, newRF *kueue.ResourceFlavor)
- func (r *ClusterQueueReconciler) NotifyWorkloadUpdate(oldWl, newWl *kueue.Workload)
- func (r *ClusterQueueReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *ClusterQueueReconciler) SetupWithManager(mgr ctrl.Manager, cfg *config.Configuration) error
- func (r *ClusterQueueReconciler) Start(ctx context.Context) error
- func (r *ClusterQueueReconciler) Update(e event.UpdateEvent) bool
- type ClusterQueueReconcilerOption
- func WithQueueVisibilityClusterQueuesMaxCount(value int32) ClusterQueueReconcilerOption
- func WithQueueVisibilityUpdateInterval(interval time.Duration) ClusterQueueReconcilerOption
- func WithReportResourceMetrics(report bool) ClusterQueueReconcilerOption
- func WithWatchers(watchers ...ClusterQueueUpdateWatcher) ClusterQueueReconcilerOption
- type ClusterQueueReconcilerOptions
- type ClusterQueueUpdateWatcher
- type LocalQueueReconciler
- func (r *LocalQueueReconciler) Create(e event.CreateEvent) bool
- func (r *LocalQueueReconciler) Delete(e event.DeleteEvent) bool
- func (r *LocalQueueReconciler) Generic(e event.GenericEvent) bool
- func (r *LocalQueueReconciler) NotifyWorkloadUpdate(oldWl, newWl *kueue.Workload)
- func (r *LocalQueueReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *LocalQueueReconciler) SetupWithManager(mgr ctrl.Manager, cfg *config.Configuration) error
- func (r *LocalQueueReconciler) Update(e event.UpdateEvent) bool
- func (r *LocalQueueReconciler) UpdateStatusIfChanged(ctx context.Context, queue *kueue.LocalQueue, ...) error
- type Option
- type ResourceFlavorReconciler
- func (r *ResourceFlavorReconciler) AddUpdateWatcher(watchers ...ResourceFlavorUpdateWatcher)
- func (r *ResourceFlavorReconciler) Create(e event.CreateEvent) bool
- func (r *ResourceFlavorReconciler) Delete(e event.DeleteEvent) bool
- func (r *ResourceFlavorReconciler) Generic(e event.GenericEvent) bool
- func (r *ResourceFlavorReconciler) NotifyClusterQueueUpdate(oldCQ, newCQ *kueue.ClusterQueue)
- func (r *ResourceFlavorReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *ResourceFlavorReconciler) SetupWithManager(mgr ctrl.Manager, cfg *config.Configuration) error
- func (r *ResourceFlavorReconciler) Update(e event.UpdateEvent) bool
- type ResourceFlavorUpdateWatcher
- type WorkloadReconciler
- func (r *WorkloadReconciler) Create(e event.CreateEvent) bool
- func (r *WorkloadReconciler) Delete(e event.DeleteEvent) bool
- func (r *WorkloadReconciler) Generic(e event.GenericEvent) bool
- func (r *WorkloadReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *WorkloadReconciler) SetupWithManager(mgr ctrl.Manager, cfg *config.Configuration) error
- func (r *WorkloadReconciler) Update(e event.UpdateEvent) bool
- type WorkloadUpdateWatcher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetupControllers ¶
func SetupControllers(mgr ctrl.Manager, qManager *queue.Manager, cc *cache.Cache, cfg *configapi.Configuration) (string, error)
SetupControllers sets up the core controllers. It returns the name of the controller that failed to create and an error, if any.
func WithLeadingManager ¶ added in v0.6.0
func WithLeadingManager(mgr ctrl.Manager, reconciler reconcile.Reconciler, obj client.Object, cfg *config.Configuration) reconcile.Reconciler
WithLeadingManager returns a decorating reconcile.Reconciler that discards reconciliation requests for the controllers that are started with the controller.Options.NeedLeaderElection option set to false in non-leading replicas.
Starting controllers in non-leading replicas is needed for these that update the data served by the visibility extension API server.
This enables to:
- Keep the scheduling decisions under the responsibility of the leading replica alone, to prevent any concurrency issues.
- Consume requests from the watch event queues, to prevent them from growing indefinitely in the non-leading replicas.
- Transition to actually reconciling requests in the replica that may acquire the leader election lease, in case the previously leading replica failed to renew it.
Types ¶
type AdmissionCheckReconciler ¶ added in v0.5.0
type AdmissionCheckReconciler struct {
// contains filtered or unexported fields
}
AdmissionCheckReconciler reconciles a AdmissionCheck object
func NewAdmissionCheckReconciler ¶ added in v0.5.0
func (*AdmissionCheckReconciler) AddUpdateWatchers ¶ added in v0.5.0
func (r *AdmissionCheckReconciler) AddUpdateWatchers(watchers ...AdmissionCheckUpdateWatcher)
func (*AdmissionCheckReconciler) Create ¶ added in v0.5.0
func (r *AdmissionCheckReconciler) Create(e event.CreateEvent) bool
func (*AdmissionCheckReconciler) Delete ¶ added in v0.5.0
func (r *AdmissionCheckReconciler) Delete(e event.DeleteEvent) bool
func (*AdmissionCheckReconciler) Generic ¶ added in v0.5.0
func (r *AdmissionCheckReconciler) Generic(e event.GenericEvent) bool
func (*AdmissionCheckReconciler) NotifyClusterQueueUpdate ¶ added in v0.5.0
func (r *AdmissionCheckReconciler) NotifyClusterQueueUpdate(oldCq *kueue.ClusterQueue, newCq *kueue.ClusterQueue)
func (*AdmissionCheckReconciler) Reconcile ¶ added in v0.5.0
func (r *AdmissionCheckReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.
func (*AdmissionCheckReconciler) SetupWithManager ¶ added in v0.5.0
func (r *AdmissionCheckReconciler) SetupWithManager(mgr ctrl.Manager, cfg *config.Configuration) error
SetupWithManager sets up the controller with the Manager.
func (*AdmissionCheckReconciler) Update ¶ added in v0.5.0
func (r *AdmissionCheckReconciler) Update(e event.UpdateEvent) bool
type AdmissionCheckUpdateWatcher ¶ added in v0.5.0
type AdmissionCheckUpdateWatcher interface {
NotifyAdmissionCheckUpdate(oldAc, newAc *kueue.AdmissionCheck)
}
type ClusterQueueReconciler ¶
type ClusterQueueReconciler struct {
// contains filtered or unexported fields
}
ClusterQueueReconciler reconciles a ClusterQueue object
func NewClusterQueueReconciler ¶
func NewClusterQueueReconciler( client client.Client, qMgr *queue.Manager, cache *cache.Cache, opts ...ClusterQueueReconcilerOption, ) *ClusterQueueReconciler
func (*ClusterQueueReconciler) Create ¶
func (r *ClusterQueueReconciler) Create(e event.CreateEvent) bool
func (*ClusterQueueReconciler) Delete ¶
func (r *ClusterQueueReconciler) Delete(e event.DeleteEvent) bool
func (*ClusterQueueReconciler) Generic ¶
func (r *ClusterQueueReconciler) Generic(e event.GenericEvent) bool
func (*ClusterQueueReconciler) NotifyAdmissionCheckUpdate ¶ added in v0.5.0
func (r *ClusterQueueReconciler) NotifyAdmissionCheckUpdate(oldAc, newAc *kueue.AdmissionCheck)
func (*ClusterQueueReconciler) NotifyResourceFlavorUpdate ¶ added in v0.3.0
func (r *ClusterQueueReconciler) NotifyResourceFlavorUpdate(oldRF, newRF *kueue.ResourceFlavor)
NotifyResourceFlavorUpdate ignores updates since they have no impact on the ClusterQueue's readiness.
func (*ClusterQueueReconciler) NotifyWorkloadUpdate ¶
func (r *ClusterQueueReconciler) NotifyWorkloadUpdate(oldWl, newWl *kueue.Workload)
func (*ClusterQueueReconciler) SetupWithManager ¶
func (r *ClusterQueueReconciler) SetupWithManager(mgr ctrl.Manager, cfg *config.Configuration) error
SetupWithManager sets up the controller with the Manager.
func (*ClusterQueueReconciler) Start ¶ added in v0.5.0
func (r *ClusterQueueReconciler) Start(ctx context.Context) error
func (*ClusterQueueReconciler) Update ¶
func (r *ClusterQueueReconciler) Update(e event.UpdateEvent) bool
type ClusterQueueReconcilerOption ¶ added in v0.5.0
type ClusterQueueReconcilerOption func(*ClusterQueueReconcilerOptions)
ClusterQueueReconcilerOption configures the reconciler.
func WithQueueVisibilityClusterQueuesMaxCount ¶ added in v0.5.0
func WithQueueVisibilityClusterQueuesMaxCount(value int32) ClusterQueueReconcilerOption
WithQueueVisibilityClusterQueuesMaxCount indicates the maximal number of pending workloads exposed in the cluster queue status
func WithQueueVisibilityUpdateInterval ¶ added in v0.5.0
func WithQueueVisibilityUpdateInterval(interval time.Duration) ClusterQueueReconcilerOption
WithQueueVisibilityUpdateInterval specifies the time interval for updates to the structure of the top pending workloads in the queues.
func WithReportResourceMetrics ¶ added in v0.5.0
func WithReportResourceMetrics(report bool) ClusterQueueReconcilerOption
func WithWatchers ¶ added in v0.5.0
func WithWatchers(watchers ...ClusterQueueUpdateWatcher) ClusterQueueReconcilerOption
type ClusterQueueReconcilerOptions ¶ added in v0.5.0
type ClusterQueueReconcilerOptions struct { Watchers []ClusterQueueUpdateWatcher ReportResourceMetrics bool QueueVisibilityUpdateInterval time.Duration QueueVisibilityClusterQueuesMaxCount int32 }
type ClusterQueueUpdateWatcher ¶ added in v0.2.0
type ClusterQueueUpdateWatcher interface {
NotifyClusterQueueUpdate(*kueue.ClusterQueue, *kueue.ClusterQueue)
}
type LocalQueueReconciler ¶ added in v0.2.0
type LocalQueueReconciler struct {
// contains filtered or unexported fields
}
LocalQueueReconciler reconciles a LocalQueue object
func NewLocalQueueReconciler ¶ added in v0.2.0
func (*LocalQueueReconciler) Create ¶ added in v0.2.0
func (r *LocalQueueReconciler) Create(e event.CreateEvent) bool
func (*LocalQueueReconciler) Delete ¶ added in v0.2.0
func (r *LocalQueueReconciler) Delete(e event.DeleteEvent) bool
func (*LocalQueueReconciler) Generic ¶ added in v0.2.0
func (r *LocalQueueReconciler) Generic(e event.GenericEvent) bool
func (*LocalQueueReconciler) NotifyWorkloadUpdate ¶ added in v0.2.0
func (r *LocalQueueReconciler) NotifyWorkloadUpdate(oldWl, newWl *kueue.Workload)
func (*LocalQueueReconciler) SetupWithManager ¶ added in v0.2.0
func (r *LocalQueueReconciler) SetupWithManager(mgr ctrl.Manager, cfg *config.Configuration) error
SetupWithManager sets up the controller with the Manager.
func (*LocalQueueReconciler) Update ¶ added in v0.2.0
func (r *LocalQueueReconciler) Update(e event.UpdateEvent) bool
func (*LocalQueueReconciler) UpdateStatusIfChanged ¶ added in v0.3.0
func (r *LocalQueueReconciler) UpdateStatusIfChanged( ctx context.Context, queue *kueue.LocalQueue, conditionStatus metav1.ConditionStatus, reason, msg string, ) error
type Option ¶ added in v0.3.0
type Option func(*options)
Option configures the reconciler.
func WithPodsReadyTimeout ¶ added in v0.3.0
WithPodsReadyTimeout indicates if the controller should interrupt startup of a workload if it exceeds the timeout to reach the PodsReady=True condition.
func WithRequeuingBackoffLimitCount ¶ added in v0.6.0
WithRequeuingBackoffLimitCount indicates if the controller should deactivate a workload if it reaches the limitation.
func WithWorkloadUpdateWatchers ¶ added in v0.3.0
func WithWorkloadUpdateWatchers(value ...WorkloadUpdateWatcher) Option
WithWorkloadUpdateWatchers allows to specify the workload update watchers
type ResourceFlavorReconciler ¶
type ResourceFlavorReconciler struct {
// contains filtered or unexported fields
}
ResourceFlavorReconciler reconciles a ResourceFlavor object
func (*ResourceFlavorReconciler) AddUpdateWatcher ¶ added in v0.3.0
func (r *ResourceFlavorReconciler) AddUpdateWatcher(watchers ...ResourceFlavorUpdateWatcher)
func (*ResourceFlavorReconciler) Create ¶
func (r *ResourceFlavorReconciler) Create(e event.CreateEvent) bool
func (*ResourceFlavorReconciler) Delete ¶
func (r *ResourceFlavorReconciler) Delete(e event.DeleteEvent) bool
func (*ResourceFlavorReconciler) Generic ¶
func (r *ResourceFlavorReconciler) Generic(e event.GenericEvent) bool
func (*ResourceFlavorReconciler) NotifyClusterQueueUpdate ¶ added in v0.2.0
func (r *ResourceFlavorReconciler) NotifyClusterQueueUpdate(oldCQ, newCQ *kueue.ClusterQueue)
NotifyClusterQueueUpdate will listen for the update/delete events of clusterQueues to help verifying whether resourceFlavors are no longer in use by clusterQueues. There are mainly two reasons for this, 1) a clusterQueue is deleted 2) a clusterQueue is updated with the resourceFlavors in use.
func (*ResourceFlavorReconciler) SetupWithManager ¶
func (r *ResourceFlavorReconciler) SetupWithManager(mgr ctrl.Manager, cfg *config.Configuration) error
SetupWithManager sets up the controller with the Manager.
func (*ResourceFlavorReconciler) Update ¶
func (r *ResourceFlavorReconciler) Update(e event.UpdateEvent) bool
type ResourceFlavorUpdateWatcher ¶ added in v0.3.0
type ResourceFlavorUpdateWatcher interface {
NotifyResourceFlavorUpdate(oldRF, newRF *kueue.ResourceFlavor)
}
type WorkloadReconciler ¶
type WorkloadReconciler struct {
// contains filtered or unexported fields
}
WorkloadReconciler reconciles a Workload object
func NewWorkloadReconciler ¶
func NewWorkloadReconciler(client client.Client, queues *queue.Manager, cache *cache.Cache, recorder record.EventRecorder, opts ...Option) *WorkloadReconciler
func (*WorkloadReconciler) Create ¶
func (r *WorkloadReconciler) Create(e event.CreateEvent) bool
func (*WorkloadReconciler) Delete ¶
func (r *WorkloadReconciler) Delete(e event.DeleteEvent) bool
func (*WorkloadReconciler) Generic ¶
func (r *WorkloadReconciler) Generic(e event.GenericEvent) bool
func (*WorkloadReconciler) SetupWithManager ¶
func (r *WorkloadReconciler) SetupWithManager(mgr ctrl.Manager, cfg *config.Configuration) error
SetupWithManager sets up the controller with the Manager.
func (*WorkloadReconciler) Update ¶
func (r *WorkloadReconciler) Update(e event.UpdateEvent) bool