slurmcontrol

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2026 License: Apache-2.0 Imports: 16 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SlurmControlInterface

type SlurmControlInterface interface {
	// GetNodeNames returns the list Slurm nodes by name.
	GetNodeNames(ctx context.Context) ([]string, error)
	// NodeExists returns true if the Slurm node exists, false if not found.
	NodeExists(ctx context.Context, node *corev1.Node) (bool, error)
	// MakeNodeDrain handles adding the DRAIN state to the Slurm node.
	MakeNodeDrain(ctx context.Context, node *corev1.Node, reason string) error
	// MakeNodeUndrain handles removing the DRAIN state from the Slurm node.
	MakeNodeUndrain(ctx context.Context, node *corev1.Node, reason string) error
	// IsNodeDrain checks if the slurm node has the DRAIN state.
	IsNodeDrain(ctx context.Context, node *corev1.Node) (bool, error)
	// IsNodeDrained checks if the slurm node is DRAINED and eligible for removal.
	IsNodeDrained(ctx context.Context, node *corev1.Node) (bool, error)
	// IsNodeExternal checks if the slurm node is an external node
	IsNodeExternal(ctx context.Context, node *corev1.Node) (bool, error)
	// AddNode registers a Kubernetes node in Slurm with the correct CPUs and memory.
	AddNode(ctx context.Context, node *corev1.Node, nodeInfo *nodeinfo.NodeInfo) error
	// NodeNeedsRecreate returns true if the Slurm node exists and its cpu, memory, or gres
	// differ from the desired values (from the Kubernetes node and nodeInfo). Such a node
	// must be drained, removed, and re-added to apply the change.
	NodeNeedsRecreate(ctx context.Context, node *corev1.Node, nodeInfo *nodeinfo.NodeInfo) (bool, error)
	// RemoveNode removes a Kubernetes node from Slurm.
	RemoveNode(ctx context.Context, node *corev1.Node) error
}

func NewControl

func NewControl(client slurmclient.Client) SlurmControlInterface

Jump to

Keyboard shortcuts

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