Documentation
¶
Overview ¶
Copyright 2025 NVIDIA CORPORATION SPDX-License-Identifier: Apache-2.0
Copyright 2025 NVIDIA CORPORATION SPDX-License-Identifier: Apache-2.0
Copyright 2025 NVIDIA CORPORATION SPDX-License-Identifier: Apache-2.0
Copyright 2025 NVIDIA CORPORATION SPDX-License-Identifier: Apache-2.0
Index ¶
- func CleanupResourceClaims(ctx context.Context, clientset kubernetes.Interface, namespace string)
- func GetNodesAllocatableResources(clientset kubernetes.Interface) (map[string]*ResourceList, error)
- func GetNodesIdleResources(clientset kubernetes.Interface) (map[string]*ResourceList, error)
- func ListDevicesByNode(clientset kubernetes.Interface, deviceClass string) map[string]int
- func SkipIfCSICapacitiesAreMissing(ctx context.Context, client kubernetes.Interface)
- func SkipIfCSIDriverIsMissing(ctx context.Context, client kubernetes.Interface, name string)
- func SkipIfInsufficientClusterResources(clientset kubernetes.Interface, resourceRequest *ResourceList)
- func SkipIfInsufficientClusterTopologyResources(client kubernetes.Interface, nodeResourceRequests []ResourceList)
- func SkipIfInsufficientDynamicResources(clientset kubernetes.Interface, deviceClassName string, ...)
- func SkipIfNonHomogeneousGpuCounts(clientset kubernetes.Interface) int
- type ResourceList
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanupResourceClaims ¶
func CleanupResourceClaims(ctx context.Context, clientset kubernetes.Interface, namespace string)
func GetNodesAllocatableResources ¶
func GetNodesAllocatableResources(clientset kubernetes.Interface) (map[string]*ResourceList, error)
func GetNodesIdleResources ¶
func GetNodesIdleResources(clientset kubernetes.Interface) (map[string]*ResourceList, error)
func ListDevicesByNode ¶
func ListDevicesByNode(clientset kubernetes.Interface, deviceClass string) map[string]int
func SkipIfCSICapacitiesAreMissing ¶
func SkipIfCSICapacitiesAreMissing(ctx context.Context, client kubernetes.Interface)
func SkipIfCSIDriverIsMissing ¶
func SkipIfCSIDriverIsMissing(ctx context.Context, client kubernetes.Interface, name string)
func SkipIfInsufficientClusterResources ¶
func SkipIfInsufficientClusterResources(clientset kubernetes.Interface, resourceRequest *ResourceList)
func SkipIfInsufficientClusterTopologyResources ¶
func SkipIfInsufficientClusterTopologyResources(client kubernetes.Interface, nodeResourceRequests []ResourceList)
func SkipIfInsufficientDynamicResources ¶
func SkipIfInsufficientDynamicResources(clientset kubernetes.Interface, deviceClassName string, nodes, devicePerNode int)
SkipIfInsufficientDynamicResources checks if there are enough NodeName-type resourceSlices that have at least devicePerNode devices
func SkipIfNonHomogeneousGpuCounts ¶
func SkipIfNonHomogeneousGpuCounts(clientset kubernetes.Interface) int
SkipIfNonHomogeneousGpuCounts skips the test if the cluster has nodes with different GPU counts, not considering cpu-only nodes.
Types ¶
type ResourceList ¶
type ResourceList struct {
Cpu resource.Quantity
Memory resource.Quantity
Gpu resource.Quantity
GpuMemory resource.Quantity
PodCount int
OtherResources map[v1.ResourceName]resource.Quantity
}
func FromK8sResourceList ¶
func FromK8sResourceList(list v1.ResourceList) *ResourceList
func GetClusterAllocatableResources ¶ added in v0.9.12
func GetClusterAllocatableResources(clientset kubernetes.Interface) (*ResourceList, error)
func ResourcesRequestToList ¶
func ResourcesRequestToList(req corev1.ResourceList, podAnnotations map[string]string) *ResourceList
func (*ResourceList) Add ¶
func (rl *ResourceList) Add(toAddRl *ResourceList)
func (*ResourceList) LessOrEqual ¶
func (rl *ResourceList) LessOrEqual(toCmpRl *ResourceList) bool
func (ResourceList) String ¶
func (rl ResourceList) String() string
func (*ResourceList) Sub ¶
func (rl *ResourceList) Sub(toSubRl *ResourceList)
Click to show internal directories.
Click to hide internal directories.