nodeutil

package
v0.0.0-...-16b9a35 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AsNode

func AsNode(info svcapi.NodeInfo) *corev1.Node

AsNode converts a svcapi.NodeInfo to a corev1.Node object.

func AsNodeInfo

func AsNodeInfo(node corev1.Node, csiDriverVolumeMaximums map[string]int32) svcapi.NodeInfo

AsNodeInfo converts a corev1.Node into a svcapi.NodeInfo object. It additionally takes in csiDriverVolumeMaximums which is a map of CSI driver names to the maximum number of volumes managed by the driver on the node.

func BuildReadyConditions

func BuildReadyConditions(transitionTime time.Time) []corev1.NodeCondition

BuildReadyConditions builds a slice of NodeCondition for a ready node with the given transition time.

func ComputeAllocatable

func ComputeAllocatable(capacity, systemReserved, kubeReserved corev1.ResourceList) corev1.ResourceList

ComputeAllocatable computes the allocatable resources of a node given its capacity, system reserved and kube reserved resources.

func CreateNodeLabels

func CreateNodeLabels(simulationName string, nodePool *sacorev1alpha1.NodePool, nodeTemplate *sacorev1alpha1.NodeTemplate, az string, groupRunPassNum uint32, nodeName string) map[string]string

CreateNodeLabels creates the labels for a simulated node.

func GetInstanceType

func GetInstanceType(node *corev1.Node) string

GetInstanceType returns the Instance Type of a node from the label present on it.

Types

This section is empty.

Jump to

Keyboard shortcuts

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