@@ -73,7 +73,8 @@ const (
73
73
pdImagePlaceholder = "gke.gcr.io/gcp-compute-persistent-disk-csi-driver"
74
74
k8sInDockerBuildBinDir = "_output/dockerized/bin/linux/amd64"
75
75
k8sOutOfDockerBuildBinDir = "_output/bin"
76
- driverNamespace = "gce-pd-csi-driver"
76
+ externalDriverNamespace = "gce-pd-csi-driver"
77
+ managedDriverNamespace = "kube-system"
77
78
)
78
79
79
80
func init () {
@@ -335,7 +336,7 @@ func handle() error {
335
336
return fmt .Errorf ("failed to prepull images: %s, err: %v" , out , err )
336
337
}
337
338
time .Sleep (10 * time .Minute )
338
- out , err = exec .Command ("kubectl" , "describe" , "pods" , "-n" , driverNamespace ).CombinedOutput ()
339
+ out , err = exec .Command ("kubectl" , "describe" , "pods" , "-n" , getDriverNamespace () ).CombinedOutput ()
339
340
klog .Infof ("describe pods \n %s" , string (out ))
340
341
341
342
if err != nil {
@@ -357,18 +358,18 @@ func handle() error {
357
358
if err != nil {
358
359
return fmt .Errorf ("failed to install CSI Driver: %v" , err )
359
360
}
361
+ }
360
362
361
- // Dump all driver logs to the test artifacts
362
- cancel , err := dumpDriverLogs ()
363
- if err != nil {
364
- return fmt .Errorf ("failed to start driver logging: %v" , err )
365
- }
366
- defer func () {
367
- if cancel != nil {
368
- cancel ()
369
- }
370
- }()
363
+ // Dump all driver logs to the test artifacts
364
+ cancel , err := dumpDriverLogs ()
365
+ if err != nil {
366
+ return fmt .Errorf ("failed to start driver logging: %v" , err )
371
367
}
368
+ defer func () {
369
+ if cancel != nil {
370
+ cancel ()
371
+ }
372
+ }()
372
373
373
374
// For windows cluster, it has both Windows nodes and Linux nodes. Before triggering the tests, taint Linux nodes
374
375
// with NoSchedule to avoid test pods being scheduled on Linux. Need to do this step after driver is deployed.
@@ -395,7 +396,6 @@ func handle() error {
395
396
}
396
397
397
398
var cloudProviderArgs []string
398
- var err error
399
399
switch * deploymentStrat {
400
400
case "gke" :
401
401
cloudProviderArgs , err = getGKEKubeTestArgs (* gceZone , * gceRegion , * imageType )
0 commit comments