@@ -123,7 +123,7 @@ func runDevicePlugin(ctx context.Context, fmw *framework.Framework, pluginKustom
123
123
ginkgo .By ("deploying mappings" )
124
124
e2ekubectl .RunKubectlOrDie (fmw .Namespace .Name , "apply" , "-f" , mappingsCollectionPath )
125
125
126
- waitForPod (ctx , fmw , "intel-fpga-plugin" )
126
+ waitForPluginAndWebhook (ctx , fmw )
127
127
128
128
resource := v1 .ResourceName (nodeResource )
129
129
@@ -189,11 +189,11 @@ func createPod(ctx context.Context, fmw *framework.Framework, name string, resou
189
189
return pod
190
190
}
191
191
192
- func waitForPod (ctx context.Context , fmw * framework.Framework , name string ) {
193
- ginkgo .By (fmt . Sprintf ( "waiting for %s availability" , name ) )
192
+ func waitForPluginAndWebhook (ctx context.Context , fmw * framework.Framework ) {
193
+ ginkgo .By ("waiting for intel-fpga-plugin availability" )
194
194
195
195
podList , err := e2epod .WaitForPodsWithLabelRunningReady (ctx , fmw .ClientSet , fmw .Namespace .Name ,
196
- labels.Set {"app" : name }.AsSelector (), 1 , 100 * time .Second )
196
+ labels.Set {"app" : "intel-fpga-plugin" }.AsSelector (), 1 , 100 * time .Second )
197
197
if err != nil {
198
198
e2edebug .DumpAllNamespaceInfo (ctx , fmw .ClientSet , fmw .Namespace .Name )
199
199
e2ekubectl .LogFailedContainers (ctx , fmw .ClientSet , fmw .Namespace .Name , framework .Logf )
@@ -205,4 +205,16 @@ func waitForPod(ctx context.Context, fmw *framework.Framework, name string) {
205
205
if err = utils .TestPodsFileSystemInfo (podList .Items ); err != nil {
206
206
framework .Failf ("container filesystem info checks failed: %v" , err )
207
207
}
208
+
209
+ ginkgo .By ("waiting for webhook availability" )
210
+
211
+ _ , err = e2epod .WaitForPodsWithLabelRunningReady (ctx , fmw .ClientSet , fmw .Namespace .Name ,
212
+ labels.Set {"control-plane" : "controller-manager" }.AsSelector (), 1 , 100 * time .Second )
213
+ if err != nil {
214
+ e2edebug .DumpAllNamespaceInfo (ctx , fmw .ClientSet , fmw .Namespace .Name )
215
+ e2ekubectl .LogFailedContainers (ctx , fmw .ClientSet , fmw .Namespace .Name , framework .Logf )
216
+ framework .Failf ("unable to wait for all pods to be running and ready: %v" , err )
217
+ }
218
+
219
+ ginkgo .By ("all pods found" )
208
220
}
0 commit comments