nodeset

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2026 License: Apache-2.0 Imports: 59 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ControllerName = "nodeset-controller"

	// BackoffGCInterval is the time that has to pass before next iteration of backoff GC is run
	BackoffGCInterval = 1 * time.Minute
)
View Source
const (
	// SelectingAllReason is added to an event when a NodeSet selects all Pods.
	SelectingAllReason = "SelectingAll"
	// FailedPlacementReason is added to an event when a NodeSet cannot schedule a Pod to a specified node.
	FailedPlacementReason = "FailedPlacement"
	// FailedNodeSetPodReason is added to an event when the status of a Pod of a NodeSet is 'Failed'.
	FailedNodeSetPodReason = "FailedNodeSetPod"
	// ScalingUpReason is added to an event when pods are being created to reach the desired replica count.
	ScalingUpReason = "ScalingUp"
	// ScalingDownReason is added to an event when pods are being deleted to reach the desired replica count.
	ScalingDownReason = "ScalingDown"
	// SyncFailedReason is added to an event when a sync sub-step fails.
	SyncFailedReason = "SyncFailed"
	// SyncFinalizerFailedReason is added to an event when a sync finalizer sub-step fails.
	SyncFinalizerFailedReason = "SyncFinalizerFailed"
	// NodeCordonReason is added to an event when a pod is cordoned due to its Kubernetes node being cordoned.
	NodeCordonReason = "NodeCordon"
	// SlurmNodeNotRegisteredReason is added to an event when a pod is deleted because its Slurm node is not registered.
	SlurmNodeNotRegisteredReason = "SlurmNodeNotRegistered"
	// DefunctSlurmNodePrunedReason is added to an event when a defunct Slurm node is pruned.
	DefunctSlurmNodePrunedReason = "DefunctSlurmNodePruned"
	// RollingUpdateReason is added to an event when pods are being replaced during a rolling update.
	RollingUpdateReason = "RollingUpdate"
	// ControllerRefFailedReason is added to an event when the referenced Controller CR cannot be fetched.
	ControllerRefFailedReason = "ControllerRefFailed"
)

Reasons for NodeSet events

View Source
const (

	// FailedDaemonPodReason is added to an event when the status of a Pod of a DaemonSet is 'Failed'.
	FailedDaemonPodReason = "FailedDaemonPod"
	// SucceededDaemonPodReason is added to an event when the status of a Pod of a DaemonSet is 'Succeeded'.
	SucceededDaemonPodReason = "SucceededDaemonPod"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type NodeSetReconciler

type NodeSetReconciler struct {
	client.Client
	Scheme *runtime.Scheme

	ClientMap *clientmap.ClientMap
	// contains filtered or unexported fields
}

NodeSetReconciler reconciles a NodeSet object

func NewReconciler

func NewReconciler(c client.Client, cm *clientmap.ClientMap, propagatedNodeConditions []corev1.NodeConditionType) *NodeSetReconciler

func (*NodeSetReconciler) EnqueueNodeSetAfter

func (r *NodeSetReconciler) EnqueueNodeSetAfter(nodeset *slinkyv1beta1.NodeSet, after time.Duration)

EnqueueNodeSetAfter schedules a reconcile of the NodeSet after the given delay. It uses the shared durationStore so that the next Reconcile result will have RequeueAfter set.

func (*NodeSetReconciler) NodeShouldRunDaemonPod

func (r *NodeSetReconciler) NodeShouldRunDaemonPod(ctx context.Context, node *corev1.Node, nodeset *slinkyv1beta1.NodeSet) (bool, bool)

func (*NodeSetReconciler) Reconcile

func (r *NodeSetReconciler) Reconcile(ctx context.Context, req ctrl.Request) (res ctrl.Result, retErr 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 (*NodeSetReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

func (*NodeSetReconciler) Sync

Sync implements control logic for synchronizing a NodeSet and its derived Pods.

type SyncFinalizer added in v1.2.0

type SyncFinalizer struct {
	Name string
	Sync func(ctx context.Context, nodeset *slinkyv1beta1.NodeSet) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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