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

go.mod: Move tools into own go.mod #1321

Merged
merged 1 commit into from
Sep 11, 2023
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ HAS_BENCHSTAT:=$(shell which benchstat)
.PHONY: benchstat
benchstat:
ifndef HAS_BENCHSTAT
@go install -mod=readonly golang.org/x/perf/cmd/benchstat
@go install -mod=readonly -modfile=scripts/go.mod golang.org/x/perf/cmd/benchstat
endif

# Image tests
Expand Down Expand Up @@ -213,7 +213,7 @@ test-e2e-helm-all:
# ---------------

.PHONY: verify
verify: verify-licenses verify-lint verify-toc verify-deps verify-generated verify-structured-logging
verify: verify-licenses verify-lint verify-toc verify-deps verify-scripts-deps verify-generated verify-structured-logging

.PHONY: update
update: update-licenses update-lint update-toc update-deps update-generated
Expand All @@ -233,7 +233,7 @@ update-licenses: addlicense
.PHONY: addlicense
addlicense:
ifndef HAS_ADDLICENSE
go install -mod=readonly github.com/google/addlicense
go install -mod=readonly -modfile=scripts/go.mod github.com/google/addlicense
endif

# Lint
Expand Down Expand Up @@ -271,7 +271,7 @@ HAS_MDTOC:=$(shell which mdtoc)
.PHONY: mdtoc
mdtoc:
ifndef HAS_MDTOC
go install -mod=readonly sigs.k8s.io/mdtoc
go install -mod=readonly -modfile=scripts/go.mod sigs.k8s.io/mdtoc
endif

# Structured Logging
Expand All @@ -285,7 +285,7 @@ HAS_LOGCHECK:=$(shell which logcheck)
.PHONY: logcheck
logcheck:
ifndef HAS_LOGCHECK
go install -mod=readonly sigs.k8s.io/logtools/logcheck
go install -mod=readonly -modfile=scripts/go.mod sigs.k8s.io/logtools/logcheck
endif

# Dependencies
Expand All @@ -294,13 +294,18 @@ endif
.PHONY: update-deps
update-deps:
go mod tidy
cd scripts && go mod tidy

.PHONY: verify-deps
verify-deps:
go mod verify
go mod tidy
@git diff --exit-code -- go.mod go.sum

.PHONY: verify-scripts-deps
verify-scripts-deps:
make -C scripts -f ../Makefile verify-deps

# Generated
# ---------

Expand All @@ -313,7 +318,7 @@ verify-generated: update-generated
.PHONY: update-generated
update-generated:
# pkg/api/generated/openapi/zz_generated.openapi.go
go install -mod=readonly k8s.io/kube-openapi/cmd/openapi-gen
go install -mod=readonly -modfile=scripts/go.mod k8s.io/kube-openapi/cmd/openapi-gen
$(GOPATH)/bin/openapi-gen -i k8s.io/metrics/pkg/apis/metrics/v1beta1,k8s.io/apimachinery/pkg/apis/meta/v1,k8s.io/apimachinery/pkg/api/resource,k8s.io/apimachinery/pkg/version -p pkg/api/generated/openapi/ -O zz_generated.openapi -o $(REPO_DIR) -h $(REPO_DIR)/scripts/boilerplate.go.txt -r /dev/null

# Deprecated
Expand Down
12 changes: 0 additions & 12 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@ module sigs.k8s.io/metrics-server
go 1.20

require (
github.com/google/addlicense v1.0.0
github.com/google/go-cmp v0.5.9
github.com/onsi/ginkgo v1.14.0
github.com/onsi/gomega v1.27.4
github.com/prometheus/common v0.39.0
github.com/prometheus/prometheus v0.42.1-0.20230222223527-64ff6bece652
github.com/spf13/cobra v1.6.0
github.com/spf13/pflag v1.0.5
golang.org/x/perf v0.0.0-20210220033136-40a54f11e909
k8s.io/api v0.27.2
k8s.io/apimachinery v0.27.2
k8s.io/apiserver v0.27.2
Expand All @@ -20,19 +18,15 @@ require (
k8s.io/klog/v2 v2.90.1
k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f
k8s.io/metrics v0.27.2
sigs.k8s.io/logtools v0.4.1
sigs.k8s.io/mdtoc v1.0.1
)

require (
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
github.com/BurntSushi/toml v0.3.1 // indirect
github.com/NYTimes/gziphandler v1.1.1 // indirect
github.com/antlr/antlr4/runtime/Go/antlr v1.4.10 // indirect
github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/blang/semver/v4 v4.0.0 // indirect
github.com/bmatcuk/doublestar/v4 v4.0.2 // indirect
github.com/cenkalti/backoff/v4 v4.2.0 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/coreos/go-semver v0.3.0 // indirect
Expand All @@ -51,7 +45,6 @@ require (
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/gomarkdown/markdown v0.0.0-20200824053859-8c8b3816f167 // indirect
github.com/google/cel-go v0.12.6 // indirect
github.com/google/gnostic v0.5.7-v3refs // indirect
github.com/google/gofuzz v1.2.0 // indirect
Expand All @@ -66,7 +59,6 @@ require (
github.com/mailru/easyjson v0.7.7 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/mmarkdown/mmark v2.0.40+incompatible // indirect
github.com/moby/spdystream v0.2.0 // indirect
github.com/moby/term v0.0.0-20221205130635-1aeaba878587 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
Expand Down Expand Up @@ -95,16 +87,13 @@ require (
go.uber.org/multierr v1.6.0 // indirect
go.uber.org/zap v1.19.0 // indirect
golang.org/x/crypto v0.1.0 // indirect
golang.org/x/exp v0.0.0-20230124195608-d38c7dcee874 // indirect
golang.org/x/mod v0.9.0 // indirect
golang.org/x/net v0.8.0 // indirect
golang.org/x/oauth2 v0.4.0 // indirect
golang.org/x/sync v0.1.0 // indirect
golang.org/x/sys v0.6.0 // indirect
golang.org/x/term v0.6.0 // indirect
golang.org/x/text v0.8.0 // indirect
golang.org/x/time v0.3.0 // indirect
golang.org/x/tools v0.7.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20230124163310-31e0e69b6fc2 // indirect
google.golang.org/grpc v1.53.0 // indirect
Expand All @@ -114,7 +103,6 @@ require (
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/gengo v0.0.0-20220902162205-c0856e24416d // indirect
k8s.io/kms v0.27.2 // indirect
k8s.io/utils v0.0.0-20230209194617-a36077c30491 // indirect
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.1.2 // indirect
Expand Down
Loading