Documentation ¶
Index ¶
- Constants
- type ConditionChangedPredicate
- type GarbageCollectorOptions
- type MaintenanceOperatorConfigReconciler
- type NodeMaintenanceGarbageCollector
- type NodeMaintenanceReconciler
- type NodeMaintenanceSchedulerReconciler
- type NodeMaintenanceSchedulerReconcilerOptions
- func (nmsro *NodeMaintenanceSchedulerReconcilerOptions) Load()
- func (nmsro *NodeMaintenanceSchedulerReconcilerOptions) MaxParallelOperations() *intstr.IntOrString
- func (nmsro *NodeMaintenanceSchedulerReconcilerOptions) MaxUnavailable() *intstr.IntOrString
- func (nmsro *NodeMaintenanceSchedulerReconcilerOptions) Store(maxUnavailable, maxParallelOperations *intstr.IntOrString)
Constants ¶
const GarbageCollectIgnoreAnnotation = "maintenance.nvidia.com/garbage-collector.ignore"
GarbageCollectIgnoreAnnotation garbage collector will skip NodeMaintenance with this annotation.
const (
// ReadyTimeAnnotation is annotation that contains NodeMaintenance time in tranisitioned to ready state
ReadyTimeAnnotation = "maintenance.nvidia.com/ready-time"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConditionChangedPredicate ¶
ConditionChangedPredicate will trigger enqueue of Event for reconcile in the following cases: 1. A change in NodeMaintenance Conditions 2. Update to the object occurred and deletion timestamp is set 3. NodeMaintenance created 4. NodeMaintenance deleted 5. generic event received
func NewConditionChangedPredicate ¶
func NewConditionChangedPredicate(log logr.Logger) ConditionChangedPredicate
NewConditionChangedPredicate creates a new ConditionChangedPredicate
func (ConditionChangedPredicate) Update ¶
func (p ConditionChangedPredicate) Update(e event.TypedUpdateEvent[client.Object]) bool
Update implements Predicate.
type GarbageCollectorOptions ¶
GarbageCollectorOptions are options for GarbageCollector where values are stored by external entity and read by GarbageCollector.
func NewGarbageCollectorOptions ¶
func NewGarbageCollectorOptions() *GarbageCollectorOptions
NewGarbageCollectorOptions creates new *GarbageCollectorOptions
func (*GarbageCollectorOptions) Load ¶
func (gco *GarbageCollectorOptions) Load()
Load loads the last Stored options
func (*GarbageCollectorOptions) MaxNodeMaintenanceTime ¶
func (gco *GarbageCollectorOptions) MaxNodeMaintenanceTime() time.Duration
MaxNodeMaintenanceTime returns the last loaded MaxUnavailable option
func (*GarbageCollectorOptions) Store ¶
func (gco *GarbageCollectorOptions) Store(maxNodeMaintenanceTime time.Duration)
Store maxNodeMaintenanceTime
type MaintenanceOperatorConfigReconciler ¶
type MaintenanceOperatorConfigReconciler struct { client.Client Scheme *runtime.Scheme SchedulerReconcierOptions *NodeMaintenanceSchedulerReconcilerOptions GarbageCollectorOptions *GarbageCollectorOptions }
MaintenanceOperatorConfigReconciler reconciles a MaintenanceOperatorConfig object
func (*MaintenanceOperatorConfigReconciler) Reconcile ¶
func (r *MaintenanceOperatorConfigReconciler) 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.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.16.3/pkg/reconcile
func (*MaintenanceOperatorConfigReconciler) SetupWithManager ¶
func (r *MaintenanceOperatorConfigReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type NodeMaintenanceGarbageCollector ¶
type NodeMaintenanceGarbageCollector struct { client.Client // contains filtered or unexported fields }
NodeMaintenanceGarbageCollector performs garbage collection for NodeMaintennace
func NewNodeMaintenanceGarbageCollector ¶
func NewNodeMaintenanceGarbageCollector(kClient client.Client, options *GarbageCollectorOptions, log logr.Logger) *NodeMaintenanceGarbageCollector
NewNodeMaintenanceGarbageCollector creates a new NodeMaintenanceGarbageCollector
func (*NodeMaintenanceGarbageCollector) Reconcile ¶
func (r *NodeMaintenanceGarbageCollector) Reconcile(ctx context.Context) error
Reconcile collects garabage once
func (*NodeMaintenanceGarbageCollector) SetupWithManager ¶
func (r *NodeMaintenanceGarbageCollector) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up NodeMaintenanceGarbageCollector with controller manager
type NodeMaintenanceReconciler ¶
type NodeMaintenanceReconciler struct { client.Client Scheme *runtime.Scheme EventRecorder record.EventRecorder CordonHandler cordon.Handler WaitPodCompletionHandler podcompletion.Handler DrainManager drain.Manager }
NodeMaintenanceReconciler reconciles a NodeMaintenance object
func (*NodeMaintenanceReconciler) Reconcile ¶
func (r *NodeMaintenanceReconciler) 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.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.16.3/pkg/reconcile
func (*NodeMaintenanceReconciler) SetupWithManager ¶
SetupWithManager sets up the controller with the Manager.
type NodeMaintenanceSchedulerReconciler ¶
type NodeMaintenanceSchedulerReconciler struct { client.Client Scheme *runtime.Scheme EventRecorder record.EventRecorder Options *NodeMaintenanceSchedulerReconcilerOptions Log logr.Logger Sched scheduler.Scheduler }
NodeMaintenanceSchedulerReconciler reconciles a NodeMaintenance object
func (*NodeMaintenanceSchedulerReconciler) Reconcile ¶
func (r *NodeMaintenanceSchedulerReconciler) 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.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.16.3/pkg/reconcile
func (*NodeMaintenanceSchedulerReconciler) SetupWithManager ¶
func (r *NodeMaintenanceSchedulerReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type NodeMaintenanceSchedulerReconcilerOptions ¶
type NodeMaintenanceSchedulerReconcilerOptions struct { sync.Mutex // contains filtered or unexported fields }
NodeMaintenanceSchedulerReconcilerOptions are options for NodeMaintenanceSchedulerReconciler where values are stored by external entity and read by NodeMaintenanceSchedulerReconciler.
func NewNodeMaintenanceSchedulerReconcilerOptions ¶
func NewNodeMaintenanceSchedulerReconcilerOptions() *NodeMaintenanceSchedulerReconcilerOptions
NewNodeMaintenanceSchedulerReconcilerOptions creates new *NodeMaintenanceSchedulerReconcilerOptions
func (*NodeMaintenanceSchedulerReconcilerOptions) Load ¶
func (nmsro *NodeMaintenanceSchedulerReconcilerOptions) Load()
Load loads the last Stored options
func (*NodeMaintenanceSchedulerReconcilerOptions) MaxParallelOperations ¶
func (nmsro *NodeMaintenanceSchedulerReconcilerOptions) MaxParallelOperations() *intstr.IntOrString
MaxParallelOperations returns the last loaded MaxParallelOperations option
func (*NodeMaintenanceSchedulerReconcilerOptions) MaxUnavailable ¶
func (nmsro *NodeMaintenanceSchedulerReconcilerOptions) MaxUnavailable() *intstr.IntOrString
MaxUnavailable returns the last loaded MaxUnavailable option
func (*NodeMaintenanceSchedulerReconcilerOptions) Store ¶
func (nmsro *NodeMaintenanceSchedulerReconcilerOptions) Store(maxUnavailable, maxParallelOperations *intstr.IntOrString)
Store maxUnavailable, maxParallelOperations options for NodeMaintenanceSchedulerReconciler