Skip to content

Commit b361fc2

Browse files
committed
fix(build): bump controller-gen v0.14.0 -> v0.16.5 for Go 1.26 compat
controller-gen@v0.14.0 fails to build under Go 1.26.2 (this repo's declared version): it depends on golang.org/x/tools@v0.16.1's tokeninternal package, which asserts its shadow struct's size matches token.FileSet's internal layout at compile time. That layout has since changed, so the assertion now correctly fails to compile. Any fresh checkout hits this immediately; it was only invisible on machines with a controller-gen binary cached from before the Go 1.26 bump, since the Makefile only rebuilds it when missing. v0.16.5 is the oldest patch release that builds cleanly under Go 1.26.2 (v0.14.0 through v0.16.3 all fail the same way). Regenerated manifests/generate/fmt output: CRD diffs are the version annotation plus one stale upstream TODO comment; zz_generated.deepcopy.go is byte-identical; config/rbac/role.yaml collapses previously-redundant rules but grants the exact same effective permissions per resource (verified by diffing the per-resource verb unions, not just the raw rule list).
1 parent 121ac7e commit b361fc2

10 files changed

Lines changed: 19 additions & 189 deletions

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ publish-infra-yaml:kustomize # Generate infrastructure-components.yaml for the p
208208

209209
CONTROLLER_GEN = $(shell pwd)/bin/controller-gen
210210
controller-gen: ## Download controller-gen locally if necessary.
211-
$(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.14.0)
211+
$(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.16.5)
212212

213213
KUSTOMIZE = $(shell pwd)/bin/kustomize
214214
kustomize: ## Download kustomize locally if necessary.

config/crd/bases/infrastructure.cluster.x-k8s.io_bootstrapkubeconfigs.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.14.0
6+
controller-gen.kubebuilder.io/version: v0.16.5
77
name: bootstrapkubeconfigs.infrastructure.cluster.x-k8s.io
88
spec:
99
group: infrastructure.cluster.x-k8s.io

config/crd/bases/infrastructure.cluster.x-k8s.io_byoclusters.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.14.0
6+
controller-gen.kubebuilder.io/version: v0.16.5
77
name: byoclusters.infrastructure.cluster.x-k8s.io
88
spec:
99
group: infrastructure.cluster.x-k8s.io

config/crd/bases/infrastructure.cluster.x-k8s.io_byoclustertemplates.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.14.0
6+
controller-gen.kubebuilder.io/version: v0.16.5
77
name: byoclustertemplates.infrastructure.cluster.x-k8s.io
88
spec:
99
group: infrastructure.cluster.x-k8s.io

config/crd/bases/infrastructure.cluster.x-k8s.io_byohosts.yaml

Lines changed: 1 addition & 5 deletions
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.14.0
6+
controller-gen.kubebuilder.io/version: v0.16.5
77
name: byohosts.infrastructure.cluster.x-k8s.io
88
spec:
99
group: infrastructure.cluster.x-k8s.io
@@ -68,7 +68,6 @@ spec:
6868
the event) or if no container name is specified "spec.containers[2]" (container with
6969
index 2 in this pod). This syntax is chosen only to have some well-defined way of
7070
referencing a part of an object.
71-
TODO: this design is not final and this field is subject to change in the future.
7271
type: string
7372
kind:
7473
description: |-
@@ -114,7 +113,6 @@ spec:
114113
the event) or if no container name is specified "spec.containers[2]" (container with
115114
index 2 in this pod). This syntax is chosen only to have some well-defined way of
116115
referencing a part of an object.
117-
TODO: this design is not final and this field is subject to change in the future.
118116
type: string
119117
kind:
120118
description: |-
@@ -161,7 +159,6 @@ spec:
161159
the event) or if no container name is specified "spec.containers[2]" (container with
162160
index 2 in this pod). This syntax is chosen only to have some well-defined way of
163161
referencing a part of an object.
164-
TODO: this design is not final and this field is subject to change in the future.
165162
type: string
166163
kind:
167164
description: |-
@@ -268,7 +265,6 @@ spec:
268265
the event) or if no container name is specified "spec.containers[2]" (container with
269266
index 2 in this pod). This syntax is chosen only to have some well-defined way of
270267
referencing a part of an object.
271-
TODO: this design is not final and this field is subject to change in the future.
272268
type: string
273269
kind:
274270
description: |-

config/crd/bases/infrastructure.cluster.x-k8s.io_byomachines.yaml

Lines changed: 1 addition & 2 deletions
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.14.0
6+
controller-gen.kubebuilder.io/version: v0.16.5
77
name: byomachines.infrastructure.cluster.x-k8s.io
88
spec:
99
group: infrastructure.cluster.x-k8s.io
@@ -58,7 +58,6 @@ spec:
5858
the event) or if no container name is specified "spec.containers[2]" (container with
5959
index 2 in this pod). This syntax is chosen only to have some well-defined way of
6060
referencing a part of an object.
61-
TODO: this design is not final and this field is subject to change in the future.
6261
type: string
6362
kind:
6463
description: |-

config/crd/bases/infrastructure.cluster.x-k8s.io_byomachinetemplates.yaml

Lines changed: 1 addition & 2 deletions
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.14.0
6+
controller-gen.kubebuilder.io/version: v0.16.5
77
name: byomachinetemplates.infrastructure.cluster.x-k8s.io
88
spec:
99
group: infrastructure.cluster.x-k8s.io
@@ -62,7 +62,6 @@ spec:
6262
the event) or if no container name is specified "spec.containers[2]" (container with
6363
index 2 in this pod). This syntax is chosen only to have some well-defined way of
6464
referencing a part of an object.
65-
TODO: this design is not final and this field is subject to change in the future.
6665
type: string
6766
kind:
6867
description: |-

config/crd/bases/infrastructure.cluster.x-k8s.io_k8sinstallerconfigs.yaml

Lines changed: 1 addition & 3 deletions
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.14.0
6+
controller-gen.kubebuilder.io/version: v0.16.5
77
name: k8sinstallerconfigs.infrastructure.cluster.x-k8s.io
88
spec:
99
group: infrastructure.cluster.x-k8s.io
@@ -67,7 +67,6 @@ spec:
6767
the event) or if no container name is specified "spec.containers[2]" (container with
6868
index 2 in this pod). This syntax is chosen only to have some well-defined way of
6969
referencing a part of an object.
70-
TODO: this design is not final and this field is subject to change in the future.
7170
type: string
7271
kind:
7372
description: |-
@@ -114,7 +113,6 @@ spec:
114113
the event) or if no container name is specified "spec.containers[2]" (container with
115114
index 2 in this pod). This syntax is chosen only to have some well-defined way of
116115
referencing a part of an object.
117-
TODO: this design is not final and this field is subject to change in the future.
118116
type: string
119117
kind:
120118
description: |-

config/crd/bases/infrastructure.cluster.x-k8s.io_k8sinstallerconfigtemplates.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.14.0
6+
controller-gen.kubebuilder.io/version: v0.16.5
77
name: k8sinstallerconfigtemplates.infrastructure.cluster.x-k8s.io
88
spec:
99
group: infrastructure.cluster.x-k8s.io

config/rbac/role.yaml

Lines changed: 10 additions & 172 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,6 @@ kind: ClusterRole
44
metadata:
55
name: manager-role
66
rules:
7-
- apiGroups:
8-
- ""
9-
resources:
10-
- events
11-
verbs:
12-
- create
13-
- get
14-
- list
15-
- patch
16-
- update
17-
- watch
187
- apiGroups:
198
- ""
209
resources:
@@ -28,15 +17,6 @@ rules:
2817
- patch
2918
- update
3019
- watch
31-
- apiGroups:
32-
- ""
33-
resources:
34-
- secrets
35-
verbs:
36-
- delete
37-
- get
38-
- list
39-
- watch
4020
- apiGroups:
4121
- certificates.k8s.io
4222
resources:
@@ -65,22 +45,6 @@ rules:
6545
resources:
6646
- clusters
6747
- clusters/status
68-
verbs:
69-
- get
70-
- list
71-
- watch
72-
- apiGroups:
73-
- cluster.x-k8s.io
74-
resources:
75-
- clusters
76-
- machines
77-
verbs:
78-
- get
79-
- list
80-
- watch
81-
- apiGroups:
82-
- cluster.x-k8s.io
83-
resources:
8448
- machines
8549
- machines/status
8650
verbs:
@@ -91,147 +55,11 @@ rules:
9155
- infrastructure.cluster.x-k8s.io
9256
resources:
9357
- '*'
94-
verbs:
95-
- create
96-
- delete
97-
- get
98-
- list
99-
- patch
100-
- update
101-
- watch
102-
- apiGroups:
103-
- infrastructure.cluster.x-k8s.io
104-
resources:
10558
- bootstrapkubeconfigs
106-
verbs:
107-
- create
108-
- delete
109-
- get
110-
- list
111-
- patch
112-
- update
113-
- watch
114-
- apiGroups:
115-
- infrastructure.cluster.x-k8s.io
116-
resources:
117-
- bootstrapkubeconfigs/finalizers
118-
verbs:
119-
- update
120-
- apiGroups:
121-
- infrastructure.cluster.x-k8s.io
122-
resources:
123-
- bootstrapkubeconfigs/status
124-
verbs:
125-
- get
126-
- patch
127-
- update
128-
- apiGroups:
129-
- infrastructure.cluster.x-k8s.io
130-
resources:
13159
- byoclusters
132-
verbs:
133-
- create
134-
- delete
135-
- get
136-
- list
137-
- patch
138-
- update
139-
- watch
140-
- apiGroups:
141-
- infrastructure.cluster.x-k8s.io
142-
resources:
143-
- byoclusters/finalizers
144-
verbs:
145-
- update
146-
- apiGroups:
147-
- infrastructure.cluster.x-k8s.io
148-
resources:
149-
- byoclusters/status
150-
verbs:
151-
- get
152-
- patch
153-
- update
154-
- apiGroups:
155-
- infrastructure.cluster.x-k8s.io
156-
resources:
15760
- byohosts
158-
verbs:
159-
- create
160-
- delete
161-
- get
162-
- list
163-
- patch
164-
- update
165-
- watch
166-
- apiGroups:
167-
- infrastructure.cluster.x-k8s.io
168-
resources:
169-
- byohosts/finalizers
170-
verbs:
171-
- update
172-
- apiGroups:
173-
- infrastructure.cluster.x-k8s.io
174-
resources:
175-
- byohosts/status
176-
verbs:
177-
- get
178-
- patch
179-
- update
180-
- apiGroups:
181-
- infrastructure.cluster.x-k8s.io
182-
resources:
18361
- byomachines
184-
verbs:
185-
- create
186-
- delete
187-
- get
188-
- list
189-
- patch
190-
- update
191-
- watch
192-
- apiGroups:
193-
- infrastructure.cluster.x-k8s.io
194-
resources:
195-
- byomachines/finalizers
196-
verbs:
197-
- update
198-
- apiGroups:
199-
- infrastructure.cluster.x-k8s.io
200-
resources:
201-
- byomachines/status
202-
verbs:
203-
- get
204-
- patch
205-
- update
206-
- apiGroups:
207-
- infrastructure.cluster.x-k8s.io
208-
resources:
20962
- byomachinetemplates
210-
verbs:
211-
- create
212-
- delete
213-
- get
214-
- list
215-
- patch
216-
- update
217-
- watch
218-
- apiGroups:
219-
- infrastructure.cluster.x-k8s.io
220-
resources:
221-
- byomachinetemplates/finalizers
222-
verbs:
223-
- update
224-
- apiGroups:
225-
- infrastructure.cluster.x-k8s.io
226-
resources:
227-
- byomachinetemplates/status
228-
verbs:
229-
- get
230-
- patch
231-
- update
232-
- apiGroups:
233-
- infrastructure.cluster.x-k8s.io
234-
resources:
23563
- k8sinstallerconfigs
23664
verbs:
23765
- create
@@ -244,12 +72,22 @@ rules:
24472
- apiGroups:
24573
- infrastructure.cluster.x-k8s.io
24674
resources:
75+
- bootstrapkubeconfigs/finalizers
76+
- byoclusters/finalizers
77+
- byohosts/finalizers
78+
- byomachines/finalizers
79+
- byomachinetemplates/finalizers
24780
- k8sinstallerconfigs/finalizers
24881
verbs:
24982
- update
25083
- apiGroups:
25184
- infrastructure.cluster.x-k8s.io
25285
resources:
86+
- bootstrapkubeconfigs/status
87+
- byoclusters/status
88+
- byohosts/status
89+
- byomachines/status
90+
- byomachinetemplates/status
25391
- k8sinstallerconfigs/status
25492
verbs:
25593
- get

0 commit comments

Comments
 (0)