controller

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 4, 2024 License: Apache-2.0 Imports: 40 Imported by: 0

Documentation

Index

Constants

View Source
const GarbageCollectIgnoreAnnotation = "maintenance.nvidia.com/garbage-collector.ignore"

GarbageCollectIgnoreAnnotation garbage collector will skip NodeMaintenance with this annotation.

View Source
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

type ConditionChangedPredicate struct {
	predicate.Funcs
	// contains filtered or unexported fields
}

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

Update implements Predicate.

type GarbageCollectorOptions

type GarbageCollectorOptions struct {
	sync.Mutex
	// contains filtered or unexported fields
}

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

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

Reconcile collects garabage once

func (*NodeMaintenanceGarbageCollector) SetupWithManager

func (r *NodeMaintenanceGarbageCollector) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up NodeMaintenanceGarbageCollector with controller manager

func (*NodeMaintenanceGarbageCollector) Start

Start NodeMaintenanceGarbageCollector

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

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

func (r *NodeMaintenanceReconciler) SetupWithManager(mgr ctrl.Manager, log logr.Logger) error

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

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

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

MaxUnavailable returns the last loaded MaxUnavailable option

func (*NodeMaintenanceSchedulerReconcilerOptions) Store

func (nmsro *NodeMaintenanceSchedulerReconcilerOptions) Store(maxUnavailable, maxParallelOperations *intstr.IntOrString)

Store maxUnavailable, maxParallelOperations options for NodeMaintenanceSchedulerReconciler

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL