Skip to content

Commit d3272e3

Browse files
committed
chore: switch controller-gen to go tool to keep in sync
Signed-off-by: Sergei Lukianov <[email protected]>
1 parent eab8d10 commit d3272e3

File tree

212 files changed

+65931
-23
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

212 files changed

+65931
-23
lines changed

config/crd/bases/fabricator.githedgehog.com_controlnodes.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.16.1
6+
controller-gen.kubebuilder.io/version: v0.17.2
77
name: controlnodes.fabricator.githedgehog.com
88
spec:
99
group: fabricator.githedgehog.com

config/crd/bases/fabricator.githedgehog.com_fabnodes.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.16.1
6+
controller-gen.kubebuilder.io/version: v0.17.2
77
name: fabnodes.fabricator.githedgehog.com
88
spec:
99
group: fabricator.githedgehog.com

config/crd/bases/fabricator.githedgehog.com_fabricators.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.16.1
6+
controller-gen.kubebuilder.io/version: v0.17.2
77
name: fabricators.fabricator.githedgehog.com
88
spec:
99
group: fabricator.githedgehog.com

config/rbac/role.yaml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,20 @@ kind: ClusterRole
44
metadata:
55
name: manager-role
66
rules:
7+
- apiGroups:
8+
- ""
9+
resources:
10+
- configmaps
11+
- secrets
12+
- services
13+
verbs:
14+
- create
15+
- delete
16+
- get
17+
- list
18+
- patch
19+
- update
20+
- watch
721
- apiGroups:
822
- apiextensions.k8s.io
923
resources:
@@ -50,20 +64,6 @@ rules:
5064
- certificates/status
5165
verbs:
5266
- get
53-
- apiGroups:
54-
- ""
55-
resources:
56-
- configmaps
57-
- secrets
58-
- services
59-
verbs:
60-
- create
61-
- delete
62-
- get
63-
- list
64-
- patch
65-
- update
66-
- watch
6767
- apiGroups:
6868
- dhcp.githedgehog.com
6969
resources:

go.mod

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ replace gopkg.in/natefinch/lumberjack.v2 v2.2.1 => github.com/githedgehog/lumber
66

77
replace github.com/diskfs/go-diskfs => github.com/Frostman/go-diskfs v1.4.2-hh3
88

9+
tool sigs.k8s.io/controller-tools/cmd/controller-gen
10+
911
require (
1012
dario.cat/mergo v1.0.1
1113
github.com/AlekSi/pointer v1.2.0
@@ -175,6 +177,7 @@ require (
175177
github.com/go-playground/locales v0.14.1 // indirect
176178
github.com/go-playground/universal-translator v0.18.1 // indirect
177179
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
180+
github.com/gobuffalo/flect v1.0.3 // indirect
178181
github.com/gogo/protobuf v1.3.2 // indirect
179182
github.com/golang/glog v1.2.4 // indirect
180183
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
@@ -215,6 +218,7 @@ require (
215218
github.com/hashicorp/serf v0.10.1 // indirect
216219
github.com/hashicorp/vault/api v1.15.0 // indirect
217220
github.com/huandu/xstrings v1.5.0 // indirect
221+
github.com/inconshreveable/mousetrap v1.1.0 // indirect
218222
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
219223
github.com/jhump/protoreflect v1.15.3 // indirect
220224
github.com/jlaffaye/ftp v0.2.0 // indirect
@@ -288,6 +292,7 @@ require (
288292
github.com/sorairolake/lzip-go v0.3.5 // indirect
289293
github.com/spf13/afero v1.12.0 // indirect
290294
github.com/spf13/cast v1.7.1 // indirect
295+
github.com/spf13/cobra v1.9.1 // indirect
291296
github.com/spf13/pflag v1.0.6 // indirect
292297
github.com/stefanberger/go-pkcs11uri v0.0.0-20230803200340-78284954bff6 // indirect
293298
github.com/sylabs/sif/v2 v2.19.1 // indirect
@@ -344,9 +349,11 @@ require (
344349
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
345350
gopkg.in/inf.v0 v0.9.1 // indirect
346351
gopkg.in/warnings.v0 v0.1.2 // indirect
352+
gopkg.in/yaml.v2 v2.4.0 // indirect
347353
gopkg.in/yaml.v3 v3.0.1 // indirect
348354
inet.af/netaddr v0.0.0-20220811202034-502d2d690317 // indirect
349355
k8s.io/kube-openapi v0.0.0-20241212222426-2c72e554b1e7 // indirect
356+
sigs.k8s.io/controller-tools v0.17.2 // indirect
350357
sigs.k8s.io/gateway-api v1.1.0 // indirect
351358
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect
352359
sigs.k8s.io/structured-merge-diff/v4 v4.5.0 // indirect

go.sum

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,8 @@ github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1v
367367
github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8=
368368
github.com/go-test/deep v1.1.1 h1:0r/53hagsehfO4bzD2Pgr/+RgHqhmf+k1Bpse2cTu1U=
369369
github.com/go-test/deep v1.1.1/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE=
370+
github.com/gobuffalo/flect v1.0.3 h1:xeWBM2nui+qnVvNM4S3foBhCAL2XgPU+a7FdpelbTq4=
371+
github.com/gobuffalo/flect v1.0.3/go.mod h1:A5msMlrHtLqh9umBSnvabjsMrCcCpAyzglnDvkbYKHs=
370372
github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
371373
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
372374
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
@@ -529,6 +531,8 @@ github.com/hashicorp/vault/api v1.15.0/go.mod h1:+5YTO09JGn0u+b6ySD/LLVf8WkJCPLA
529531
github.com/huandu/xstrings v1.5.0 h1:2ag3IFq9ZDANvthTwTiqSSZLjDc+BedvHPAp5tJy2TI=
530532
github.com/huandu/xstrings v1.5.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE=
531533
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
534+
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
535+
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
532536
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A=
533537
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo=
534538
github.com/jhump/protoreflect v1.15.3 h1:6SFRuqU45u9hIZPJAoZ8c28T3nK64BNdp9w6jFonzls=
@@ -662,10 +666,14 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8m
662666
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
663667
github.com/nwaples/rardecode/v2 v2.0.0-beta.4.0.20241112120701-034e449c6e78 h1:MYzLheyVx1tJVDqfu3YnN4jtnyALNzLvwl+f58TcvQY=
664668
github.com/nwaples/rardecode/v2 v2.0.0-beta.4.0.20241112120701-034e449c6e78/go.mod h1:yntwv/HfMc/Hbvtq9I19D1n58te3h6KsqCf3GxyfBGY=
669+
github.com/nxadm/tail v1.4.11 h1:8feyoE3OzPrcshW5/MJ4sGESc5cqmGkGCWlco4l0bqY=
670+
github.com/nxadm/tail v1.4.11/go.mod h1:OTaG3NK980DZzxbRq6lEuzgU+mug70nY11sMd4JXXHc=
665671
github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4=
666672
github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U=
667673
github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec=
668674
github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY=
675+
github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
676+
github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU=
669677
github.com/onsi/ginkgo/v2 v2.23.3 h1:edHxnszytJ4lD9D5Jjc4tiDkPBZ3siDeJJkUZJJVkp0=
670678
github.com/onsi/ginkgo/v2 v2.23.3/go.mod h1:zXTP6xIp3U8aVuXN8ENK9IXRaTjFnpVB9mGmaSRvxnM=
671679
github.com/onsi/gomega v1.36.3 h1:hID7cr8t3Wp26+cYnfcjR6HpJ00fdogN6dqZ1t6IylU=
@@ -802,6 +810,8 @@ github.com/spf13/afero v1.12.0 h1:UcOPyRBYczmFn6yvphxkn9ZEOY65cpwGKb5mL36mrqs=
802810
github.com/spf13/afero v1.12.0/go.mod h1:ZTlWwG4/ahT8W7T0WQ5uYmjI9duaLQGy3Q2OAl4sk/4=
803811
github.com/spf13/cast v1.7.1 h1:cuNEagBQEHWN1FnbGEjCXL2szYEXqfJPbP2HNUaca9Y=
804812
github.com/spf13/cast v1.7.1/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo=
813+
github.com/spf13/cobra v1.9.1 h1:CXSaggrXdbHK9CF+8ywj8Amf7PBRmPCOJugH954Nnlo=
814+
github.com/spf13/cobra v1.9.1/go.mod h1:nDyEzZ8ogv936Cinf6g1RU9MRY64Ir93oCnqb9wxYW0=
805815
github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o=
806816
github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
807817
github.com/stefanberger/go-pkcs11uri v0.0.0-20230803200340-78284954bff6 h1:pnnLyeX7o/5aX8qUQ69P/mLojDqwda8hFOCBTmP/6hw=
@@ -1249,6 +1259,8 @@ gopkg.in/evanphx/json-patch.v4 v4.12.0 h1:n6jtcsulIzXPJaxegRbvFNNrZDjbij7ny3gmSP
12491259
gopkg.in/evanphx/json-patch.v4 v4.12.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M=
12501260
gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
12511261
gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
1262+
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
1263+
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
12521264
gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME=
12531265
gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI=
12541266
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
@@ -1293,6 +1305,8 @@ rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
12931305
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
12941306
sigs.k8s.io/controller-runtime v0.20.4 h1:X3c+Odnxz+iPTRobG4tp092+CvBU9UK0t/bRf+n0DGU=
12951307
sigs.k8s.io/controller-runtime v0.20.4/go.mod h1:xg2XB0K5ShQzAgsoujxuKN4LNXR2LfwwHsPj7Iaw+XY=
1308+
sigs.k8s.io/controller-tools v0.17.2 h1:jNFOKps8WnaRKZU2R+4vRCHnXyJanVmXBWqkuUPFyFg=
1309+
sigs.k8s.io/controller-tools v0.17.2/go.mod h1:4q5tZG2JniS5M5bkiXY2/potOiXyhoZVw/U48vLkXk0=
12961310
sigs.k8s.io/gateway-api v1.1.0 h1:DsLDXCi6jR+Xz8/xd0Z1PYl2Pn0TyaFMOPPZIj4inDM=
12971311
sigs.k8s.io/gateway-api v1.1.0/go.mod h1:ZH4lHrL2sDi0FHZ9jjneb8kKnGzFWyrTya35sWUTrRs=
12981312
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 h1:gBQPwqORJ8d8/YNZWEjoZs7npUVDpVXUUOFfW6CgAqE=

hack/tools.just

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ _localbin:
2525
@mkdir -p {{localbin}}
2626

2727
# Download all tools locally
28-
tools: _kustomize _controller_gen _envtest _golangci_lint _butane _addlicense _crd_ref_docs _helm _helmify _oras _actionlint _skopeo _gcov2lcov
28+
tools: _kustomize _envtest _golangci_lint _butane _addlicense _crd_ref_docs _helm _helmify _oras _actionlint _skopeo _gcov2lcov
2929

3030
# kustomize
3131
kustomize_version := "v5.4.3"
@@ -34,10 +34,7 @@ kustomize := localbin / "kustomize" + "-" + kustomize_version
3434
[ -f {{kustomize}} ] || just _goinstall "sigs.k8s.io/kustomize/kustomize/v5" {{kustomize_version}} "kustomize" {{kustomize}}
3535

3636
# controller-gen
37-
controller_gen_version := "v0.16.1"
38-
controller_gen := localbin / "controller-gen" + "-" + controller_gen_version
39-
@_controller_gen: _localbin
40-
[ -f {{controller_gen}} ] || just _goinstall "sigs.k8s.io/controller-tools/cmd/controller-gen" {{controller_gen_version}} "controller-gen" {{controller_gen}}
37+
controller_gen := "go tool controller-gen"
4138

4239
# envtest
4340
envtest_k8s_version := "1.31.0"

justfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ _hhfab_embed: _touch_embed _butane
4747
{{butane}} --strict --output {{oem_dir}}/usr/share/oem/config.ign --files-dir {{oem_dir}} ./pkg/fab/recipe/flatcar/os_install_butane.yaml
4848
cd {{oem_dir}} && find usr | cpio -o -H newc | gzip -f > oem.cpio.gz
4949

50-
_kube_gen: _controller_gen
50+
_kube_gen:
5151
# Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject implementations
5252
{{controller_gen}} object:headerFile="hack/boilerplate.go.txt" paths="./..."
5353
# Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects

vendor/github.com/gobuffalo/flect/.gitignore

Lines changed: 29 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/gobuffalo/flect/.gometalinter.json

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)