Skip to content

Commit 5642681

Browse files
committed
Move tools to internal module
Track dependencies in its own dedicated module file, to avoid cluttering the main go.mod file. This also helps to describe our dependencies more accurately.
1 parent f93d1cb commit 5642681

File tree

6 files changed

+390
-132
lines changed

6 files changed

+390
-132
lines changed

Makefile

+1-9
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,9 @@ list: ## List Makefile targets
2626
# Allows flexibility to use other build kits, like nerdctl
2727
BUILD_KIT ?= docker
2828

29-
define get_mod_code_generator
30-
echo "Only go get & mod k8s.io/code-generator, but do not install it"
31-
echo "⚠️ Keep it at the same version as captured in go.mod, otherwise we may end up with version inconsistencies"
32-
awk '/k8s.io\/code-generator/ { system("go get -d " $$1 "@" $$2) }' go.mod
33-
endef
3429
install-tools: ## Install tooling required to configure and build this repo
35-
go mod download
3630
@echo "Install all tools..."
37-
@awk -F '"' '/_/ && !/k8s.io\/code-generator/ { system("go install " $$2) }' tools/tools.go
38-
@$(get_mod_code_generator)
39-
go install golang.org/x/vuln/cmd/govulncheck@latest
31+
cd internal/tools; grep _ tools.go | awk -F '"' '{print $$2}' | xargs -t go install -mod=mod
4032

4133
LOCAL_TESTBIN = $(CURDIR)/testbin
4234
ENVTEST_K8S_VERSION = 1.26.1

go.mod

+1-36
Original file line numberDiff line numberDiff line change
@@ -6,54 +6,38 @@ toolchain go1.23.4
66

77
require (
88
github.com/cloudflare/cfssl v1.6.5
9-
github.com/elastic/crd-ref-docs v0.1.0
109
github.com/go-logr/logr v1.4.2
1110
github.com/google/uuid v1.6.0
1211
github.com/hashicorp/vault/api v1.15.0
13-
github.com/maxbrunsfeld/counterfeiter/v6 v6.10.0
1412
github.com/michaelklishin/rabbit-hole/v2 v2.16.0
1513
github.com/onsi/ginkgo/v2 v2.22.2
1614
github.com/onsi/gomega v1.36.2
1715
github.com/rabbitmq/cluster-operator/v2 v2.12.0
18-
github.com/sclevine/yj v0.0.0-20210612025309-737bdf40a5d1
1916
gopkg.in/ini.v1 v1.67.0
2017
k8s.io/api v0.32.1
2118
k8s.io/apimachinery v0.32.1
2219
k8s.io/client-go v0.32.1
23-
k8s.io/code-generator v0.32.1
2420
k8s.io/klog/v2 v2.130.1
25-
k8s.io/kube-openapi v0.0.0-20241212222426-2c72e554b1e7
2621
k8s.io/utils v0.0.0-20241210054802-24370beab758
2722
sigs.k8s.io/controller-runtime v0.20.0
28-
sigs.k8s.io/controller-runtime/tools/setup-envtest v0.0.0-20240927101401-4381fa0aeee4
29-
sigs.k8s.io/controller-tools v0.17.1
30-
sigs.k8s.io/kustomize/kustomize/v5 v5.5.0
3123
)
3224

3325
require (
34-
github.com/Masterminds/goutils v1.1.1 // indirect
35-
github.com/Masterminds/semver v1.5.0 // indirect
36-
github.com/Masterminds/sprig v2.22.0+incompatible // indirect
3726
github.com/beorn7/perks v1.0.1 // indirect
38-
github.com/blang/semver/v4 v4.0.0 // indirect
3927
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
4028
github.com/cespare/xxhash/v2 v2.3.0 // indirect
4129
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
4230
github.com/emicklei/go-restful/v3 v3.12.1 // indirect
4331
github.com/evanphx/json-patch v5.9.0+incompatible // indirect
4432
github.com/evanphx/json-patch/v5 v5.9.0 // indirect
45-
github.com/fatih/color v1.18.0 // indirect
4633
github.com/fsnotify/fsnotify v1.8.0 // indirect
4734
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
48-
github.com/go-errors/errors v1.5.1 // indirect
4935
github.com/go-jose/go-jose/v4 v4.0.4 // indirect
5036
github.com/go-logr/zapr v1.3.0 // indirect
5137
github.com/go-openapi/jsonpointer v0.21.0 // indirect
5238
github.com/go-openapi/jsonreference v0.21.0 // indirect
5339
github.com/go-openapi/swag v0.23.0 // indirect
5440
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
55-
github.com/gobuffalo/flect v1.0.3 // indirect
56-
github.com/goccy/go-yaml v1.12.0 // indirect
5741
github.com/gogo/protobuf v1.3.2 // indirect
5842
github.com/golang/protobuf v1.5.4 // indirect
5943
github.com/google/btree v1.1.3 // indirect
@@ -62,7 +46,6 @@ require (
6246
github.com/google/go-cmp v0.6.0 // indirect
6347
github.com/google/gofuzz v1.2.0 // indirect
6448
github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad // indirect
65-
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
6649
github.com/hashicorp/errwrap v1.1.0 // indirect
6750
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
6851
github.com/hashicorp/go-multierror v1.1.1 // indirect
@@ -72,23 +55,15 @@ require (
7255
github.com/hashicorp/go-secure-stdlib/strutil v0.1.2 // indirect
7356
github.com/hashicorp/go-sockaddr v1.0.7 // indirect
7457
github.com/hashicorp/hcl v1.0.0 // indirect
75-
github.com/huandu/xstrings v1.5.0 // indirect
76-
github.com/imdario/mergo v0.3.16 // indirect
77-
github.com/inconshreveable/mousetrap v1.1.0 // indirect
7858
github.com/jmoiron/sqlx v1.3.5 // indirect
7959
github.com/josharian/intern v1.0.0 // indirect
8060
github.com/json-iterator/go v1.1.12 // indirect
8161
github.com/klauspost/compress v1.17.11 // indirect
8262
github.com/mailru/easyjson v0.9.0 // indirect
83-
github.com/mattn/go-colorable v0.1.13 // indirect
84-
github.com/mattn/go-isatty v0.0.20 // indirect
85-
github.com/mitchellh/copystructure v1.2.0 // indirect
8663
github.com/mitchellh/go-homedir v1.1.0 // indirect
8764
github.com/mitchellh/mapstructure v1.5.0 // indirect
88-
github.com/mitchellh/reflectwalk v1.0.2 // indirect
8965
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
9066
github.com/modern-go/reflect2 v1.0.2 // indirect
91-
github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect
9267
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
9368
github.com/pelletier/go-toml v1.9.5 // indirect
9469
github.com/pkg/errors v0.9.1 // indirect
@@ -97,19 +72,14 @@ require (
9772
github.com/prometheus/common v0.62.0 // indirect
9873
github.com/prometheus/procfs v0.15.1 // indirect
9974
github.com/ryanuber/go-glob v1.0.0 // indirect
100-
github.com/sergi/go-diff v1.3.1 // indirect
101-
github.com/spf13/afero v1.11.0 // indirect
102-
github.com/spf13/cobra v1.8.1 // indirect
10375
github.com/spf13/pflag v1.0.5 // indirect
10476
github.com/weppos/publicsuffix-go v0.30.2 // indirect
10577
github.com/x448/float16 v0.8.4 // indirect
106-
github.com/xlab/treeprint v1.2.0 // indirect
10778
github.com/zmap/zcrypto v0.0.0-20231219022726-a1f61fb1661c // indirect
10879
github.com/zmap/zlint/v3 v3.6.2 // indirect
10980
go.uber.org/multierr v1.11.0 // indirect
11081
go.uber.org/zap v1.27.0 // indirect
11182
golang.org/x/crypto v0.32.0 // indirect
112-
golang.org/x/mod v0.22.0 // indirect
11383
golang.org/x/net v0.34.0 // indirect
11484
golang.org/x/oauth2 v0.25.0 // indirect
11585
golang.org/x/sync v0.10.0 // indirect
@@ -118,19 +88,14 @@ require (
11888
golang.org/x/text v0.21.0 // indirect
11989
golang.org/x/time v0.9.0 // indirect
12090
golang.org/x/tools v0.29.0 // indirect
121-
golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da // indirect
12291
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
12392
google.golang.org/protobuf v1.36.3 // indirect
12493
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
12594
gopkg.in/inf.v0 v0.9.1 // indirect
126-
gopkg.in/yaml.v2 v2.4.0 // indirect
12795
gopkg.in/yaml.v3 v3.0.1 // indirect
12896
k8s.io/apiextensions-apiserver v0.32.1 // indirect
129-
k8s.io/gengo/v2 v2.0.0-20240911193312-2b36238f13e9 // indirect
97+
k8s.io/kube-openapi v0.0.0-20241212222426-2c72e554b1e7 // indirect
13098
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect
131-
sigs.k8s.io/kustomize/api v0.18.0 // indirect
132-
sigs.k8s.io/kustomize/cmd/config v0.15.0 // indirect
133-
sigs.k8s.io/kustomize/kyaml v0.18.1 // indirect
13499
sigs.k8s.io/structured-merge-diff/v4 v4.5.0 // indirect
135100
sigs.k8s.io/yaml v1.4.0 // indirect
136101
)

0 commit comments

Comments
 (0)