@@ -91,7 +91,7 @@ func installDriver(platform, goPath, pkgDir, stagingImage, stagingVersion, deplo
91
91
klog .Infof ("Waiting 5 minutes for the driver to start on Linux" )
92
92
time .Sleep (5 * time .Minute )
93
93
}
94
- out , err := exec .Command ("kubectl" , "describe" , "pods" , "-n" , driverNamespace ).CombinedOutput ()
94
+ out , err := exec .Command ("kubectl" , "describe" , "pods" , "-n" , getDriverNamespace () ).CombinedOutput ()
95
95
klog .Infof ("describe pods \n %s" , string (out ))
96
96
97
97
if err != nil {
@@ -169,13 +169,12 @@ func dumpDriverLogs() (context.CancelFunc, error) {
169
169
LogPathPrefix : filepath .Join (artifactsDir , "pd-csi-driver" ) + "/" ,
170
170
}
171
171
ctx , cancel := context .WithCancel (context .Background ())
172
- if err = podlogs .CopyAllLogs (ctx , client , driverNamespace , out ); err != nil {
172
+ if err = podlogs .CopyAllLogs (ctx , client , getDriverNamespace () , out ); err != nil {
173
173
return cancel , fmt .Errorf ("failed to start pod logger: %v" , err )
174
174
}
175
175
return cancel , nil
176
176
}
177
177
return nil , nil
178
-
179
178
}
180
179
181
180
// mergeArtifacts merges the results of doing multiple gingko runs, taking all junit files
@@ -194,3 +193,10 @@ func mergeArtifacts(subdirectories []string) error {
194
193
}
195
194
return MergeJUnit ("External Storage" , sourceDirs , filepath .Join (artifactsDir , "junit_pdcsi.xml" ))
196
195
}
196
+
197
+ func getDriverNamespace () string {
198
+ if * useGKEManagedDriver {
199
+ return managedDriverNamespace
200
+ }
201
+ return externalDriverNamespace
202
+ }
0 commit comments