11/*
2- * SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+ * SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
33 * SPDX-License-Identifier: Apache-2.0
44 *
55 * Licensed under the Apache License, Version 2.0 (the "License");
@@ -48,33 +48,30 @@ var _ = Describe("GPU Device Plugin", Ordered, Label("gpu", "e2e", "device-plugi
4848 diagnosticsCollector * diagnostics.Diagnostic
4949 )
5050
51- defaultCollectorObjects : = []string {
51+ collectLogsFrom = []string {
5252 "pods" ,
5353 "nodes" ,
5454 "namespaces" ,
5555 "deployments" ,
5656 "daemonsets" ,
5757 "jobs" ,
5858 }
59+ if CollectLogsFrom != "" && CollectLogsFrom != "default" {
60+ collectLogsFrom = strings .Split (CollectLogsFrom , "," )
61+ }
5962
6063 values := helmValues.Options {
6164 Values : []string {
6265 fmt .Sprintf ("image.repository=%s" , ImageRepo ),
6366 fmt .Sprintf ("image.tag=%s" , ImageTag ),
6467 fmt .Sprintf ("image.pullPolicy=%s" , ImagePullPolicy ),
6568 "devicePlugin.enabled=true" ,
66- // We need to make affinity is none if not deploying NFD/GFD
69+ // We need to make affinity null, if not deploying NFD/GFD
6770 // test will fail if not run on a GPU node
6871 "affinity=" ,
6972 },
7073 }
7174
72- // check Collector objects
73- collectLogsFrom = defaultCollectorObjects
74- if CollectLogsFrom != "" && CollectLogsFrom != "default" {
75- collectLogsFrom = strings .Split (CollectLogsFrom , "," )
76- }
77-
7875 BeforeAll (func (ctx SpecContext ) {
7976 // Create clients for apiextensions and our CRD api
8077 helmReleaseName = "nvdp-e2e-test-" + randomSuffix ()
@@ -97,7 +94,7 @@ var _ = Describe("GPU Device Plugin", Ordered, Label("gpu", "e2e", "device-plugi
9794 // Note: DaemonSet names are dynamically generated with the Helm release prefix,
9895 // so we wait for all DaemonSets in the namespace rather than specific names
9996 By ("Waiting for all DaemonSets to be ready" )
100- err = internal .WaitForAllDaemonSetsReady (ctx , clientSet , testNamespace .Name )
97+ err = internal .WaitForDaemonSetsReady (ctx , clientSet , testNamespace .Name , "app.kubernetes.io/name=nvidia-device-plugin" )
10198 Expect (err ).NotTo (HaveOccurred ())
10299 })
103100
0 commit comments