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
- func AssignNodesToTestTopology(ctx context.Context, kubeClient client.Client, nodesNamesList []string, ...)
- func CleanNodesFromTopology(ctx context.Context, kubeClient client.Client, ...)
- func CleanRackZoneTopology(ctx context.Context, testTopologyData TestTopologyData, ...)
- func CreateBatchJobObject(podQueue *v2.Queue, resources v1.ResourceRequirements) *batchv1.Job
- func CreateCronJobObject(namespace, queueName string) *batchv1.CronJob
- func CreateDeploymentObject(namespace, queueName string) *appsv1.Deployment
- func CreateNamespaceObject(name, queueName string) *corev1.Namespace
- func CreateNonPreemptiblePriorityClass(ctx context.Context, client *kubernetes.Clientset) (string, error)
- func CreatePersistentVolumeClaimObject(name string, storageClassName string, quantity resource.Quantity) *v1.PersistentVolumeClaim
- func CreatePersistentVolumeObject(name string, path string) *v1.PersistentVolume
- func CreatePod(ctx context.Context, client *kubernetes.Clientset, pod *v1.Pod) (*v1.Pod, error)
- func CreatePodObject(podQueue *v2.Queue, resources v1.ResourceRequirements) *v1.Pod
- func CreatePodWithPodGroupReference(queue *v2.Queue, podGroupName string, resources v1.ResourceRequirements) *v1.Pod
- func CreatePreemptibleAndNonPriorityClass(ctx context.Context, client *kubernetes.Clientset) (string, string, error)
- func CreatePreemptiblePriorityClass(ctx context.Context, client *kubernetes.Clientset) (string, error)
- func CreatePriorityClass(name string, value int) *schedulingv1.PriorityClass
- func CreateReplicasetObject(namespace, queueName string) *v1.ReplicaSet
- func CreateResourceClaim(namespace, deviceClassName string, deviceCount int) *resourceapi.ResourceClaim
- func CreateResourceClaimTemplate(namespace, deviceClassName string, deviceCount int) *resourceapi.ResourceClaimTemplate
- func CreateRoleBindingObject(name string, clusterRoleRefName string, serviceAccountName string, ...) *rbacv1.RoleBinding
- func CreateStatefulSetObject(namespace, queueName string) *v1.StatefulSet
- func CreateStorageClass(name string) *storagev1.StorageClass
- func DefaultSecurityContext() *v1.SecurityContext
- func DeleteAllConfigMapsInNamespace(ctx context.Context, client runtimeClient.Client, namespace string) error
- func DeleteAllE2EPriorityClasses(ctx context.Context, client runtimeClient.WithWatch) error
- func DeleteAllJobsInNamespace(ctx context.Context, client client.Client, namespace string) error
- func DeleteAllPersistentVolumes(ctx context.Context, k8sClient client.Client) error
- func DeleteAllPodsInNamespace(ctx context.Context, client runtimeClient.Client, namespace string) error
- func DeleteAllStorageClasses(ctx context.Context, k8sClient client.Client) error
- func DeleteAllStorageObjects(ctx context.Context, k8sClient client.Client) error
- func DeleteJob(ctx context.Context, client *kubernetes.Clientset, job *batchv1.Job)
- func DeleteNamespace(ctx context.Context, kubeClient *kubernetes.Clientset, namespace string) error
- func FindNodeWithEnoughGPUs(ctx context.Context, client runtimeClient.Client, numFreeGPUs int64) *corev1.Node
- func FindNodeWithNoGPU(ctx context.Context, client runtimeClient.Client) *corev1.Node
- func FindNodesWithEnoughGPUs(ctx context.Context, client runtimeClient.Client, numFreeGPUs int64) []*corev1.Node
- func FindNodesWithExactGPUs(ctx context.Context, client runtimeClient.Client, numFreeGPUs int64) []*corev1.Node
- func GetCSICapacity(ctx context.Context, k8sClient client.Client, ...) (storageCapacity *storagev1.CSIStorageCapacity, err error)
- func GetE2ENamespaces(ctx context.Context, kubeClient *kubernetes.Clientset) (*corev1.NamespaceList, error)
- func GetJobPods(ctx context.Context, client *kubernetes.Clientset, job *batchv1.Job) []v1.Pod
- func GetNodeGpuDeviceCount(ctx context.Context, client runtimeClient.Client, nodeName string) int64
- func GetNodeGpuDeviceMemory(ctx context.Context, client runtimeClient.Client, nodeName string) int64
- func GetPod(ctx context.Context, client *kubernetes.Clientset, namespace string, ...) (*v1.Pod, error)
- func GetPodLogs(ctx context.Context, client *kubernetes.Clientset, namespace string, ...) (string, error)
- func GetPodNodeAffinitySelector(pod *v1.Pod) *v1.NodeSelector
- func IsPodEnded(pod *v1.Pod) bool
- func IsPodFailed(pod *v1.Pod) bool
- func IsPodReady(pod *v1.Pod) bool
- func IsPodRunning(pod *v1.Pod) bool
- func IsPodScheduled(pod *v1.Pod) bool
- func IsPodSucceeded(pod *v1.Pod) bool
- func IsPodUnschedulable(pod *v1.Pod) bool
- func LabelNode(ctx context.Context, client kubernetes.Interface, node *corev1.Node, ...) error
- func NodeAffinity(nodeName string, operator v1.NodeSelectorOperator) *v1.Affinity
- func UnLabelNode(ctx context.Context, client kubernetes.Interface, node *corev1.Node, ...) error
- type TestTopologyData
Constants ¶
const ( TestZoneLabelKey = "e2e-topology-label/zone" TestRackLabelKey = "e2e-topology-label/rack" NodeNameLabelKey = "kubernetes.io/hostname" )
const BatchJobAppLabel = "batch-job-app-name"
const CronJobAppLabel = "cron-job-app-name"
const DeploymentAppLabel = "deployment-app-name"
const (
PodGroupLabelName = "pod-group-name"
)
const ReplicaSetAppLabel = "replicaset-app-name"
const StatefulSetAppLabel = "stateful-set-app-name"
Variables ¶
This section is empty.
Functions ¶
func AssignNodesToTestTopology ¶ added in v0.8.3
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 CreateCronJobObject ¶
func CreateDeploymentObject ¶
func CreateDeploymentObject(namespace, queueName string) *appsv1.Deployment
func CreateNamespaceObject ¶
func CreatePersistentVolumeObject ¶
func CreatePersistentVolumeObject(name string, path string) *v1.PersistentVolume
func CreatePodObject ¶
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 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 DeleteAllE2EPriorityClasses ¶
func DeleteAllE2EPriorityClasses(ctx context.Context, client runtimeClient.WithWatch) error
func DeleteAllStorageClasses ¶
func DeleteAllStorageObjects ¶
func DeleteNamespace ¶
func FindNodeWithEnoughGPUs ¶
func FindNodeWithNoGPU ¶
func FindNodesWithEnoughGPUs ¶
func FindNodesWithExactGPUs ¶ added in v0.4.11
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 GetNodeGpuDeviceCount ¶
func GetNodeGpuDeviceMemory ¶
func GetPodLogs ¶
func GetPodNodeAffinitySelector ¶
func GetPodNodeAffinitySelector(pod *v1.Pod) *v1.NodeSelector
func IsPodEnded ¶
func IsPodFailed ¶
func IsPodReady ¶
func IsPodRunning ¶
func IsPodScheduled ¶
func IsPodSucceeded ¶
func IsPodUnschedulable ¶
func NodeAffinity ¶
func NodeAffinity(nodeName string, operator v1.NodeSelectorOperator) *v1.Affinity
func UnLabelNode ¶
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)