Update istio reference to latest from main branch (#12847)

This commit is contained in:
Eric Van Norman 2023-03-06 09:38:45 -06:00 committed by GitHub
parent 8b3aae7f9e
commit d18ce3a976
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 23 additions and 28 deletions

8
go.mod
View File

@ -11,8 +11,8 @@ replace github.com/imdario/mergo => github.com/imdario/mergo v0.3.5
require (
github.com/pmezard/go-difflib v1.0.0
golang.org/x/sync v0.1.0
istio.io/istio v0.0.0-20230225221446-b70696bfe12b
istio.io/pkg v0.0.0-20230220143559-b49e87774e1e
istio.io/istio v0.0.0-20230306134445-1d4a80bb72a2
istio.io/pkg v0.0.0-20230302202707-0023da60c4c9
k8s.io/apimachinery v0.26.1
k8s.io/client-go v0.26.1
)
@ -49,7 +49,7 @@ require (
github.com/docker/docker v23.0.0-rc.2+incompatible // indirect
github.com/docker/docker-credential-helpers v0.7.0 // indirect
github.com/emicklei/go-restful/v3 v3.10.1 // indirect
github.com/envoyproxy/go-control-plane v0.11.1-0.20230215135000-8f0507a5ad09 // indirect
github.com/envoyproxy/go-control-plane v0.11.1-0.20230303230207-58bf12899b29 // indirect
github.com/envoyproxy/protoc-gen-validate v0.9.1 // indirect
github.com/evanphx/json-patch v5.6.0+incompatible // indirect
github.com/evanphx/json-patch/v5 v5.6.0 // indirect
@ -198,7 +198,7 @@ require (
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
helm.sh/helm/v3 v3.11.1 // indirect
istio.io/api v0.0.0-20230224174655-35782d263c2c // indirect
istio.io/api v0.0.0-20230302172406-582f573dde0c // indirect
istio.io/client-go v1.17.0-beta.2 // indirect
k8s.io/api v0.26.1 // indirect
k8s.io/apiextensions-apiserver v0.26.1 // indirect

16
go.sum
View File

@ -196,8 +196,8 @@ github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5y
github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ=
github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0=
github.com/envoyproxy/go-control-plane v0.11.1-0.20230215135000-8f0507a5ad09 h1:qsV9aB5R4VxEZzTzQFua0yxzGRCNGjoi3Jd6Iu8SQIM=
github.com/envoyproxy/go-control-plane v0.11.1-0.20230215135000-8f0507a5ad09/go.mod h1:84cjSkVxFD9Pi/gvI5AOq5NPhGsmS8oPsJLtCON6eK8=
github.com/envoyproxy/go-control-plane v0.11.1-0.20230303230207-58bf12899b29 h1:+t3zX82p+TDyNitThMQbCBKLFIzkU82hZMbTei9l8tg=
github.com/envoyproxy/go-control-plane v0.11.1-0.20230303230207-58bf12899b29/go.mod h1:84cjSkVxFD9Pi/gvI5AOq5NPhGsmS8oPsJLtCON6eK8=
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/envoyproxy/protoc-gen-validate v0.9.1 h1:PS7VIOgmSVhWUEeZwTe7z7zouA22Cr590PzXKbZHOVY=
github.com/envoyproxy/protoc-gen-validate v0.9.1/go.mod h1:OKNgG7TCp5pF4d6XftA0++PMirau2/yoOwVac3AbF2w=
@ -1283,14 +1283,14 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
istio.io/api v0.0.0-20230224174655-35782d263c2c h1:dX1Q/caMAIym1cb/CYzyBsQSFXeYbAz1P2keHzIJy4s=
istio.io/api v0.0.0-20230224174655-35782d263c2c/go.mod h1:owGDRg9uqMob8CN1gxaOzk6nJxnbT8wrP7PmggpJHHY=
istio.io/api v0.0.0-20230302172406-582f573dde0c h1:HpztAPlA75HMWQzDA9/BAbOdSPFkXdZwM9h3rxoMP5c=
istio.io/api v0.0.0-20230302172406-582f573dde0c/go.mod h1:q3bvmBQjuI+OKNn9693bhGq3Pk+rECjfs3OpPWInHY0=
istio.io/client-go v1.17.0-beta.2 h1:aPqMAblvgk+KCB+HLspaeIbJsr4EVEdUiksFi2mEoGE=
istio.io/client-go v1.17.0-beta.2/go.mod h1:G6/7TU1PNjUsACgb7oX4+CP+7CVQ6oPPxfFHoqSsE1M=
istio.io/istio v0.0.0-20230225221446-b70696bfe12b h1:EpYktyK9gbHu0DNysm97dQlIoN2rru34mqauFkILg/I=
istio.io/istio v0.0.0-20230225221446-b70696bfe12b/go.mod h1:UG7QasF2UHbC+jxPZIGwTXjILa+ruJNqwPFIacquVeI=
istio.io/pkg v0.0.0-20230220143559-b49e87774e1e h1:lFX0uHBidAbIAl9nD0RZeRQSO8wndikdm4WZlbWf4HM=
istio.io/pkg v0.0.0-20230220143559-b49e87774e1e/go.mod h1:Zg0jJwKNfGnlcyk6A30vXI5O+HkHN+VQoEX2T3QOK/s=
istio.io/istio v0.0.0-20230306134445-1d4a80bb72a2 h1:XeUccFJ1uSrlD2oNn6hYOp8zg7LKsWa03Pb+KXI3zX0=
istio.io/istio v0.0.0-20230306134445-1d4a80bb72a2/go.mod h1:7V5ba6jN0rTPpHU98tG6VnNWlV8qINrAFJxADKLt3W0=
istio.io/pkg v0.0.0-20230302202707-0023da60c4c9 h1:Sev/MB9yFBXS6GpN6xu5Jy0J+DsuXMkFO6cLYSPcxdM=
istio.io/pkg v0.0.0-20230302202707-0023da60c4c9/go.mod h1:Zg0jJwKNfGnlcyk6A30vXI5O+HkHN+VQoEX2T3QOK/s=
k8s.io/api v0.18.2/go.mod h1:SJCWI7OLzhZSvbY7U8zwNl9UA4o1fizoug34OV/2r78=
k8s.io/api v0.18.3/go.mod h1:UOaMwERbqJMfeeeHc8XJKawj4P9TgDRnViIqqBeH2QA=
k8s.io/api v0.18.4/go.mod h1:lOIQAKYgai1+vz9J7YcDZwC26Z0zQewYOGWdyIPUUQ4=

View File

@ -26,8 +26,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime/schema"
"istio.io/istio/pkg/config/schema/collection"
"istio.io/istio/pkg/config/schema/collections"
"istio.io/istio/pkg/config/schema/gvr"
"istio.io/istio/pkg/kube"
"istio.io/istio/pkg/test/scopes"
)
@ -190,43 +189,43 @@ func newClusterSnapshot(client kube.Client, contextName string) (ClusterSnapshot
nsSnapshot.IstioOperators = res
// DestinationRule
res = listResource(client, namespace, collections.IstioNetworkingV1Alpha3Destinationrules)
res = listResourceGVK(client, namespace, gvr.DestinationRule)
nsSnapshot.DestinationRules = res
// EnvoyFilter
res = listResource(client, namespace, collections.IstioNetworkingV1Alpha3Envoyfilters)
res = listResourceGVK(client, namespace, gvr.EnvoyFilter)
nsSnapshot.EnvoyFilters = res
// Gateway
res = listResource(client, namespace, collections.IstioNetworkingV1Alpha3Gateways)
res = listResourceGVK(client, namespace, gvr.Gateway)
nsSnapshot.Gateways = res
// ServiceEntry
res = listResource(client, namespace, collections.IstioNetworkingV1Alpha3Serviceentries)
res = listResourceGVK(client, namespace, gvr.ServiceEntry)
nsSnapshot.ServiceEntries = res
// Sidecar
res = listResource(client, namespace, collections.IstioNetworkingV1Alpha3Sidecars)
res = listResourceGVK(client, namespace, gvr.Sidecar)
nsSnapshot.Sidecars = res
// VirtualService
res = listResource(client, namespace, collections.IstioNetworkingV1Alpha3Virtualservices)
res = listResourceGVK(client, namespace, gvr.VirtualService)
nsSnapshot.VirtualServices = res
// WorkloadEntry
res = listResource(client, namespace, collections.IstioNetworkingV1Alpha3Workloadentries)
res = listResourceGVK(client, namespace, gvr.WorkloadEntry)
nsSnapshot.WorkloadEntries = res
// AuthorizationPolicy
res = listResource(client, namespace, collections.IstioSecurityV1Beta1Authorizationpolicies)
res = listResourceGVK(client, namespace, gvr.AuthorizationPolicy)
nsSnapshot.AuthorizationPolicies = res
// PeerAuthentication
res = listResource(client, namespace, collections.IstioSecurityV1Beta1Peerauthentications)
res = listResourceGVK(client, namespace, gvr.PeerAuthentication)
nsSnapshot.PeerAuthentications = res
// RequestAuthentications
res = listResource(client, namespace, collections.IstioSecurityV1Beta1Requestauthentications)
res = listResourceGVK(client, namespace, gvr.RequestAuthentication)
nsSnapshot.RequestAuthentications = res
// Add the namespace snapshot to the map.
@ -276,10 +275,6 @@ func newClusterSnapshot(client kube.Client, contextName string) (ClusterSnapshot
return clusterSN, nil
}
func listResource(client kube.Client, ns string, s collection.Schema) []string {
return listResourceGVK(client, ns, s.Resource().GroupVersionResource())
}
func listResourceGVK(client kube.Client, ns string, gvk schema.GroupVersionResource) []string {
out := make([]string, 0)
res, err := client.Dynamic().Resource(gvk).Namespace(ns).List(context.TODO(), metav1.ListOptions{})