Skip to content

Commit

Permalink
avoid cache reset every 1 minute by not using operator framework
Browse files Browse the repository at this point in the history
  • Loading branch information
grosser committed Sep 14, 2020
1 parent 334cab5 commit d75234d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/k8sapi/discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"k8s.io/apimachinery/pkg/util/runtime"
"k8s.io/apimachinery/pkg/util/wait"
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/rest"
"k8s.io/client-go/tools/cache"
"k8s.io/client-go/util/workqueue"

Expand Down Expand Up @@ -83,7 +84,7 @@ func NewController(clientset kubernetes.Interface) *Controller {

// CreateKubeClient creates a k8s client
func CreateKubeClient() (clientset.Interface, error) {
kubeClient := k8sclient.GetKubeClient()
kubeClient := rest.InClusterConfig()
// Informers don't seem to do a good job logging error messages when it
// can't reach the server, making debugging hard. This makes it easier to
// figure out if apiserver is configured incorrectly.
Expand Down

0 comments on commit d75234d

Please sign in to comment.