Skip to content

Commit

Permalink
mend
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <[email protected]>
  • Loading branch information
tamalsaha committed Apr 8, 2024
1 parent 6dcd9fe commit b1fe866
Show file tree
Hide file tree
Showing 8 changed files with 43 additions and 28 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:
name: Build
runs-on: ubuntu-20.04
steps:
- name: Set up Go 1.21
- name: Set up Go 1.22
uses: actions/setup-go@v1
with:
go-version: '1.21'
go-version: '1.22'
id: go

- uses: actions/checkout@v1
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ TAG := $(VERSION)_$(OS)_$(ARCH)
TAG_PROD := $(TAG)
TAG_DBG := $(VERSION)-dbg_$(OS)_$(ARCH)

GO_VERSION ?= 1.21
GO_VERSION ?= 1.22
BUILD_IMAGE ?= ghcr.io/appscode/golang-dev:$(GO_VERSION)

OUTBIN = bin/$(OS)_$(ARCH)/$(BIN)
Expand Down
9 changes: 4 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ toolchain go1.22.2
require (
github.com/pkg/errors v0.9.1
github.com/spf13/cobra v1.8.0
go.bytebuilders.dev/license-verifier/kubernetes v0.13.4
go.bytebuilders.dev/license-verifier/kubernetes v0.14.0
gomodules.xyz/flags v0.1.3
gomodules.xyz/go-sh v0.1.0
gomodules.xyz/logs v0.0.7
Expand All @@ -26,7 +26,7 @@ require (

require (
github.com/Masterminds/semver/v3 v3.2.1 // indirect
github.com/PuerkitoBio/purell v1.2.0 // indirect
github.com/PuerkitoBio/purell v1.2.1 // indirect
github.com/armon/circbuf v0.0.0-20190214190532-5111143e8da2 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
Expand Down Expand Up @@ -70,8 +70,8 @@ require (
github.com/yudai/gojsondiff v1.0.0 // indirect
github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 // indirect
github.com/zeebo/xxh3 v1.0.2 // indirect
go.bytebuilders.dev/license-proxyserver v0.0.7-0.20231225202028-31122ab82502 // indirect
go.bytebuilders.dev/license-verifier v0.13.4 // indirect
go.bytebuilders.dev/license-proxyserver v0.0.9 // indirect
go.bytebuilders.dev/license-verifier v0.14.0 // indirect
golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect
golang.org/x/net v0.23.0 // indirect
golang.org/x/oauth2 v0.15.0 // indirect
Expand All @@ -87,7 +87,6 @@ require (
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/protobuf v1.33.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/apiextensions-apiserver v0.29.2 // indirect
Expand Down
16 changes: 8 additions & 8 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym
github.com/Masterminds/semver/v3 v3.2.1 h1:RN9w6+7QoMeJVGyfmbcgs28Br8cvmnucEXnY0rYXWg0=
github.com/Masterminds/semver/v3 v3.2.1/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ=
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
github.com/PuerkitoBio/purell v1.2.0 h1:/Jdm5QfyM8zdlqT6WVZU4cfP23sot6CEHA4CS49Ezig=
github.com/PuerkitoBio/purell v1.2.0/go.mod h1:OhLRTaaIzhvIyofkJfB24gokC7tM42Px5UhoT32THBk=
github.com/PuerkitoBio/purell v1.2.1 h1:QsZ4TjvwiMpat6gBCBxEQI0rcS9ehtkKtSpiUnd9N28=
github.com/PuerkitoBio/purell v1.2.1/go.mod h1:ZwHcC/82TOaovDi//J/804umJFFmbOHPngi8iYYv/Eo=
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
Expand Down Expand Up @@ -310,12 +310,12 @@ github.com/zeebo/assert v1.3.0 h1:g7C04CbJuIDKNPFHmsk4hwZDO5O+kntRxzaUoNXj+IQ=
github.com/zeebo/assert v1.3.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0=
github.com/zeebo/xxh3 v1.0.2 h1:xZmwmqxHZA8AI603jOQ0tMqmBr9lPeFwGg6d+xy9DC0=
github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaDcA=
go.bytebuilders.dev/license-proxyserver v0.0.7-0.20231225202028-31122ab82502 h1:825EwUwDMThCiOJs5NZvnSYfWy77oz83FZkpFUwlryM=
go.bytebuilders.dev/license-proxyserver v0.0.7-0.20231225202028-31122ab82502/go.mod h1:U+xAQqopfkri4slwZ/XgwypKDFqHg2t/zO3uDzmPax4=
go.bytebuilders.dev/license-verifier v0.13.4 h1:K4qSsTWTZc7lyRvRHfI23XRrbVrQVJ8Ew5afvSiMdBE=
go.bytebuilders.dev/license-verifier v0.13.4/go.mod h1:lcmFhUSBHp5G0YeZop3I8tOUBRegBrDvkW1aTsIRGcU=
go.bytebuilders.dev/license-verifier/kubernetes v0.13.4 h1:0uPgMbWSHHjB3ECxEGGTIoa4BytSnDSHfTwoxJWv2K4=
go.bytebuilders.dev/license-verifier/kubernetes v0.13.4/go.mod h1:shdo9aT7u3WPAWvFFDTVc/m25HgtYur3d/bknjpAc80=
go.bytebuilders.dev/license-proxyserver v0.0.9 h1:MFArxunIZS0o3LZ+JuSwub8GwZ4bdE3kkfJ8hJfkREQ=
go.bytebuilders.dev/license-proxyserver v0.0.9/go.mod h1:mLX/7EK1gouPWXmG3qibRXF8y+dkR3H1Hgttioy6Dww=
go.bytebuilders.dev/license-verifier v0.14.0 h1:O6pXhz9vz7dPWIJATkX+JiMLhUD2ydzvKzf26c+3Jrw=
go.bytebuilders.dev/license-verifier v0.14.0/go.mod h1:GB9XTSQUcllJ4AVq29TdJI6yRjoI86HGz0XMqq9nLwY=
go.bytebuilders.dev/license-verifier/kubernetes v0.14.0 h1:eeOKHu1YgdHhsaCXf9GNo1ha3SOfaSSe40xG1gc+ArA=
go.bytebuilders.dev/license-verifier/kubernetes v0.14.0/go.mod h1:ms4GTV6vb5eg+dglr8N6EaOybGE77s+kkppFUZ3aZZQ=
go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
Expand Down
2 changes: 2 additions & 0 deletions vendor/github.com/PuerkitoBio/purell/purell.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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 @@ -21,7 +21,7 @@ COMPRESS ?= no

# Produce CRDs that work back to Kubernetes 1.11 (no version conversion)
CRD_OPTIONS ?= "crd:maxDescLen=0,generateEmbeddedObjectMeta=true,allowDangerousTypes=true"
CODE_GENERATOR_IMAGE ?= ghcr.io/appscode/gengo:release-1.25
CODE_GENERATOR_IMAGE ?= ghcr.io/appscode/gengo:release-1.29
API_GROUPS ?= licenses:v1alpha1

# Where to push the docker image.
Expand Down Expand Up @@ -64,7 +64,7 @@ ARCH := $(if $(GOARCH),$(GOARCH),$(shell go env GOARCH))
BASEIMAGE_PROD ?= gcr.io/distroless/static-debian11
BASEIMAGE_DBG ?= debian:bullseye

GO_VERSION ?= 1.20
GO_VERSION ?= 1.21
BUILD_IMAGE ?= ghcr.io/appscode/golang-dev:$(GO_VERSION)

OUTBIN = bin/$(OS)_$(ARCH)/$(BIN)
Expand Down
16 changes: 16 additions & 0 deletions vendor/go.bytebuilders.dev/license-verifier/kubernetes/lib.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ import (
"k8s.io/klog/v2"
"k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset"
core_util "kmodules.xyz/client-go/core/v1"
"kmodules.xyz/client-go/discovery"
"kmodules.xyz/client-go/dynamic"
"kmodules.xyz/client-go/meta"
"kmodules.xyz/client-go/tools/clusterid"
Expand Down Expand Up @@ -394,3 +395,18 @@ func CheckLicenseEndpoint(config *rest.Config, apiServiceName string, features [
}
return nil
}

func LicenseProvided(cfg *rest.Config, licenseFile string) bool {
if licenseFile != "" {
return true
}

if cfg != nil {
ok, _ := discovery.HasGVK(
kubernetes.NewForConfigOrDie(cfg).Discovery(),
proxyserver.SchemeGroupVersion.String(),
proxyserver.ResourceKindLicenseRequest)
return ok
}
return false
}
18 changes: 8 additions & 10 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# github.com/Masterminds/semver/v3 v3.2.1
## explicit; go 1.18
github.com/Masterminds/semver/v3
# github.com/PuerkitoBio/purell v1.2.0
## explicit; go 1.19
# github.com/PuerkitoBio/purell v1.2.1
## explicit; go 1.21
github.com/PuerkitoBio/purell
# github.com/armon/circbuf v0.0.0-20190214190532-5111143e8da2
## explicit
Expand Down Expand Up @@ -175,21 +175,21 @@ github.com/yudai/golcs
# github.com/zeebo/xxh3 v1.0.2
## explicit; go 1.17
github.com/zeebo/xxh3
# go.bytebuilders.dev/license-proxyserver v0.0.7-0.20231225202028-31122ab82502
## explicit; go 1.21.5
# go.bytebuilders.dev/license-proxyserver v0.0.9
## explicit; go 1.22.0
go.bytebuilders.dev/license-proxyserver/apis/proxyserver
go.bytebuilders.dev/license-proxyserver/apis/proxyserver/v1alpha1
go.bytebuilders.dev/license-proxyserver/client/clientset/versioned
go.bytebuilders.dev/license-proxyserver/client/clientset/versioned/scheme
go.bytebuilders.dev/license-proxyserver/client/clientset/versioned/typed/proxyserver/v1alpha1
# go.bytebuilders.dev/license-verifier v0.13.4
## explicit; go 1.18
# go.bytebuilders.dev/license-verifier v0.14.0
## explicit; go 1.21
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.13.4
## explicit; go 1.18
# go.bytebuilders.dev/license-verifier/kubernetes v0.14.0
## explicit; go 1.21.5
go.bytebuilders.dev/license-verifier/kubernetes
# golang.org/x/exp v0.0.0-20230905200255-921286631fa9
## explicit; go 1.20
Expand Down Expand Up @@ -318,8 +318,6 @@ google.golang.org/protobuf/types/known/timestamppb
# gopkg.in/inf.v0 v0.9.1
## explicit
gopkg.in/inf.v0
# gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7
## explicit
# gopkg.in/yaml.v2 v2.4.0
## explicit; go 1.15
gopkg.in/yaml.v2
Expand Down

0 comments on commit b1fe866

Please sign in to comment.