From eb041be370bba23da9c87fed64eff1e25201f2d9 Mon Sep 17 00:00:00 2001 From: stoneshi-yunify Date: Tue, 14 May 2024 15:50:33 +0800 Subject: [PATCH] update go Signed-off-by: stoneshi-yunify --- go.mod | 45 +++++++++++++++++++++++++++++++++++++++++++-- go.sum | 1 - webhook/selector.go | 3 ++- 3 files changed, 45 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index bd925e1..395d765 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/kubesphere/storageclass-accessor -go 1.16 +go 1.22 require ( github.com/fsnotify/fsnotify v1.4.9 @@ -8,11 +8,52 @@ require ( k8s.io/api v0.22.1 k8s.io/apimachinery v0.22.1 k8s.io/klog/v2 v2.9.0 - k8s.io/utils v0.0.0-20210802155522-efc7438f0176 kubesphere.io/api v0.0.0-20210917114432-19cb9aacd65f sigs.k8s.io/controller-runtime v0.10.0 ) +require ( + github.com/PuerkitoBio/purell v1.1.1 // indirect + github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/emicklei/go-restful v2.9.5+incompatible // indirect + github.com/evanphx/json-patch v4.11.0+incompatible // indirect + github.com/go-logr/logr v0.4.0 // indirect + github.com/go-openapi/jsonpointer v0.19.5 // indirect + github.com/go-openapi/jsonreference v0.19.5 // indirect + github.com/go-openapi/spec v0.19.7 // indirect + github.com/go-openapi/swag v0.19.14 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/protobuf v1.5.2 // indirect + github.com/google/go-cmp v0.5.5 // indirect + github.com/google/gofuzz v1.1.0 // indirect + github.com/googleapis/gnostic v0.5.5 // indirect + github.com/imdario/mergo v0.3.12 // indirect + github.com/inconshreveable/mousetrap v1.0.0 // indirect + github.com/josharian/intern v1.0.0 // indirect + github.com/json-iterator/go v1.1.11 // indirect + github.com/mailru/easyjson v0.7.6 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.1 // indirect + github.com/pkg/errors v0.9.1 // indirect + github.com/spf13/pflag v1.0.5 // indirect + golang.org/x/net v0.0.0-20210525063256-abc453219eb5 // indirect + golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602 // indirect + golang.org/x/sys v0.0.0-20210817190340-bfb29a6856f2 // indirect + golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d // indirect + golang.org/x/text v0.3.6 // indirect + golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect + google.golang.org/appengine v1.6.7 // indirect + google.golang.org/protobuf v1.26.0 // indirect + gopkg.in/inf.v0 v0.9.1 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect + k8s.io/client-go v12.0.0+incompatible // indirect + k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e // indirect + k8s.io/utils v0.0.0-20210802155522-efc7438f0176 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.1.2 // indirect + sigs.k8s.io/yaml v1.2.0 // indirect +) + replace ( github.com/googleapis/gnostic => github.com/googleapis/gnostic v0.4.1 k8s.io/client-go => k8s.io/client-go v0.21.2 diff --git a/go.sum b/go.sum index 90c15d6..3897e95 100644 --- a/go.sum +++ b/go.sum @@ -1134,7 +1134,6 @@ k8s.io/gengo v0.0.0-20201214224949-b6c5ce23f027/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAE k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v0.3.1/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v0.4.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= -k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= diff --git a/webhook/selector.go b/webhook/selector.go index dca418c..7b93d0f 100644 --- a/webhook/selector.go +++ b/webhook/selector.go @@ -1,8 +1,9 @@ package webhook import ( + "slices" + corev1 "k8s.io/api/core/v1" - "k8s.io/utils/strings/slices" workspacev1alpha1 "kubesphere.io/api/tenant/v1alpha1" "github.com/kubesphere/storageclass-accessor/client/apis/accessor/v1alpha1"