Skip to content

Commit

Permalink
fix: watch will break if timeout is set
Browse files Browse the repository at this point in the history
  • Loading branch information
oilbeater committed Oct 18, 2019
1 parent 8d6588b commit f970615
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
4 changes: 1 addition & 3 deletions pkg/controller/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@ package controller

import (
"flag"
"github.com/alauda/kube-ovn/pkg/util"
"os"
"time"

clientset "github.com/alauda/kube-ovn/pkg/client/clientset/versioned"
"github.com/alauda/kube-ovn/pkg/util"
"github.com/spf13/pflag"
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/rest"
Expand Down Expand Up @@ -156,7 +155,6 @@ func (config *Configuration) initKubeClient() error {
return err
}
}
cfg.Timeout = 15 * time.Second
kubeClient, err := kubernetes.NewForConfig(cfg)
if err != nil {
klog.Errorf("init kubernetes client failed %v", err)
Expand Down
5 changes: 1 addition & 4 deletions pkg/daemon/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,12 @@ import (
"os/exec"
"strings"
"syscall"
"time"

clientset "github.com/alauda/kube-ovn/pkg/client/clientset/versioned"
"github.com/alauda/kube-ovn/pkg/util"
"github.com/sirupsen/logrus"
"github.com/spf13/pflag"
"github.com/vishvananda/netlink"

clientset "github.com/alauda/kube-ovn/pkg/client/clientset/versioned"
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/rest"
"k8s.io/client-go/tools/clientcmd"
Expand Down Expand Up @@ -146,7 +144,6 @@ func (config *Configuration) initKubeClient() error {
return err
}
}
cfg.Timeout = 15 * time.Second

kubeClient, err := kubernetes.NewForConfig(cfg)
if err != nil {
Expand Down

0 comments on commit f970615

Please sign in to comment.