@@ -427,8 +427,11 @@ var _ = SIGDescribe("AdmissionWebhook [Privileged:ClusterAdmin]", func() {
427
427
err := client .AdmissionregistrationV1 ().ValidatingWebhookConfigurations ().Delete (hook .Name , nil )
428
428
framework .ExpectNoError (err , "Deleting validating webhook configuration" )
429
429
}()
430
+
430
431
// ensure backend is ready before proceeding
431
- waitWebhookConfigurationReady (f )
432
+ err = waitWebhookConfigurationReady (f )
433
+ framework .ExpectNoError (err , "waiting for webhook configuration to be ready" )
434
+
432
435
ginkgo .By ("Creating a configMap that does not comply to the validation webhook rules" )
433
436
err = wait .PollImmediate (100 * time .Millisecond , 30 * time .Second , func () (bool , error ) {
434
437
cm := namedNonCompliantConfigMap (string (uuid .NewUUID ()), f )
@@ -520,8 +523,11 @@ var _ = SIGDescribe("AdmissionWebhook [Privileged:ClusterAdmin]", func() {
520
523
err := client .AdmissionregistrationV1 ().MutatingWebhookConfigurations ().Delete (hook .Name , nil )
521
524
framework .ExpectNoError (err , "Deleting mutating webhook configuration" )
522
525
}()
526
+
523
527
// ensure backend is ready before proceeding
524
- waitWebhookConfigurationReady (f )
528
+ err = waitWebhookConfigurationReady (f )
529
+ framework .ExpectNoError (err , "waiting for webhook configuration to be ready" )
530
+
525
531
hook , err = admissionClient .MutatingWebhookConfigurations ().Get (f .UniqueName , metav1.GetOptions {})
526
532
framework .ExpectNoError (err , "Getting mutating webhook configuration" )
527
533
ginkgo .By ("Updating a mutating webhook configuration's rules to not include the create operation" )
@@ -586,6 +592,7 @@ var _ = SIGDescribe("AdmissionWebhook [Privileged:ClusterAdmin]", func() {
586
592
},
587
593
Webhooks : []admissionregistrationv1.ValidatingWebhook {
588
594
newDenyConfigMapWebhookFixture (f , context , servicePort ),
595
+ newValidatingIsReadyWebhookFixture (f , context , servicePort ),
589
596
},
590
597
})
591
598
framework .ExpectNoError (err , "Creating validating webhook configuration" )
@@ -597,6 +604,10 @@ var _ = SIGDescribe("AdmissionWebhook [Privileged:ClusterAdmin]", func() {
597
604
framework .ExpectNoError (err , "Listing validating webhook configurations" )
598
605
framework .ExpectEqual (len (list .Items ), testListSize )
599
606
607
+ // ensure backend is ready before proceeding
608
+ err = waitWebhookConfigurationReady (f )
609
+ framework .ExpectNoError (err , "waiting for webhook configuration to be ready" )
610
+
600
611
ginkgo .By ("Creating a configMap that does not comply to the validation webhook rules" )
601
612
err = wait .PollImmediate (100 * time .Millisecond , 30 * time .Second , func () (bool , error ) {
602
613
cm := namedNonCompliantConfigMap (string (uuid .NewUUID ()), f )
@@ -655,6 +666,7 @@ var _ = SIGDescribe("AdmissionWebhook [Privileged:ClusterAdmin]", func() {
655
666
},
656
667
Webhooks : []admissionregistrationv1.MutatingWebhook {
657
668
newMutateConfigMapWebhookFixture (f , context , 1 , servicePort ),
669
+ newMutatingIsReadyWebhookFixture (f , context , servicePort ),
658
670
},
659
671
})
660
672
framework .ExpectNoError (err , "Creating mutating webhook configuration" )
@@ -666,6 +678,10 @@ var _ = SIGDescribe("AdmissionWebhook [Privileged:ClusterAdmin]", func() {
666
678
framework .ExpectNoError (err , "Listing mutating webhook configurations" )
667
679
framework .ExpectEqual (len (list .Items ), testListSize )
668
680
681
+ // ensure backend is ready before proceeding
682
+ err = waitWebhookConfigurationReady (f )
683
+ framework .ExpectNoError (err , "waiting for webhook configuration to be ready" )
684
+
669
685
ginkgo .By ("Creating a configMap that should be mutated" )
670
686
err = wait .PollImmediate (100 * time .Millisecond , 30 * time .Second , func () (bool , error ) {
671
687
cm := namedToBeMutatedConfigMap (string (uuid .NewUUID ()), f )
0 commit comments