Skip to content

Commit 482ad31

Browse files
committed
tools: Use own go.mod
This reduces the number of deps that will be fetched for building ksm
1 parent 1cda0bf commit 482ad31

File tree

6 files changed

+201
-133
lines changed

6 files changed

+201
-133
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ jobs:
3939

4040
- name: Setup environment
4141
run: |
42-
go get -v -t -d ./...
4342
make install-tools
4443
4544
- name: Lint
@@ -62,7 +61,6 @@ jobs:
6261

6362
- name: Setup environment
6463
run: |
65-
go get -v -t -d ./...
6664
make install-tools
6765
6866
- name: Validate generated manifests
@@ -84,7 +82,6 @@ jobs:
8482

8583
- name: Setup environment
8684
run: |
87-
go get -v -t -d ./...
8885
make install-tools
8986
9087
- name: Validate go modules
@@ -106,7 +103,6 @@ jobs:
106103

107104
- name: Setup environment
108105
run: |
109-
go get -v -t -d ./...
110106
make install-tools
111107
112108
- name: Check that all metrics are documented
@@ -128,7 +124,6 @@ jobs:
128124

129125
- name: Setup environment
130126
run: |
131-
go get -v -t -d ./...
132127
make install-tools
133128
134129
- name: Unit tests
@@ -165,7 +160,6 @@ jobs:
165160

166161
- name: Setup environment
167162
run: |
168-
go get -v -t -d ./...
169163
make install-tools
170164
171165
- name: Benchmark tests
@@ -187,7 +181,6 @@ jobs:
187181

188182
- name: Setup environment
189183
run: |
190-
go get -v -t -d ./...
191184
make install-tools
192185
193186
- name: Build
@@ -209,7 +202,6 @@ jobs:
209202

210203
- name: Setup environment
211204
run: |
212-
go get -v -t -d ./...
213205
make install-tools
214206
215207
- name: End-to-end tests

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,8 @@ scripts/vendor: scripts/jsonnetfile.json scripts/jsonnetfile.lock.json
150150

151151
install-tools:
152152
@echo Installing tools from tools.go
153-
@cat tools/tools.go | grep _ | awk -F'"' '{print $$2}' | xargs -tI % go install %
153+
@cd tools && cat tools.go | grep _ | awk -F'"' '{print $$2}' | xargs -tI % go get %
154+
@cd tools && cat tools.go | grep _ | awk -F'"' '{print $$2}' | xargs -tI % go install %
154155

155156
install-promtool:
156157
@echo Installing promtool

go.mod

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11
module k8s.io/kube-state-metrics/v2
22

33
require (
4-
github.com/brancz/gojsontoyaml v0.1.0
5-
github.com/campoy/embedmd v1.0.0
64
github.com/dgryski/go-jump v0.0.0-20211018200510-ba001c3ffce0
75
github.com/fsnotify/fsnotify v1.6.0
86
github.com/gobuffalo/flect v0.3.0
97
github.com/google/go-cmp v0.5.9
10-
github.com/google/go-jsonnet v0.19.1
11-
github.com/jsonnet-bundler/jsonnet-bundler v0.5.1
128
github.com/oklog/run v1.1.0
139
github.com/prometheus/client_golang v1.14.0
1410
github.com/prometheus/client_model v0.3.0
@@ -18,7 +14,6 @@ require (
1814
github.com/spf13/cobra v1.6.1
1915
github.com/spf13/viper v1.14.0
2016
github.com/stretchr/testify v1.8.1
21-
golang.org/x/perf v0.0.0-20220920022801-e8d778a60d07
2217
gopkg.in/yaml.v3 v3.0.1
2318
k8s.io/api v0.26.0
2419
k8s.io/apimachinery v0.26.0
@@ -31,17 +26,13 @@ require (
3126
)
3227

3328
require (
34-
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 // indirect
35-
github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect
3629
github.com/beorn7/perks v1.0.1 // indirect
3730
github.com/blang/semver/v4 v4.0.0 // indirect
3831
github.com/cespare/xxhash/v2 v2.1.2 // indirect
3932
github.com/coreos/go-systemd/v22 v22.4.0 // indirect
4033
github.com/davecgh/go-spew v1.1.1 // indirect
4134
github.com/emicklei/go-restful/v3 v3.9.0 // indirect
4235
github.com/evanphx/json-patch v4.12.0+incompatible // indirect
43-
github.com/fatih/color v1.13.0 // indirect
44-
github.com/ghodss/yaml v1.0.0 // indirect
4536
github.com/go-kit/log v0.2.1 // indirect
4637
github.com/go-logfmt/logfmt v0.5.1 // indirect
4738
github.com/go-logr/logr v1.2.3 // indirect
@@ -52,7 +43,6 @@ require (
5243
github.com/golang/protobuf v1.5.2 // indirect
5344
github.com/google/gnostic v0.5.7-v3refs // indirect
5445
github.com/google/gofuzz v1.1.0 // indirect
55-
github.com/google/safehtml v0.0.2 // indirect
5646
github.com/hashicorp/hcl v1.0.0 // indirect
5747
github.com/imdario/mergo v0.3.6 // indirect
5848
github.com/inconshreveable/mousetrap v1.0.1 // indirect
@@ -61,8 +51,6 @@ require (
6151
github.com/json-iterator/go v1.1.12 // indirect
6252
github.com/magiconair/properties v1.8.6 // indirect
6353
github.com/mailru/easyjson v0.7.6 // indirect
64-
github.com/mattn/go-colorable v0.1.12 // indirect
65-
github.com/mattn/go-isatty v0.0.14 // indirect
6654
github.com/matttproud/golang_protobuf_extensions v1.0.2 // indirect
6755
github.com/mitchellh/mapstructure v1.5.0 // indirect
6856
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
@@ -74,6 +62,7 @@ require (
7462
github.com/pkg/errors v0.9.1 // indirect
7563
github.com/pmezard/go-difflib v1.0.0 // indirect
7664
github.com/prometheus/procfs v0.8.0 // indirect
65+
github.com/rogpeppe/go-internal v1.8.1 // indirect
7766
github.com/spf13/afero v1.9.2 // indirect
7867
github.com/spf13/cast v1.5.0 // indirect
7968
github.com/spf13/jwalterweatherman v1.1.0 // indirect
@@ -89,7 +78,6 @@ require (
8978
golang.org/x/time v0.0.0-20220609170525-579cf78fd858 // indirect
9079
google.golang.org/appengine v1.6.7 // indirect
9180
google.golang.org/protobuf v1.28.1 // indirect
92-
gopkg.in/alecthomas/kingpin.v2 v2.2.6 // indirect
9381
gopkg.in/inf.v0 v0.9.1 // indirect
9482
gopkg.in/ini.v1 v1.67.0 // indirect
9583
gopkg.in/yaml.v2 v2.4.0 // indirect

0 commit comments

Comments
 (0)