utils

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TaintKeyBridgedNode will be added when nodes detected as bridged,
	// containing co-located kubelet and slurmd services, and removed
	// when detected as no longer bridged.
	TaintKeyBridgedNode = "slinky.slurm.net/managed-node"
)

Variables

View Source
var (
	// TaintNodeBridged will mark a node such that:
	// - Any already-running pods that do not tolerate the taint will be evicted.
	//   Currently enforced by the Kubernetes NodeController.
	// - Indicates the node is being managed by the named slurm-bridge scheduler.
	TaintNodeBridged = corev1.Taint{
		Key:    TaintKeyBridgedNode,
		Effect: corev1.TaintEffectNoExecute,
	}
)
View Source
var (
	// TolerationNodeBridged is used to mark pods such that they can run on the
	// slurm-bridge marked nodes.
	TolerationNodeBridged = corev1.Toleration{
		Key:      TaintNodeBridged.Key,
		Operator: corev1.TolerationOpEqual,
		Effect:   TaintNodeBridged.Effect,
	}
)

Functions

func Keys

func Keys[K comparable, V any](items map[K]V) []K

Get keys from map

func MergeTolerations

func MergeTolerations(tolerations []corev1.Toleration, toleration corev1.Toleration) []corev1.Toleration

func NamespacedNameFromString

func NamespacedNameFromString(qualifiedName string) types.NamespacedName

func NewTaintNodeBridged

func NewTaintNodeBridged(schedulerName string) *corev1.Taint

func NewTolerationNodeBridged

func NewTolerationNodeBridged(schedulerName string) *corev1.Toleration

func Values

func Values[K comparable, V any](items map[K]V) []V

Get values from map

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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