Skip to content

Commit

Permalink
Revert "E2E: verify frrk8s daemonset is ready before tests"
Browse files Browse the repository at this point in the history
This reverts commit 6750d26.

Signed-off-by: karampok <[email protected]>
  • Loading branch information
karampok authored and fedepaol committed Aug 30, 2024
1 parent 79494a0 commit b1b2a5f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 27 deletions.
5 changes: 0 additions & 5 deletions e2etests/e2etest_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (

"github.com/metallb/frrk8stests/pkg/dump"
"github.com/metallb/frrk8stests/pkg/infra"
"github.com/metallb/frrk8stests/pkg/k8s"
"github.com/metallb/frrk8stests/pkg/k8sclient"
"github.com/metallb/frrk8stests/tests"
"github.com/onsi/ginkgo/v2"
Expand Down Expand Up @@ -87,10 +86,6 @@ var _ = ginkgo.BeforeSuite(func() {
}

tests.PrometheusNamespace = prometheusNamespace

h, err := k8s.FRRK8isDaemonSetReady(cs)
Expect(err).NotTo(HaveOccurred())
Expect(h).Should(BeTrue(), "frr-k8s daemonset should be ready before test")
})

var _ = ginkgo.AfterSuite(func() {
Expand Down
22 changes: 0 additions & 22 deletions e2etests/pkg/k8s/pods.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ package k8s

import (
"context"
"fmt"
"slices"
"time"

Expand Down Expand Up @@ -89,24 +88,3 @@ func podIsRunningAndReady(pod *v1.Pod) bool {

return true
}

func FRRK8isDaemonSetReady(clientset clientset.Interface) (bool, error) {

// common labels in helm, kustomize
l := "app.kubernetes.io/component=frr-k8s,app.kubernetes.io/name=frr-k8s"
dss, err := clientset.AppsV1().DaemonSets(FRRK8sNamespace).List(context.Background(), metav1.ListOptions{
LabelSelector: l,
})
if len(dss.Items) != 1 {
return false, fmt.Errorf("found more or less than single daemonset")
}

n := dss.Items[0].Name
ds, err := clientset.AppsV1().DaemonSets(FRRK8sNamespace).Get(context.Background(),
n, metav1.GetOptions{})
if err != nil {
return false, err
}

return ds.Status.DesiredNumberScheduled == ds.Status.NumberAvailable, nil
}

0 comments on commit b1b2a5f

Please sign in to comment.