e2e

package
v0.0.0-...-5d6b406 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2026 License: Apache-2.0 Imports: 65 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// CoreTestPriority is the test priority for the "DPF System tests - Core" test suite.
	CoreTestPriority = 101
	// SDNTestPriority is the test priority for the "DPF System tests - SDN" test suite.
	SDNTestPriority = 100
)

Test priorities are defined below. these are used for specific test specs to ensure they are run in the correct order. for tests which do not specify a priority, ginkgo will will assign a default priority of 0. test specs with a higher priority will run first. for more information, see: https://onsi.github.io/ginkgo/#prioritizing-specs in most cases, assigning a specific test priority for a test should not be needed.

View Source
const (
	// NodeUnschedulableTaintKey is the well known taint key that indicates a node is unschedulable, typically used when
	// draining a node
	NodeUnschedulableTaintKey = "node.kubernetes.io/unschedulable"
)

Variables

View Source
var CleanupScope = cleanup.CleanupLabels

CleanupScope is an alias for cleanup.CleanupLabels for ease of use

View Source
var Domain = TestDomain{
	DPFSystem:            "DPFSystem",
	Scale:                "SCALE",
	SDN:                  "SDN",
	SNAP:                 "SNAP",
	Provisioning:         "Provisioning",
	RequiresNodes:        "RequiresNodes",
	L2Connectivity:       "L2Connectivity",
	DPFUpgrade:           "DPFUpgrade",
	DPFUpgradeValidation: "DPFUpgradeValidation",
	ExternalTest:         "ExternalTest",
	OVNKPrimary:          "OVNKPrimary",
	OVNKHBN:              "OVNKHBN",
	DPFVPCOVN:            "DPFVPCOVN",
	MultiDPUCluster:      "MultiDPUCluster",
	ZeroTrust:            "ZeroTrust",
}

Domain is the global instance of test label domains

Functions

func BeforeProvisioning

func BeforeProvisioning(ctx context.Context, input *systemTestInput)

func CopySecretToNamespace

func CopySecretToNamespace(ctx context.Context, c client.Client, secretName string, sourceNamespace, targetNamespace string, targetNamespaceLabels map[string]string)

CopySecretToNamespace copies a secret from one namespace to another If the source secret doesn't exist, does nothing (nothing to copy) Always set's the label "dpu.nvidia.com/image-pull-secret" to "" in the target namespace to ensure reconciliation in the DPU cluster

func CreateDPUDiscovery

func CreateDPUDiscovery(ctx context.Context, input DeployDPFSystemComponentsInput)

CreateDPUDiscovery verifies no worker nodes and no DPUDevices are in the host cluster. Creates DPUDiscovery and verifies DPUDevices were found and added.

func CreateProvisioningDPUCluster

func CreateProvisioningDPUCluster(ctx context.Context, input *systemTestInput)

func CreateProvisioningDPUSet

func CreateProvisioningDPUSet(ctx context.Context, input *systemTestInput)

func DeleteDPFOperatorConfig

func DeleteDPFOperatorConfig(ctx context.Context, testClient client.Client)

func DeleteProvisioning

func DeleteProvisioning(ctx context.Context, input *systemTestInput)

func DeployDPFSystemComponents

func DeployDPFSystemComponents(ctx context.Context, input DeployDPFSystemComponentsInput)

DeployDPFSystemComponents creates the operatorConfig and some dependencies and checks that the system components are deployed from the operator. 1) Ensures the DPF Operator is running and ready 2) Creates a PersistentVolumeClaim for the Provisioning controller 3) Creates ImagePullSecrets which are tested as part of the e2e flow (note these are fake and could possibly be replaced by real ones) 4) Creates the operatorConfig for the test 5) Ensures the DPF System components - including DPUServices - have been deployed.

func EventuallyCheckReadyStatusCondition

func EventuallyCheckReadyStatusCondition(ctx context.Context, client client.Client, obj client.Object, timeout time.Duration)

EventuallyCheckReadyStatusCondition checks for the Ready condition on any object having a Status.Conditions[...].Type == "Ready" field It uses Gomega matchers to validate the condition

func ProcessDPUNodeMaintenanceHold

func ProcessDPUNodeMaintenanceHold(ctx context.Context, input ProvisionDPUClustersInput)

ProcessDPUNodeMaintenanceHold waits for DPUNodeMaintenance CRs to have the hold annotation set to "true" and then patches them to "false" to allow DPU provisioning to continue. This simulates an external system completing the node effect in a non-K8s environment.

func ProvisionBFBAndDPUFlavor

func ProvisionBFBAndDPUFlavor(ctx context.Context, input ProvisionDPUClustersInput)

ProvisionBFBAndDPUFlavor creates the BFB and optionally the DPUFlavor resources

func ProvisionDPUClusters

func ProvisionDPUClusters(ctx context.Context, input ProvisionDPUClustersInput)

ProvisionDPUClusters provisions DPUClusters.

func ProvisionDPUDeploymentWithEachDPUJoiningADifferentDPUCluster

func ProvisionDPUDeploymentWithEachDPUJoiningADifferentDPUCluster(ctx context.Context, input *systemTestInput)

ProvisionDPUDeploymentWithEachDPUJoiningADifferentDPUCluster creates a DPUDeployment where each DPU joins a different cluster

func ProvisionDPUSet

func ProvisionDPUSet(ctx context.Context, input ProvisionDPUClustersInput)

ProvisionDPUSet DPUSet that will provision DPUs in the background if the environment has such DPUs. It doesn't check whether the DPUs become ready intentionally to allow for subsequent tests to be executed in the meantime.

func RebootAndVerifyDPU

func RebootAndVerifyDPU(ctx context.Context, input ProvisionDPUClustersInput)

RebootAndVerifyDPU waits and verifies that the DPUs expecting reboot, triggers node and dpu reboot via power cycle here when expected condition met. In addition removes annotation from rebooted node after the reboot is finished. applies to ZeroTrust only

func RebootHostByScript

func RebootHostByScript(rebootHostScript string, hostName string) error

func ValidateDPFOperatorBaseConfiguration

func ValidateDPFOperatorBaseConfiguration(ctx context.Context, input *systemTestInput)

ValidateDPFOperatorBaseConfiguration verifies that DPFOperatorConfiguration ContainerComponentConfiguration options work. It changes the images for all system components to arbitrary values, checks that the changes have propagated and then changes them back to their default versions.

func ValidateDPFOperatorConfigCleanupPrerequisites

func ValidateDPFOperatorConfigCleanupPrerequisites(ctx context.Context, input *systemTestInput)

ValidateDPFOperatorConfigCleanupPrerequisites this function ensures that the prerequisite objects exist before removing the DPFOperatorConfig to ensure that we cover edge cases.

func ValidateDPFOperatorFlannelPodCIDRChange

func ValidateDPFOperatorFlannelPodCIDRChange(ctx context.Context, input *systemTestInput)

func ValidateDPFOperatorKubernetesAPIServerVIPAndPort

func ValidateDPFOperatorKubernetesAPIServerVIPAndPort(ctx context.Context, input *systemTestInput)

ValidateDPFOperatorKubernetesAPIServerVIPAndPort validates that the Kubernetes API Server related variables are propagated correctly to the DMS pods.

func ValidateDPFOperatorMTUConfigurationChange

func ValidateDPFOperatorMTUConfigurationChange(ctx context.Context, input *systemTestInput)

func ValidateDPFOperatorMTUCurrentConfiguration

func ValidateDPFOperatorMTUCurrentConfiguration(ctx context.Context, input *systemTestInput)

func ValidateDPFOperatorMaxDPUParallelInstallations

func ValidateDPFOperatorMaxDPUParallelInstallations(ctx context.Context, input *systemTestInput)

func ValidateDPFOperatorPathConfiguration

func ValidateDPFOperatorPathConfiguration(ctx context.Context, input *systemTestInput)

func ValidateDPUDeploymentCreation

func ValidateDPUDeploymentCreation(ctx context.Context, input *systemTestInput)

func ValidateDPUDeploymentDPUServiceChainDisruptiveUpgradeDrain

func ValidateDPUDeploymentDPUServiceChainDisruptiveUpgradeDrain(ctx context.Context, input *systemTestInput)

ValidateDPUDeploymentDPUServiceChainDisruptiveUpgradeDrain validates that DPUDeployment disruptive upgrade flow for DPUServiceChain works as expected with drain node effect which is the recommendation for Host Trusted

func ValidateDPUDeploymentDPUServiceChainDisruptiveUpgradeHold

func ValidateDPUDeploymentDPUServiceChainDisruptiveUpgradeHold(ctx context.Context, input *systemTestInput)

ValidateDPUDeploymentDPUServiceChainDisruptiveUpgradeHold validates that DPUDeployment disruptive upgrade flow for DPUServiceChain works as expected with hold node effect which is the default recommendation for Zero Trust

func ValidateDPUDeploymentDPUServiceDisruptiveUpgradeDrain

func ValidateDPUDeploymentDPUServiceDisruptiveUpgradeDrain(ctx context.Context, input *systemTestInput)

ValidateDPUDeploymentDPUServiceDisruptiveUpgradeDrain validates that DPUDeployment disruptive upgrade flow for standard DPUService works as expected with node effect drain which is the recommendation for Host Trusted

func ValidateDPUDeploymentDPUServiceDisruptiveUpgradeHold

func ValidateDPUDeploymentDPUServiceDisruptiveUpgradeHold(ctx context.Context, input *systemTestInput)

ValidateDPUDeploymentDPUServiceDisruptiveUpgradeHold validates that DPUDeployment disruptive upgrade flow for standard DPUService works as expected with hold node effect which is the recommendation for Zero Trust

func ValidateDPUDeploymentDeletionWhileDisruptiveUpgradeInProgress

func ValidateDPUDeploymentDeletionWhileDisruptiveUpgradeInProgress(ctx context.Context, input *systemTestInput)

func ValidateDPUDeploymentFullCreation

func ValidateDPUDeploymentFullCreation(ctx context.Context, input *systemTestInput)

func ValidateDPUDeploymentInClusterDPUServiceDisruptiveUpgrade

func ValidateDPUDeploymentInClusterDPUServiceDisruptiveUpgrade(ctx context.Context, input *systemTestInput)

ValidateDPUDeploymentInClusterDPUServiceDisruptiveUpgrade validates that DPUDeployment disruptive upgrade flow for in-cluster DPUServices works as expected

func ValidateDPUDeploymentMetrics

func ValidateDPUDeploymentMetrics(ctx context.Context, input *systemTestInput)

func ValidateDPUServiceChainCreation

func ValidateDPUServiceChainCreation(ctx context.Context, input *systemTestInput)

func ValidateDPUServiceChainDeletion

func ValidateDPUServiceChainDeletion(ctx context.Context, input *systemTestInput)

func ValidateDPUServiceChainMetrics

func ValidateDPUServiceChainMetrics(ctx context.Context, input *systemTestInput)

func ValidateDPUServiceConfigPorts

func ValidateDPUServiceConfigPorts(ctx context.Context, input *systemTestInput)

func ValidateDPUServiceCreationAndMirroring

func ValidateDPUServiceCreationAndMirroring(ctx context.Context, input *systemTestInput)

ValidateDPUServiceCreationAndMirroring creates the DPUService in DPU cluster and host cluster. It verifies all triggered objects are created and ready. Can be used as s test precondition(ex: DPUServiceDeletion test) and as a separate test.

func ValidateDPUServiceCredentialRequestCreation

func ValidateDPUServiceCredentialRequestCreation(ctx context.Context, input *systemTestInput)

func ValidateDPUServiceCredentialRequestDeletion

func ValidateDPUServiceCredentialRequestDeletion(ctx context.Context, input *systemTestInput)

func ValidateDPUServiceCredentialRequestMetrics

func ValidateDPUServiceCredentialRequestMetrics(ctx context.Context, input *systemTestInput)

func ValidateDPUServiceDeletion

func ValidateDPUServiceDeletion(ctx context.Context, input *systemTestInput)

func ValidateDPUServiceIPAMCreationCidrSplit

func ValidateDPUServiceIPAMCreationCidrSplit(ctx context.Context, input *systemTestInput)

func ValidateDPUServiceIPAMCreationInvalid

func ValidateDPUServiceIPAMCreationInvalid(ctx context.Context, input *systemTestInput)

func ValidateDPUServiceIPAMCreationSubnetSplit

func ValidateDPUServiceIPAMCreationSubnetSplit(ctx context.Context, input *systemTestInput)

func ValidateDPUServiceIPAMDeletionCidrSplit

func ValidateDPUServiceIPAMDeletionCidrSplit(ctx context.Context, input *systemTestInput)

func ValidateDPUServiceIPAMInL2ModeForMultiDPUCluster

func ValidateDPUServiceIPAMInL2ModeForMultiDPUCluster(ctx context.Context, input *systemTestInput)

ValidateDPUServiceIPAMInL2ModeForMultiDPUCluster validates DPUService IPAM in L2 mode for multi-cluster setup

func ValidateDPUServiceIPAMInL3ModeForMultiDPUCluster

func ValidateDPUServiceIPAMInL3ModeForMultiDPUCluster(ctx context.Context, input *systemTestInput)

ValidateDPUServiceIPAMInL3ModeForMultiDPUCluster validates DPUService IPAM in L3 mode for multi-cluster setup

func ValidateDPUServiceIPAMMetrics

func ValidateDPUServiceIPAMMetrics(ctx context.Context, input *systemTestInput)

func ValidateDPUServiceIPAMMetricsDeletion

func ValidateDPUServiceIPAMMetricsDeletion(ctx context.Context, input *systemTestInput)

func ValidateDPUServiceInterfaceCreation

func ValidateDPUServiceInterfaceCreation(ctx context.Context, input *systemTestInput)

func ValidateDPUServiceMetrics

func ValidateDPUServiceMetrics(ctx context.Context, input *systemTestInput)

func ValidateDPUServiceNADConsumedByPod

func ValidateDPUServiceNADConsumedByPod(ctx context.Context, input *systemTestInput)

func ValidateDPUServiceNADMetrics

func ValidateDPUServiceNADMetrics(ctx context.Context)

func ValidateDPUServiceTemplateCreationNoAnnotations

func ValidateDPUServiceTemplateCreationNoAnnotations(ctx context.Context, input *systemTestInput)

func ValidateGeneralDPFMetrics

func ValidateGeneralDPFMetrics(ctx context.Context, input *systemTestInput)

func ValidateImagePullSecretsSync

func ValidateImagePullSecretsSync(ctx context.Context, input *systemTestInput)

func ValidateNodeSRIOVDevicePluginConfigValidCreate

func ValidateNodeSRIOVDevicePluginConfigValidCreate(ctx context.Context, input *systemTestInput)

ValidateNodeSRIOVDevicePluginConfigValidCreate creates a valid NodeSRIOVDevicePluginConfig and verifies it is accepted.

func ValidateNodeSRIOVDevicePluginManagement

func ValidateNodeSRIOVDevicePluginManagement(ctx context.Context, input *systemTestInput)

func ValidateNodeSRIOVDevicePluginWebhookRejectsInvalid

func ValidateNodeSRIOVDevicePluginWebhookRejectsInvalid(ctx context.Context, input *systemTestInput)

ValidateNodeSRIOVDevicePluginWebhookRejectsInvalid creates NodeSRIOVDevicePluginConfigs that violate cross-field validation rules and verifies that the validating webhook rejects them.

func VerifyClusterPods

func VerifyClusterPods(ctx context.Context, client client.Client, podSubstrToVerify []string)

func VerifyDPFOperatorConfigReady

func VerifyDPFOperatorConfigReady(ctx context.Context, kclient client.Client, timeout time.Duration)

VerifyDPFOperatorConfigReady waits and verifies if the DPFOperatorConfig is ready.

func VerifyDPUClusterWithNodes

func VerifyDPUClusterWithNodes(ctx context.Context, input ProvisionDPUClustersInput)

VerifyDPUClusterWithNodes waits and verifies if the DPUCluster has nodes meaning that there were DPUs provisioned. In addition verifies that the DPUs become ready. Note: Each DPU joins the DPU cluster as a separate K8s node, so the number of nodes in the DPU cluster equals totalDPUs.

func VerifyDPUDeploymentIsReady

func VerifyDPUDeploymentIsReady(ctx context.Context, input *systemTestInput)

func VerifyDPUKSMMetricsCollection

func VerifyDPUKSMMetricsCollection(ctx context.Context, input *systemTestInput)

func VerifyDPUPodToPodRDMATraffic

func VerifyDPUPodToPodRDMATraffic(ctx context.Context, input *systemTestInput)

VerifyDPUPodToPodRDMATraffic verifies that 2 Pods in the DPUCluster can run RDMA traffic between each other.

func VerifyDPUServiceTemplateCreationWithAnnotations

func VerifyDPUServiceTemplateCreationWithAnnotations(ctx context.Context, input *systemTestInput)

func VerifyDPUServiceTemplateMetrics

func VerifyDPUServiceTemplateMetrics(ctx context.Context, input *systemTestInput)

func VerifyDPUServicesDeployed

func VerifyDPUServicesDeployed(ctx context.Context, clusterClient client.Client, namespace string)

VerifyDPUServicesDeployed verifies that the expected DPUServices are deployed in the DPU cluster. This function can be reused across different test files (provisioning, system_setup, etc.)

func VerifyDeploymentUnderlyingObjectsCreated

func VerifyDeploymentUnderlyingObjectsCreated(ctx context.Context, g Gomega, testClient client.Client, dpuDeployment *dpuservicev1.DPUDeployment) bool

func VerifyHBNOnlyBadFlowRecovery

func VerifyHBNOnlyBadFlowRecovery(ctx context.Context, input *systemTestInput)

func VerifyHBNOnlyServiceFunctionChain

func VerifyHBNOnlyServiceFunctionChain(ctx context.Context, input *systemTestInput)

func VerifyHostKSMMetricsCollection

func VerifyHostKSMMetricsCollection(ctx context.Context)

func VerifyNodeProblemDetectorConditions

func VerifyNodeProblemDetectorConditions(ctx context.Context, input *systemTestInput)

func VerifyPerformancePodToPodDifferentNode

func VerifyPerformancePodToPodDifferentNode(ctx context.Context, input *systemTestInput, namespacePrefix string)

VerifyPerformancePodToPodDifferentNode verifies performance between pods on different nodes

func VerifyPerformancePodToPodSameNode

func VerifyPerformancePodToPodSameNode(ctx context.Context, input *systemTestInput, namespacePrefix string)

VerifyPerformancePodToPodSameNode verifies performance between pods on the same node

func VerifyPlainServiceFunctionChain

func VerifyPlainServiceFunctionChain(ctx context.Context, input *systemTestInput)

func VerifyProvisioning

func VerifyProvisioning(ctx context.Context, input *systemTestInput)

func VerifyServiceMTUOnDPUPods

func VerifyServiceMTUOnDPUPods(ctx context.Context, input *systemTestInput)

func WaitForOVNKHBNDeploymentReady

func WaitForOVNKHBNDeploymentReady(ctx context.Context, input *systemTestInput)

Types

type ByTracker

type ByTracker struct {
	// contains filtered or unexported fields
}

ByTracker tracks Ginkgo By() statements to ensure they are only printed once

func NewByTracker

func NewByTracker() *ByTracker

NewByTracker creates a new ByTracker instance

func (*ByTracker) By

func (b *ByTracker) By(key string, format string, args ...interface{})

By ensures a By() statement is only printed once for a given key

type DPUDeploymentNodesInfo

type DPUDeploymentNodesInfo struct {
	// contains filtered or unexported fields
}

DPUDeploymentNodesInfo holds information about target nodes and DPUNodes

type DeployDPFSystemComponentsInput

type DeployDPFSystemComponentsInput struct {
	ProvisioningControllerPVC *corev1.PersistentVolumeClaim
	ImagePullSecrets          []string
	// contains filtered or unexported fields
}

type ProvisionDPUClustersInput

type ProvisionDPUClustersInput struct {
	HostRebootScript string
	// contains filtered or unexported fields
}

type ProvisioningExpected

type ProvisioningExpected struct {
	DPUNodes      int
	DPUsPerNode   int
	TotalDPUs     int
	DPUClusters   int
	DPUSets       int
	DPUFlavors    int
	BFBs          int
	Prerequisites int
	DPUServices   int
}

ProvisioningExpected holds all expected counts for provisioning tests

type TestDomain

type TestDomain struct {
	DPFSystem            string // DPFSystem test suite (e2e, provisioning-e2e)
	Scale                string // Scale test suite
	SDN                  string // SDN test suite
	SNAP                 string // SNAP test suite
	Provisioning         string // Provisioning test suite
	RequiresNodes        string // Tests that require at least 1 DPU to be provisioned
	L2Connectivity       string // Tests that require L2 connectivity between nodes
	DPFUpgrade           string // Upgrade test suite
	DPFUpgradeValidation string // Upgrade validation test suite
	ExternalTest         string // External test scripts (DPF precondition setup)
	OVNKPrimary          string // Tests that need OVNK as primary CNI
	OVNKHBN              string // Tests that need OVNK as primary CNI with HBN deployed alongside
	DPFVPCOVN            string // VPC OVN test suite
	MultiDPUCluster      string // Multi DPUCluster setup tests
	ZeroTrust            string // Zero Trust mode in DPFOperatorConfig on the BeforeSuite stage
}

TestDomain defines test label domains for categorizing e2e tests

type TestVPCConfig

type TestVPCConfig struct {
	Name               string
	Namespace          string
	Tenant             string
	VirtualNetworkName string
	Subnet             string
	Labels             map[string]string
}

TestVPCConfig holds VPC test configuration

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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