Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop cilium endpoint verification. #2205

Merged
merged 2 commits into from
Jan 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions connectivity/check/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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(),
Expand Down
24 changes: 0 additions & 24 deletions connectivity/check/wait.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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...",
Expand Down