rd

package
v0.12.9 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2026 License: Apache-2.0 Imports: 37 Imported by: 0

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

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

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

Constants

View Source
const (
	TestZoneLabelKey = "e2e-topology-label/zone"
	TestRackLabelKey = "e2e-topology-label/rack"
	NodeNameLabelKey = "kubernetes.io/hostname"
)
View Source
const BatchJobAppLabel = "batch-job-app-name"
View Source
const CronJobAppLabel = "cron-job-app-name"
View Source
const DeploymentAppLabel = "deployment-app-name"
View Source
const (
	PodGroupLabelName = "pod-group-name"
)
View Source
const ReplicaSetAppLabel = "replicaset-app-name"
View Source
const StatefulSetAppLabel = "stateful-set-app-name"

Variables

This section is empty.

Functions

func AssignNodesToTestTopology added in v0.8.3

func AssignNodesToTestTopology(ctx context.Context,
	kubeClient client.Client,
	nodesNamesList []string,
	testTopologyData TestTopologyData,
	numNodesInTestTopology int,
	spreadAcrossDomains bool,
)

func CleanNodesFromTopology added in v0.8.3

func CleanNodesFromTopology(ctx context.Context,
	kubeClient client.Client,
	testTopologyData TestTopologyData,
)

func CleanRackZoneTopology added in v0.8.3

func CleanRackZoneTopology(ctx context.Context, testTopologyData TestTopologyData, kubeConfig *rest.Config)

func CreateBatchJobObject

func CreateBatchJobObject(podQueue *v2.Queue, resources v1.ResourceRequirements) *batchv1.Job

func CreateCronJobObject

func CreateCronJobObject(namespace, queueName string) *batchv1.CronJob

func CreateDeploymentObject

func CreateDeploymentObject(namespace, queueName string) *appsv1.Deployment

func CreateNamespaceObject

func CreateNamespaceObject(name, queueName string) *corev1.Namespace

func CreateNonPreemptiblePriorityClass

func CreateNonPreemptiblePriorityClass(ctx context.Context, client *kubernetes.Clientset) (string, error)

func CreatePersistentVolumeClaimObject

func CreatePersistentVolumeClaimObject(name string, storageClassName string,
	quantity resource.Quantity) *v1.PersistentVolumeClaim

func CreatePersistentVolumeObject

func CreatePersistentVolumeObject(name string, path string) *v1.PersistentVolume

func CreatePod

func CreatePod(ctx context.Context, client *kubernetes.Clientset, pod *v1.Pod) (*v1.Pod, error)

func CreatePodObject

func CreatePodObject(podQueue *v2.Queue, resources v1.ResourceRequirements) *v1.Pod

func CreatePodWithPodGroupReference

func CreatePodWithPodGroupReference(queue *v2.Queue, podGroupName string,
	resources v1.ResourceRequirements) *v1.Pod

func CreatePreemptibleAndNonPriorityClass

func CreatePreemptibleAndNonPriorityClass(ctx context.Context, client *kubernetes.Clientset) (string, string, error)

func CreatePreemptiblePriorityClass

func CreatePreemptiblePriorityClass(ctx context.Context, client *kubernetes.Clientset) (string, error)

func CreatePriorityClass

func CreatePriorityClass(name string, value int) *schedulingv1.PriorityClass

func CreateReplicasetObject

func CreateReplicasetObject(namespace, queueName string) *v1.ReplicaSet

func CreateResourceClaim

func CreateResourceClaim(namespace, deviceClassName string, deviceCount int) *resourceapi.ResourceClaim

func CreateResourceClaimTemplate

func CreateResourceClaimTemplate(namespace, deviceClassName string, deviceCount int) *resourceapi.ResourceClaimTemplate

func CreateRoleBindingObject

func CreateRoleBindingObject(name string, clusterRoleRefName string, serviceAccountName string,
	namespace string) *rbacv1.RoleBinding

func CreateStatefulSetObject

func CreateStatefulSetObject(namespace, queueName string) *v1.StatefulSet

func CreateStorageClass

func CreateStorageClass(name string) *storagev1.StorageClass

CreateStorageClass creates StorageClass matching CSI driver for provisioning local PVs backed by LVM documentation: https://github.com/openebs/lvm-localpv

func DefaultSecurityContext

func DefaultSecurityContext() *v1.SecurityContext

DefaultSecurityContext Set container security context that is valid by default openshift clusters

func DeleteAllConfigMapsInNamespace

func DeleteAllConfigMapsInNamespace(
	ctx context.Context, client runtimeClient.Client, namespace string,
) error

func DeleteAllE2EPriorityClasses

func DeleteAllE2EPriorityClasses(ctx context.Context, client runtimeClient.WithWatch) error

func DeleteAllJobsInNamespace

func DeleteAllJobsInNamespace(ctx context.Context, client client.Client, namespace string) error

func DeleteAllPersistentVolumes

func DeleteAllPersistentVolumes(ctx context.Context, k8sClient client.Client) error

func DeleteAllPodsInNamespace

func DeleteAllPodsInNamespace(
	ctx context.Context, client runtimeClient.Client, namespace string,
) error

func DeleteAllStorageClasses

func DeleteAllStorageClasses(ctx context.Context, k8sClient client.Client) error

func DeleteAllStorageObjects

func DeleteAllStorageObjects(ctx context.Context, k8sClient client.Client) error

func DeleteJob

func DeleteJob(ctx context.Context, client *kubernetes.Clientset, job *batchv1.Job)

func DeleteNamespace

func DeleteNamespace(ctx context.Context, kubeClient *kubernetes.Clientset, namespace string) error

func FindNodeWithEnoughGPUs

func FindNodeWithEnoughGPUs(ctx context.Context, client runtimeClient.Client, numFreeGPUs int64) *corev1.Node

func FindNodeWithNoGPU

func FindNodeWithNoGPU(ctx context.Context, client runtimeClient.Client) *corev1.Node

func FindNodesWithEnoughGPUs

func FindNodesWithEnoughGPUs(ctx context.Context, client runtimeClient.Client, numFreeGPUs int64) []*corev1.Node

func FindNodesWithExactGPUs added in v0.4.11

func FindNodesWithExactGPUs(ctx context.Context, client runtimeClient.Client, numFreeGPUs int64) []*corev1.Node

func GetCSICapacity

func GetCSICapacity(ctx context.Context, k8sClient client.Client, storageclass *storagev1.StorageClass) (storageCapacity *storagev1.CSIStorageCapacity, err error)

func GetE2ENamespaces

func GetE2ENamespaces(ctx context.Context, kubeClient *kubernetes.Clientset) (*corev1.NamespaceList, error)

func GetJobPods

func GetJobPods(ctx context.Context, client *kubernetes.Clientset, job *batchv1.Job) []v1.Pod

func GetNodeGpuDeviceCount

func GetNodeGpuDeviceCount(ctx context.Context, client runtimeClient.Client, nodeName string) int64

func GetNodeGpuDeviceMemory

func GetNodeGpuDeviceMemory(ctx context.Context, client runtimeClient.Client, nodeName string) int64

func GetPod

func GetPod(ctx context.Context, client *kubernetes.Clientset, namespace string, name string) (*v1.Pod, error)

func GetPodLogs

func GetPodLogs(ctx context.Context, client *kubernetes.Clientset, namespace string, name string) (string, error)

func GetPodNodeAffinitySelector

func GetPodNodeAffinitySelector(pod *v1.Pod) *v1.NodeSelector

func IsPodEnded

func IsPodEnded(pod *v1.Pod) bool

func IsPodFailed

func IsPodFailed(pod *v1.Pod) bool

func IsPodReady

func IsPodReady(pod *v1.Pod) bool

func IsPodRunning

func IsPodRunning(pod *v1.Pod) bool

func IsPodScheduled

func IsPodScheduled(pod *v1.Pod) bool

func IsPodSucceeded

func IsPodSucceeded(pod *v1.Pod) bool

func IsPodUnschedulable

func IsPodUnschedulable(pod *v1.Pod) bool

func LabelNode

func LabelNode(ctx context.Context, client kubernetes.Interface, node *corev1.Node, labelName, labelValue string,
) error

func NodeAffinity

func NodeAffinity(nodeName string, operator v1.NodeSelectorOperator) *v1.Affinity

func UnLabelNode

func UnLabelNode(ctx context.Context, client kubernetes.Interface, node *corev1.Node, labelName string) error

Types

type TestTopologyData added in v0.8.3

type TestTopologyData struct {
	TopologyCrd   *kaiv1alpha1.Topology
	TopologyNodes map[string]*corev1.Node
	Zones         map[string][]*corev1.Node
	Racks         map[string][]*corev1.Node
}

func CreateRackZoneTopology added in v0.8.3

func CreateRackZoneTopology(
	ctx context.Context, kubeClientset *kubernetes.Clientset, kubeConfig *rest.Config, numNodesInTestTopology int, rackCount int) (TestTopologyData, []string)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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