Skip to content

Commit

Permalink
connectivity: only wait for daemonsets if needed
Browse files Browse the repository at this point in the history
The host-netns-non-cilium and host-netns daemonsets leveraged
by the connectivity tests are only deployed in specific situations.
Do not wait for them in other cases, as it blocks the tests.

Signed-off-by: Angelos Kolaitis <[email protected]>
  • Loading branch information
neoaggelos authored and tklauser committed Jan 17, 2024
1 parent 97257f4 commit c120c1f
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions connectivity/check/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -1329,15 +1329,18 @@ func (ct *ConnectivityTest) validateDeployment(ctx context.Context) error {
}

// The host-netns-non-cilium DaemonSet is created in the source cluster only, also in case of multi-cluster tests.
if err := WaitForDaemonSet(ctx, ct, ct.clients.src, ct.Params().TestNamespace, hostNetNSDeploymentNameNonCilium); err != nil {
return err
if !ct.params.SingleNode || ct.params.MultiCluster != "" {
if err := WaitForDaemonSet(ctx, ct, ct.clients.src, ct.Params().TestNamespace, hostNetNSDeploymentNameNonCilium); err != nil {
return err
}
}

for _, client := range ct.clients.clients() {
if err := WaitForDaemonSet(ctx, ct, client, ct.Params().TestNamespace, hostNetNSDeploymentName); err != nil {
return err
if !ct.params.SingleNode || ct.params.MultiCluster != "" {
if err := WaitForDaemonSet(ctx, ct, client, ct.Params().TestNamespace, hostNetNSDeploymentName); err != nil {
return err
}
}

hostNetNSPods, err := client.ListPods(ctx, ct.params.TestNamespace, metav1.ListOptions{LabelSelector: "kind=" + kindHostNetNS})
if err != nil {
return fmt.Errorf("unable to list host netns pods: %w", err)
Expand Down

0 comments on commit c120c1f

Please sign in to comment.