@@ -123,7 +123,7 @@ func runDevicePlugin(ctx context.Context, fmw *framework.Framework, pluginKustom
123123 ginkgo .By ("deploying mappings" )
124124 e2ekubectl .RunKubectlOrDie (fmw .Namespace .Name , "apply" , "-f" , mappingsCollectionPath )
125125
126- waitForPod (ctx , fmw , "intel-fpga-plugin" )
126+ waitForPluginAndWebhook (ctx , fmw )
127127
128128 resource := v1 .ResourceName (nodeResource )
129129
@@ -189,11 +189,11 @@ func createPod(ctx context.Context, fmw *framework.Framework, name string, resou
189189 return pod
190190}
191191
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" )
194194
195195 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 )
197197 if err != nil {
198198 e2edebug .DumpAllNamespaceInfo (ctx , fmw .ClientSet , fmw .Namespace .Name )
199199 e2ekubectl .LogFailedContainers (ctx , fmw .ClientSet , fmw .Namespace .Name , framework .Logf )
@@ -205,4 +205,16 @@ func waitForPod(ctx context.Context, fmw *framework.Framework, name string) {
205205 if err = utils .TestPodsFileSystemInfo (podList .Items ); err != nil {
206206 framework .Failf ("container filesystem info checks failed: %v" , err )
207207 }
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" )
208220}
0 commit comments