From 4bd4433248841dee26da4648c31702bd1006c55e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BE=84=E6=BD=AD?= Date: Wed, 20 Dec 2023 19:05:37 +0800 Subject: [PATCH] fix eureka service discovery not work in standalone mode (#714) --- registry/eureka/watcher.go | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/registry/eureka/watcher.go b/registry/eureka/watcher.go index 255069676..f1d67dce8 100644 --- a/registry/eureka/watcher.go +++ b/registry/eureka/watcher.go @@ -23,9 +23,7 @@ import ( "github.com/hudl/fargo" "istio.io/api/networking/v1alpha3" - versionedclient "istio.io/client-go/pkg/clientset/versioned" "istio.io/pkg/log" - ctrl "sigs.k8s.io/controller-runtime" apiv1 "github.com/alibaba/higress/api/networking/v1" "github.com/alibaba/higress/pkg/common" @@ -49,7 +47,6 @@ type watcher struct { cache memory.Cache mutex *sync.Mutex stop chan struct{} - istioClient *versionedclient.Clientset isStop bool updateCacheWhenEmpty bool @@ -70,18 +67,6 @@ func NewWatcher(cache memory.Cache, opts ...WatcherOption) (provider.Watcher, er stop: make(chan struct{}), } - config, err := ctrl.GetConfig() - if err != nil { - return nil, err - } - - ic, err := versionedclient.NewForConfig(config) - if err != nil { - log.Errorf("can not new istio client, err:%v", err) - return nil, err - } - w.istioClient = ic - w.fullRefreshIntervalLimit = DefaultFullRefreshIntervalLimit for _, opt := range opts {