diff --git a/pkg/controller/election.go b/pkg/controller/election.go index c68c9a0b940..ab6effffa39 100644 --- a/pkg/controller/election.go +++ b/pkg/controller/election.go @@ -56,7 +56,7 @@ func (c *Controller) leaderElection() { klog.Info("waiting for becoming a leader") flag = true } - time.Sleep(5 * time.Second) + time.Sleep(1 * time.Second) } } diff --git a/pkg/controller/gc.go b/pkg/controller/gc.go index 12e543661ef..49a2455cadc 100644 --- a/pkg/controller/gc.go +++ b/pkg/controller/gc.go @@ -3,15 +3,13 @@ package controller import ( "context" "fmt" - "strings" - "time" - corev1 "k8s.io/api/core/v1" k8serrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/types" "k8s.io/klog/v2" + "strings" kubeovnv1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" "github.com/kubeovn/kube-ovn/pkg/ovs" @@ -219,7 +217,6 @@ func (c *Controller) gcLogicalSwitchPort() error { if err := c.markAndCleanLSP(); err != nil { return err } - time.Sleep(3 * time.Second) return c.markAndCleanLSP() }