Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cherry-pick] Update dependencies (#945) #947

Merged
merged 1 commit into from
Nov 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.15
require (
github.com/google/gofuzz v1.2.0 // indirect
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
golang.org/x/tools v0.1.1-0.20210427153610-6397a11608ad // indirect
gomodules.xyz/flags v0.1.3
gomodules.xyz/go-sh v0.1.0
Expand All @@ -17,6 +17,7 @@ require (
k8s.io/klog/v2 v2.8.0
kmodules.xyz/client-go v0.0.0-20211122091731-6c471b24a4ea
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
stash.appscode.dev/apimachinery v0.16.0
)
Expand Down
11 changes: 6 additions & 5 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -645,10 +645,10 @@ github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43/go.mod h1:aX
github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50/go.mod h1:NUSPSUX/bi6SeDMUh6brw0nXpxHnc96TguQh0+r/ssA=
github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f/go.mod h1:GlGEuHIJweS1mbCqG+7vt2nvWLzLLnRHbXz5JKd/Qbg=
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=
Expand Down Expand Up @@ -1049,8 +1049,9 @@ kmodules.xyz/crd-schema-fuzz v0.0.0-20210618002152-fae23aef5fb4/go.mod h1:IIkUct
kmodules.xyz/custom-resources v0.0.0-20211007080833-72bd9e8cae6e/go.mod h1:pGabego8q4oi/2sNjhdtFkgVaVw4AyGv14GO6VtAjTw=
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/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=
Expand Down
4 changes: 2 additions & 2 deletions vendor/go.bytebuilders.dev/license-verifier/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
8 changes: 8 additions & 0 deletions vendor/go.bytebuilders.dev/license-verifier/info/lib.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ import (
"net/url"
"path"
"strconv"
"strings"
"unicode"
)

var (
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions vendor/go.bytebuilders.dev/license-verifier/kubernetes/lib.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
},
}
}
Expand Down Expand Up @@ -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(),
},
}

Expand Down Expand Up @@ -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(),
},
}

Expand Down
11 changes: 3 additions & 8 deletions vendor/go.bytebuilders.dev/license-verifier/lib.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"`
}
Expand Down Expand Up @@ -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()
Expand Down
7 changes: 4 additions & 3 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,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
Expand Down Expand Up @@ -556,7 +556,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
Expand Down