diff --git a/connectivity/check/deployment.go b/connectivity/check/deployment.go index 91b186346d..219247d00c 100644 --- a/connectivity/check/deployment.go +++ b/connectivity/check/deployment.go @@ -1121,12 +1121,6 @@ func (ct *ConnectivityTest) validateDeployment(ctx context.Context) error { return fmt.Errorf("unable to list perf pods: %w", err) } for _, perfPod := range perfPods.Items { - // Individual endpoints will not be created for pods using node's network stack - if !perfPod.Spec.HostNetwork { - if err := WaitForCiliumEndpoint(ctx, ct, ct.clients.src, ct.Params().TestNamespace, perfPod.Name); err != nil { - return err - } - } _, hasLabel := perfPod.GetLabels()["server"] if hasLabel { ct.perfServerPod = append(ct.perfServerPod, Pod{ @@ -1157,10 +1151,6 @@ func (ct *ConnectivityTest) validateDeployment(ctx context.Context) error { } for _, pod := range clientPods.Items { - if err := WaitForCiliumEndpoint(ctx, ct, ct.clients.src, ct.Params().TestNamespace, pod.Name); err != nil { - return err - } - if strings.Contains(pod.Name, clientCPDeployment) { ct.clientCPPods[pod.Name] = Pod{ K8sClient: ct.client, @@ -1244,10 +1234,6 @@ func (ct *ConnectivityTest) validateDeployment(ctx context.Context) error { return fmt.Errorf("unable to list echo pods: %w", err) } for _, echoPod := range echoPods.Items { - if err := WaitForCiliumEndpoint(ctx, ct, client, echoPod.GetNamespace(), echoPod.GetName()); err != nil { - return err - } - ct.echoPods[echoPod.Name] = Pod{ K8sClient: client, Pod: echoPod.DeepCopy(), diff --git a/connectivity/check/wait.go b/connectivity/check/wait.go index e1f0c905b2..b2774b3f68 100644 --- a/connectivity/check/wait.go +++ b/connectivity/check/wait.go @@ -15,7 +15,6 @@ import ( "github.com/cilium/cilium/api/v1/models" "golang.org/x/exp/slices" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "github.com/cilium/cilium-cli/defaults" "github.com/cilium/cilium-cli/k8s" @@ -52,29 +51,6 @@ func WaitForDeployment(ctx context.Context, log Logger, client *k8s.Client, name } } -// WaitForCiliumEndpoint waits until the specified cilium endpoint gets created. -func WaitForCiliumEndpoint(ctx context.Context, log Logger, client *k8s.Client, namespace, name string) error { - log.Logf("⌛ [%s] Waiting for CiliumEndpoint for pod %s/%s to appear...", client.ClusterName(), namespace, name) - - ctx, cancel := context.WithTimeout(ctx, ShortTimeout) - defer cancel() - for { - _, err := client.GetCiliumEndpoint(ctx, namespace, name, metav1.GetOptions{}) - if err == nil { - return nil - } - - log.Debugf("[%s] Error retrieving CiliumEndpoint for pod %s/%s: %s", client.ClusterName(), namespace, name, err) - - select { - case <-time.After(PollInterval): - case <-ctx.Done(): - return fmt.Errorf("timeout reached waiting for CiliumEndpoint %s/%s to appear (last error: %w)", - namespace, name, err) - } - } -} - // WaitForPodDNS waits until src can query the DNS server on dst successfully. func WaitForPodDNS(ctx context.Context, log Logger, src, dst Pod) error { log.Logf("⌛ [%s] Waiting for pod %s to reach DNS server on %s pod...",