From c529e8d89faeae391b0cf274e707b7524c967085 Mon Sep 17 00:00:00 2001 From: lgtm <1gtm@users.noreply.github.com> Date: Tue, 23 Nov 2021 22:04:36 -0800 Subject: [PATCH] [cherry-pick] Update dependencies (#61) (#62) /cherry-pick Signed-off-by: 1gtm <1gtm@appscode.com> --- go.mod | 3 ++- go.sum | 11 ++++++----- vendor/go.bytebuilders.dev/license-verifier/Makefile | 4 ++-- .../go.bytebuilders.dev/license-verifier/info/lib.go | 8 ++++++++ .../license-verifier/kubernetes/go.mod | 2 +- .../license-verifier/kubernetes/lib.go | 6 +++--- vendor/go.bytebuilders.dev/license-verifier/lib.go | 11 +++-------- vendor/modules.txt | 7 ++++--- 8 files changed, 29 insertions(+), 23 deletions(-) diff --git a/go.mod b/go.mod index c9bbf319..49866bfb 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.15 require ( github.com/spf13/cobra v1.1.3 - go.bytebuilders.dev/license-verifier/kubernetes v0.9.5 + go.bytebuilders.dev/license-verifier/kubernetes v0.9.6 gomodules.xyz/flags v0.1.3 gomodules.xyz/go-sh v0.1.0 gomodules.xyz/logs v0.0.6 @@ -15,6 +15,7 @@ require ( k8s.io/klog/v2 v2.8.0 kmodules.xyz/client-go v0.0.0-20211122091731-6c471b24a4ea // indirect kmodules.xyz/custom-resources v0.0.0-20211122142737-3bf3dbd8ac52 + kmodules.xyz/objectstore-api v0.0.0-20211116180107-8720be0c9bf7 // indirect kmodules.xyz/offshoot-api v0.0.0-20211103060642-3e217667cf41 kubedb.dev/apimachinery v0.23.0 stash.appscode.dev/apimachinery v0.16.0 diff --git a/go.sum b/go.sum index abd930c3..5b625e7e 100644 --- a/go.sum +++ b/go.sum @@ -712,10 +712,10 @@ github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50/go.mod h1:NUSPS github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f/go.mod h1:GlGEuHIJweS1mbCqG+7vt2nvWLzLLnRHbXz5JKd/Qbg= go.bytebuilders.dev/audit v0.0.10/go.mod h1:jhNyXHoeVHijC4tM7EYpcB9RqkwnI27IoRN3k0ivick= go.bytebuilders.dev/license-verifier v0.9.3/go.mod h1:GpIW0o8O0wpiBVt7IIz4z7bcPuG8nza8/bCDkaupDn8= -go.bytebuilders.dev/license-verifier v0.9.5 h1:XUbFH3LzHSpQFtVS/MiT5RN0gr/KNNBvnOm78KYoAEQ= -go.bytebuilders.dev/license-verifier v0.9.5/go.mod h1:GpIW0o8O0wpiBVt7IIz4z7bcPuG8nza8/bCDkaupDn8= -go.bytebuilders.dev/license-verifier/kubernetes v0.9.5 h1:KWzmh4qZ+3cR8LpBuUfufb2goK5NuULyE0uKYgt3D50= -go.bytebuilders.dev/license-verifier/kubernetes v0.9.5/go.mod h1:mg5pZDweHlpTTw57kOdLj4bU107hHVP/1xTKKZ1eUNc= +go.bytebuilders.dev/license-verifier v0.9.6 h1:nT4Eplu0OQWM7Re81ZQibkYKeno6nDAwOzaz14Yvadc= +go.bytebuilders.dev/license-verifier v0.9.6/go.mod h1:GpIW0o8O0wpiBVt7IIz4z7bcPuG8nza8/bCDkaupDn8= +go.bytebuilders.dev/license-verifier/kubernetes v0.9.6 h1:QwiUgNug1pD4cwxLuSQmSLn1WvvNreKfBajdymoRmeM= +go.bytebuilders.dev/license-verifier/kubernetes v0.9.6/go.mod h1:b1oIjrDuNN1T3d1ixnr020hi2i0sXlR7CIsWrhkzga4= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= @@ -1155,8 +1155,9 @@ kmodules.xyz/custom-resources v0.0.0-20211007080833-72bd9e8cae6e/go.mod h1:pGabe kmodules.xyz/custom-resources v0.0.0-20211122142737-3bf3dbd8ac52 h1:UWVpU7y5znTUusU+JhPB+ojh26f6K2v8sNb37U1DolQ= kmodules.xyz/custom-resources v0.0.0-20211122142737-3bf3dbd8ac52/go.mod h1:yHLFe4wVYxepTnN00CFUf29xH+jEHDokq6d2fbp9pks= kmodules.xyz/monitoring-agent-api v0.0.0-20210928135619-38ca075a2dbd/go.mod h1:08pBqfEuy29EjhaMrHB2XFy2iekoFi7AjaXcJS+xAck= -kmodules.xyz/objectstore-api v0.0.0-20210928135706-fdf68f88ea6e h1:2QZBUcUI6r7mLU5/9+Xxd1eDClEIEkZkJlyCU91UoY8= kmodules.xyz/objectstore-api v0.0.0-20210928135706-fdf68f88ea6e/go.mod h1:Tkcf9uTplnrJ6C8o0zlw2kpgS1SaWAiMO5P2YgLjTo8= +kmodules.xyz/objectstore-api v0.0.0-20211116180107-8720be0c9bf7 h1:JIAEFjN3GDhLEG1Fh1zYpy/QFyyN337mJTM+ODEGosg= +kmodules.xyz/objectstore-api v0.0.0-20211116180107-8720be0c9bf7/go.mod h1:IICnDdPFOEeGXdaPVHOGYfdwD1cyh/p1I/TWMkyNTIE= kmodules.xyz/offshoot-api v0.0.0-20210829122105-6f4d481b0c61/go.mod h1:3LECbAL3FgbyK80NP3V3Pmiuo/a3hFWg/PR6SPFhTns= kmodules.xyz/offshoot-api v0.0.0-20211103060642-3e217667cf41 h1:GCDyb1fbgCHUNuFk9MecSFvzMq/WCeGk8pDEtqivziA= kmodules.xyz/offshoot-api v0.0.0-20211103060642-3e217667cf41/go.mod h1:sJYyxf84ZvbVz4SivxMgSelGRYn19wOLUtObiEncCxk= diff --git a/vendor/go.bytebuilders.dev/license-verifier/Makefile b/vendor/go.bytebuilders.dev/license-verifier/Makefile index 08343550..7ae2a8b4 100644 --- a/vendor/go.bytebuilders.dev/license-verifier/Makefile +++ b/vendor/go.bytebuilders.dev/license-verifier/Makefile @@ -61,8 +61,8 @@ BIN_PLATFORMS := $(DOCKER_PLATFORMS) windows/amd64 darwin/amd64 OS := $(if $(GOOS),$(GOOS),$(shell go env GOOS)) ARCH := $(if $(GOARCH),$(GOARCH),$(shell go env GOARCH)) -BASEIMAGE_PROD ?= gcr.io/distroless/static-debian10 -BASEIMAGE_DBG ?= debian:buster +BASEIMAGE_PROD ?= gcr.io/distroless/static-debian11 +BASEIMAGE_DBG ?= debian:bullseye GO_VERSION ?= 1.17 BUILD_IMAGE ?= appscode/golang-dev:$(GO_VERSION) diff --git a/vendor/go.bytebuilders.dev/license-verifier/info/lib.go b/vendor/go.bytebuilders.dev/license-verifier/info/lib.go index f2b760cf..1b617a84 100644 --- a/vendor/go.bytebuilders.dev/license-verifier/info/lib.go +++ b/vendor/go.bytebuilders.dev/license-verifier/info/lib.go @@ -20,6 +20,8 @@ import ( "net/url" "path" "strconv" + "strings" + "unicode" ) var ( @@ -37,6 +39,12 @@ var ( registrationAPIPath = "api/v1/register" ) +func Features() []string { + return strings.FieldsFunc(ProductName, func(r rune) bool { + return unicode.IsSpace(r) || r == ',' || r == ';' + }) +} + func SkipLicenseVerification() bool { v, _ := strconv.ParseBool(EnforceLicense) return !v diff --git a/vendor/go.bytebuilders.dev/license-verifier/kubernetes/go.mod b/vendor/go.bytebuilders.dev/license-verifier/kubernetes/go.mod index f31e9296..ec82168a 100644 --- a/vendor/go.bytebuilders.dev/license-verifier/kubernetes/go.mod +++ b/vendor/go.bytebuilders.dev/license-verifier/kubernetes/go.mod @@ -4,7 +4,7 @@ go 1.16 require ( github.com/gogo/protobuf v1.3.2 - go.bytebuilders.dev/license-verifier v0.9.5 + go.bytebuilders.dev/license-verifier v0.9.6 k8s.io/api v0.21.1 k8s.io/apimachinery v0.21.1 k8s.io/apiserver v0.21.1 diff --git a/vendor/go.bytebuilders.dev/license-verifier/kubernetes/lib.go b/vendor/go.bytebuilders.dev/license-verifier/kubernetes/lib.go index 278e65fd..7188ca8c 100644 --- a/vendor/go.bytebuilders.dev/license-verifier/kubernetes/lib.go +++ b/vendor/go.bytebuilders.dev/license-verifier/kubernetes/lib.go @@ -74,7 +74,7 @@ func NewLicenseEnforcer(config *rest.Config, licenseFile string) *LicenseEnforce config: config, opts: &verifier.Options{ CACert: []byte(info.LicenseCA), - Features: info.ProductName, + Features: info.Features(), }, } } @@ -227,7 +227,7 @@ func VerifyLicensePeriodically(config *rest.Config, licenseFile string, stopCh < config: config, opts: &verifier.Options{ CACert: []byte(info.LicenseCA), - Features: info.ProductName, + Features: info.Features(), }, } @@ -286,7 +286,7 @@ func CheckLicenseFile(config *rest.Config, licenseFile string) error { config: config, opts: &verifier.Options{ CACert: []byte(info.LicenseCA), - Features: info.ProductName, + Features: info.Features(), }, } diff --git a/vendor/go.bytebuilders.dev/license-verifier/lib.go b/vendor/go.bytebuilders.dev/license-verifier/lib.go index 8e3b4f71..f7742c94 100644 --- a/vendor/go.bytebuilders.dev/license-verifier/lib.go +++ b/vendor/go.bytebuilders.dev/license-verifier/lib.go @@ -20,10 +20,8 @@ import ( "crypto/x509" "encoding/pem" "fmt" - "strings" - "unicode" - "go.bytebuilders.dev/license-verifier/apis/licenses/v1alpha1" + "strings" "github.com/pkg/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -32,7 +30,7 @@ import ( type Options struct { ClusterUID string `json:"clusterUID"` - Features string `json:"features"` + Features []string `json:"features"` CACert []byte `json:"caCert,omitempty"` License []byte `json:"license"` } @@ -165,10 +163,7 @@ func VerifyLicense(opts *Options) (v1alpha1.License, error) { license.Reason = e2.Error() return license, e2 } - features := strings.FieldsFunc(opts.Features, func(r rune) bool { - return unicode.IsSpace(r) || r == ',' || r == ';' - }) - if !sets.NewString(cert.Subject.Organization...).HasAny(features...) { + if !sets.NewString(cert.Subject.Organization...).HasAny(opts.Features...) { e2 := fmt.Errorf("license was not issued for %s", opts.Features) license.Status = v1alpha1.LicenseExpired license.Reason = e2.Error() diff --git a/vendor/modules.txt b/vendor/modules.txt index 923fff3b..5ee18e26 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -122,12 +122,12 @@ github.com/yudai/gojsondiff github.com/yudai/gojsondiff/formatter # github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 github.com/yudai/golcs -# go.bytebuilders.dev/license-verifier v0.9.5 +# go.bytebuilders.dev/license-verifier v0.9.6 go.bytebuilders.dev/license-verifier go.bytebuilders.dev/license-verifier/apis/licenses go.bytebuilders.dev/license-verifier/apis/licenses/v1alpha1 go.bytebuilders.dev/license-verifier/info -# go.bytebuilders.dev/license-verifier/kubernetes v0.9.5 +# go.bytebuilders.dev/license-verifier/kubernetes v0.9.6 ## explicit go.bytebuilders.dev/license-verifier/kubernetes # golang.org/x/crypto v0.0.0-20210314154223-e6e6c4f2bb5b @@ -553,7 +553,8 @@ kmodules.xyz/custom-resources/client/clientset/versioned/typed/appcatalog/v1alph kmodules.xyz/custom-resources/client/clientset/versioned/typed/auditor/v1alpha1 kmodules.xyz/custom-resources/client/clientset/versioned/typed/metrics/v1alpha1 kmodules.xyz/custom-resources/crds -# kmodules.xyz/objectstore-api v0.0.0-20210928135706-fdf68f88ea6e +# kmodules.xyz/objectstore-api v0.0.0-20211116180107-8720be0c9bf7 +## explicit kmodules.xyz/objectstore-api/api/v1 # kmodules.xyz/offshoot-api v0.0.0-20211103060642-3e217667cf41 ## explicit