@@ -73,7 +73,8 @@ const (
7373 pdImagePlaceholder = "gke.gcr.io/gcp-compute-persistent-disk-csi-driver"
7474 k8sInDockerBuildBinDir = "_output/dockerized/bin/linux/amd64"
7575 k8sOutOfDockerBuildBinDir = "_output/bin"
76- driverNamespace = "gce-pd-csi-driver"
76+ externalDriverNamespace = "gce-pd-csi-driver"
77+ managedDriverNamespace = "kube-system"
7778)
7879
7980func init () {
@@ -335,7 +336,7 @@ func handle() error {
335336 return fmt .Errorf ("failed to prepull images: %s, err: %v" , out , err )
336337 }
337338 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 ()
339340 klog .Infof ("describe pods \n %s" , string (out ))
340341
341342 if err != nil {
@@ -357,18 +358,18 @@ func handle() error {
357358 if err != nil {
358359 return fmt .Errorf ("failed to install CSI Driver: %v" , err )
359360 }
361+ }
360362
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 )
371367 }
368+ defer func () {
369+ if cancel != nil {
370+ cancel ()
371+ }
372+ }()
372373
373374 // For windows cluster, it has both Windows nodes and Linux nodes. Before triggering the tests, taint Linux nodes
374375 // 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 {
395396 }
396397
397398 var cloudProviderArgs []string
398- var err error
399399 switch * deploymentStrat {
400400 case "gke" :
401401 cloudProviderArgs , err = getGKEKubeTestArgs (* gceZone , * gceRegion , * imageType )
0 commit comments