@@ -344,6 +344,11 @@ var _ = Describe("AuthBridge Injection E2E", Ordered, func() {
344344 g .Expect (output ).NotTo (BeEmpty (), "webhook endpoint not yet populated" )
345345 }, 2 * time .Minute , 2 * time .Second ).Should (Succeed ())
346346
347+ By ("waiting for controller pod to be fully Ready" )
348+ Eventually (func () error {
349+ return utils .ProbeWebhookReady (controllerNamespace )
350+ }, 2 * time .Minute , 2 * time .Second ).Should (Succeed ())
351+
347352 By ("creating auth bridge test namespace" )
348353 cmd := exec .Command ("kubectl" , "create" , "ns" , authBridgeTestNamespace )
349354 _ , err := utils .Run (cmd )
@@ -696,6 +701,11 @@ var _ = Describe("AgentCard E2E", Ordered, func() {
696701 g .Expect (output ).NotTo (BeEmpty (), "webhook endpoint not yet populated" )
697702 }, 2 * time .Minute , 2 * time .Second ).Should (Succeed ())
698703
704+ By ("waiting for controller pod to be fully Ready" )
705+ Eventually (func () error {
706+ return utils .ProbeWebhookReady (controllerNamespace )
707+ }, 2 * time .Minute , 2 * time .Second ).Should (Succeed ())
708+
699709 By ("creating test namespace with labels" )
700710 cmd := exec .Command ("kubectl" , "create" , "ns" , testNamespace )
701711 _ , err := utils .Run (cmd )
@@ -1039,6 +1049,11 @@ rules:
10391049 g .Expect (output ).NotTo (BeEmpty (), "webhook endpoint not yet populated" )
10401050 }, 2 * time .Minute , 2 * time .Second ).Should (Succeed ())
10411051
1052+ By ("waiting for controller pod to be fully Ready" )
1053+ Eventually (func () error {
1054+ return utils .ProbeWebhookReady (controllerNamespace )
1055+ }, 2 * time .Minute , 2 * time .Second ).Should (Succeed ())
1056+
10421057 By ("creating test namespace" )
10431058 cmd := exec .Command ("kubectl" , "create" , "ns" , agentRuntimeTestNamespace )
10441059 _ , err := utils .Run (cmd )
@@ -1513,6 +1528,11 @@ rules:
15131528 g .Expect (output ).NotTo (BeEmpty (), "webhook endpoint not yet populated" )
15141529 }, 2 * time .Minute , 2 * time .Second ).Should (Succeed ())
15151530
1531+ By ("waiting for controller pod to be fully Ready" )
1532+ Eventually (func () error {
1533+ return utils .ProbeWebhookReady (controllerNamespace )
1534+ }, 2 * time .Minute , 2 * time .Second ).Should (Succeed ())
1535+
15161536 By ("setting KAGENTI_SPIRE_TRUST_DOMAIN env var" )
15171537 envCmd := exec .Command ("kubectl" , "set" , "env" , "deployment/" + controllerDeployment ,
15181538 "-n" , controllerNamespace , "KAGENTI_SPIRE_TRUST_DOMAIN=example.org" )
@@ -1974,6 +1994,11 @@ rules:
19741994 g .Expect (output ).NotTo (BeEmpty (), "webhook endpoint not yet populated" )
19751995 }, 2 * time .Minute , 2 * time .Second ).Should (Succeed ())
19761996
1997+ By ("waiting for controller pod to be fully Ready" )
1998+ Eventually (func () error {
1999+ return utils .ProbeWebhookReady (controllerNamespace )
2000+ }, 2 * time .Minute , 2 * time .Second ).Should (Succeed ())
2001+
19772002 By ("creating skill discovery test namespace" )
19782003 cmd := exec .Command ("kubectl" , "create" , "ns" , skillDiscoveryTestNamespace )
19792004 _ , err := utils .Run (cmd )
@@ -2134,6 +2159,11 @@ rules:
21342159 g .Expect (err ).NotTo (HaveOccurred ())
21352160 g .Expect (output ).NotTo (BeEmpty (), "webhook endpoint not yet populated" )
21362161 }, 2 * time .Minute , 2 * time .Second ).Should (Succeed ())
2162+
2163+ By ("waiting for controller pod to be fully Ready after restart" )
2164+ Eventually (func () error {
2165+ return utils .ProbeWebhookReady (controllerNamespace )
2166+ }, 2 * time .Minute , 2 * time .Second ).Should (Succeed ())
21372167 })
21382168
21392169 It ("should populate linkedSkills from annotation" , func () {
@@ -2438,6 +2468,11 @@ var _ = Describe("Istio Mesh Enrollment E2E", Ordered, func() {
24382468 g .Expect (output ).NotTo (BeEmpty (), "webhook endpoint not yet populated" )
24392469 }, 2 * time .Minute , 2 * time .Second ).Should (Succeed ())
24402470
2471+ By ("waiting for controller pod to be fully Ready" )
2472+ Eventually (func () error {
2473+ return utils .ProbeWebhookReady (controllerNamespace )
2474+ }, 2 * time .Minute , 2 * time .Second ).Should (Succeed ())
2475+
24412476 By ("creating test namespace" )
24422477 cmd := exec .Command ("kubectl" , "create" , "ns" , istioMeshTestNamespace )
24432478 _ , err := utils .Run (cmd )
0 commit comments