upgrade to istio 1.19 (#1211)

Co-authored-by: CH3CHO <ch3cho@qq.com>
Co-authored-by: rinfx <893383980@qq.com>
This commit is contained in:
澄潭
2024-08-26 09:51:47 +08:00
committed by GitHub
parent a2c2d1d521
commit f7a419770d
401 changed files with 21171 additions and 7255 deletions

View File

@@ -21,6 +21,7 @@ import (
"time"
"go.uber.org/atomic"
"istio.io/istio/pkg/cluster"
istiokube "istio.io/istio/pkg/kube"
apiExtensionsV1 "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1"
metaV1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -133,9 +134,9 @@ func NewFakeClient(objects ...runtime.Object) Client {
return c
}
func NewClient(clientConfig clientcmd.ClientConfig) (Client, error) {
func NewClient(clientConfig clientcmd.ClientConfig, cluster cluster.ID) (Client, error) {
var c client
istioClient, err := istiokube.NewClient(clientConfig)
istioClient, err := istiokube.NewClient(clientConfig, cluster)
if err != nil {
return nil, err
}
@@ -262,3 +263,9 @@ func CheckKIngressCRDExist(config *rest.Config) bool {
}
return false
}
// EnableCrdWatcher enables the CRD watcher on the client.
func EnableCrdWatcher(c Client) Client {
istiokube.EnableCrdWatcher(c.(*client).Client)
return c
}