@@ -25,7 +25,6 @@ import (
2525 v1 "k8s.io/api/core/v1"
2626 metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2727 "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
28- "k8s.io/apimachinery/pkg/runtime/schema"
2928 "sigs.k8s.io/e2e-framework/klient"
3029 "sigs.k8s.io/e2e-framework/klient/k8s/resources"
3130 "sigs.k8s.io/e2e-framework/pkg/envconf"
@@ -49,13 +48,6 @@ const (
4948 VolcanoPodGroupAnnotation = "scheduling.k8s.io/group-name"
5049)
5150
52- // VolcanoPodGroupGVR is the GVR for Volcano PodGroups.
53- var VolcanoPodGroupGVR = schema.GroupVersionResource {
54- Group : "scheduling.volcano.sh" ,
55- Version : "v1beta1" ,
56- Resource : "podgroups" ,
57- }
58-
5951// PreflightTestContext holds state for preflight E2E tests.
6052type PreflightTestContext struct {
6153 TestNamespace string
@@ -180,59 +172,6 @@ func TeardownPreflightTest(
180172 return ctx
181173}
182174
183- // AssertPreflightConfigConfigMapExists checks that the preflight config
184- // ConfigMap exists and has config.yaml.
185- func AssertPreflightConfigConfigMapExists (
186- ctx context.Context , t * testing.T , client klient.Client ,
187- ) {
188- t .Helper ()
189-
190- var cm v1.ConfigMap
191-
192- err := client .Resources (NVSentinelNamespace ).Get (
193- ctx , PreflightConfigMapName , NVSentinelNamespace , & cm ,
194- )
195- require .NoError (t , err ,
196- "preflight config ConfigMap should exist when preflight is deployed" )
197- require .Contains (t , cm .Data , PreflightConfigKey ,
198- "ConfigMap %s/%s should contain %s" ,
199- cm .Namespace , cm .Name , PreflightConfigKey )
200- }
201-
202- // CreateGPUPodWithPreflight creates a GPU pod in the given namespace
203- // and schedules it on nodeName. Returns the pod name.
204- func CreateGPUPodWithPreflight (
205- ctx context.Context , t * testing.T , client klient.Client ,
206- namespace , nodeName string ,
207- ) string {
208- t .Helper ()
209-
210- pod := NewGPUPodSpec (namespace , 1 )
211- if nodeName != "" {
212- pod .Spec .NodeName = nodeName
213- }
214-
215- err := client .Resources ().Create (ctx , pod )
216- require .NoError (t , err , "create GPU pod" )
217- require .NotEmpty (t , pod .Name , "server should set pod name after create" )
218-
219- return pod .Name
220- }
221-
222- // GetPodAfterMutation fetches the pod from the server (after webhook mutation).
223- func GetPodAfterMutation (
224- ctx context.Context , client klient.Client , namespace , podName string ,
225- ) (* v1.Pod , error ) {
226- var pod v1.Pod
227-
228- err := client .Resources ().Get (ctx , podName , namespace , & pod )
229- if err != nil {
230- return nil , err
231- }
232-
233- return & pod , nil
234- }
235-
236175// WaitForPodInitContainerStatuses waits until at least one preflight init
237176// container has terminated (Completed or Error).
238177func WaitForPodInitContainerStatuses (
0 commit comments