You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The version of `controller-gen` that we currently use (0.6.1) crashes
when running with recent versions of Go. For example:
```
$ go version
go version go1.22.5 linux/amd64
$ make build
Installing sigs.k8s.io/controller-tools/cmd/[email protected]
Installing github.com/golang/mock/mockgen@latest
cd api; /files/projects/openshift/cluster-api-provider-agent/repository/bin/controller-gen object:headerFile="../hack/boilerplate.go.txt" paths="./..."
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x9ed5cf]
```
The oldest version that doesn't fail like that is 0.14. This patch
updates to that version.
Note that according to the `controller-gen` documentation version 0.14
of the tool is compatible with `k8s.io` and `client-go` version 0.29 or
newer, and we are currently in 0.28, so in theory we should use version
0.13 of `controller-gen`, but it crashes as well.
A side effect of the update that is that we can no longer use the
`crd:preserveUnknownFields=false` option. But that is the default with
the version of the CRD API that we use.
The changes to the generated Go and YAML aren't relevant, mostly minor
formatting changes in _description_ fields.
Related: https://issues.redhat.com/browse/MGMT-18606
Related: https://github.com/kubernetes-sigs/controller-tools?tab=readme-ov-file#compatibility
Signed-off-by: Juan Hernandez <[email protected]>
description: AgentCluster is the Schema for the agentclusters API
25
23
properties:
26
24
apiVersion:
27
-
description: 'APIVersion defines the versioned schema of this representation
28
-
of an object. Servers should convert recognized schemas to the latest
29
-
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
25
+
description: |-
26
+
APIVersion defines the versioned schema of this representation of an object.
27
+
Servers should convert recognized schemas to the latest internal value, and
28
+
may reject unrecognized values.
29
+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
30
30
type: string
31
31
kind:
32
-
description: 'Kind is a string value representing the REST resource this
33
-
object represents. Servers may infer this from the endpoint the client
34
-
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
32
+
description: |-
33
+
Kind is a string value representing the REST resource this object represents.
34
+
Servers may infer this from the endpoint the client submits requests to.
35
+
Cannot be updated.
36
+
In CamelCase.
37
+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
35
38
type: string
36
39
metadata:
37
40
type: object
@@ -58,9 +61,9 @@ spec:
58
61
endpoint.
59
62
properties:
60
63
caCertificateReference:
61
-
description: CaCertificateReference is a reference to the secret
62
-
containing CA certificate to be used when contacting the URL
63
-
via HTTPS.
64
+
description: |-
65
+
CaCertificateReference is a reference to the secret containing CA certificate to be used
66
+
when contacting the URL via HTTPS.
64
67
properties:
65
68
name:
66
69
description: Name is the name of the secret containing the
@@ -102,37 +105,37 @@ spec:
102
105
operational state.
103
106
properties:
104
107
lastTransitionTime:
105
-
description: Last time the condition transitioned from one status
106
-
to another. This should be when the underlying condition changed.
107
-
If that is not known, then using the time when the API field
108
-
changed is acceptable.
108
+
description: |-
109
+
Last time the condition transitioned from one status to another.
110
+
This should be when the underlying condition changed. If that is not known, then using the time when
111
+
the API field changed is acceptable.
109
112
format: date-time
110
113
type: string
111
114
message:
112
-
description: A human readable message indicating details about
113
-
the transition. This field may be empty.
115
+
description: |-
116
+
A human readable message indicating details about the transition.
117
+
This field may be empty.
114
118
type: string
115
119
reason:
116
-
description: The reason for the condition's last transition
117
-
in CamelCase. The specific API may choose whether or not this
118
-
field is considered a guaranteed API. This field may not be
119
-
empty.
120
+
description: |-
121
+
The reason for the condition's last transition in CamelCase.
122
+
The specific API may choose whether or not this field is considered a guaranteed API.
123
+
This field may not be empty.
120
124
type: string
121
125
severity:
122
-
description: Severity provides an explicit classification of
123
-
Reason code, so the users or machines can immediately understand
124
-
the current situation and act accordingly. The Severity field
125
-
MUST be set only when Status=False.
126
+
description: |-
127
+
Severity provides an explicit classification of Reason code, so the users or machines can immediately
128
+
understand the current situation and act accordingly.
129
+
The Severity field MUST be set only when Status=False.
126
130
type: string
127
131
status:
128
132
description: Status of the condition, one of True, False, Unknown.
129
133
type: string
130
134
type:
131
-
description: Type of condition in CamelCase or in foo.example.com/CamelCase.
132
-
Many .condition.type values are consistent across resources
133
-
like Available, but because arbitrary conditions can be useful
134
-
(see .node.status.conditions), the ability to deconflict is
135
-
important.
135
+
description: |-
136
+
Type of condition in CamelCase or in foo.example.com/CamelCase.
137
+
Many .condition.type values are consistent across resources like Available, but because arbitrary conditions
138
+
can be useful (see .node.status.conditions), the ability to deconflict is important.
136
139
type: string
137
140
required:
138
141
- lastTransitionTime
@@ -142,9 +145,9 @@ spec:
142
145
type: array
143
146
failureDomains:
144
147
additionalProperties:
145
-
description: FailureDomainSpec is the Schema for Cluster API failure
146
-
domains. It allows controllers to understand how many failure
147
-
domains a cluster can optionally span across.
148
+
description: |-
149
+
FailureDomainSpec is the Schema for Cluster API failure domains.
150
+
It allows controllers to understand how many failure domains a cluster can optionally span across.
148
151
properties:
149
152
attributes:
150
153
additionalProperties:
@@ -176,14 +179,19 @@ spec:
176
179
description: AgentCluster is the Schema for the agentclusters API
177
180
properties:
178
181
apiVersion:
179
-
description: 'APIVersion defines the versioned schema of this representation
180
-
of an object. Servers should convert recognized schemas to the latest
181
-
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
182
+
description: |-
183
+
APIVersion defines the versioned schema of this representation of an object.
184
+
Servers should convert recognized schemas to the latest internal value, and
185
+
may reject unrecognized values.
186
+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
182
187
type: string
183
188
kind:
184
-
description: 'Kind is a string value representing the REST resource this
185
-
object represents. Servers may infer this from the endpoint the client
186
-
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
189
+
description: |-
190
+
Kind is a string value representing the REST resource this object represents.
191
+
Servers may infer this from the endpoint the client submits requests to.
192
+
Cannot be updated.
193
+
In CamelCase.
194
+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
187
195
type: string
188
196
metadata:
189
197
type: object
@@ -210,9 +218,9 @@ spec:
210
218
endpoint.
211
219
properties:
212
220
caCertificateReference:
213
-
description: CaCertificateReference is a reference to the secret
214
-
containing CA certificate to be used when contacting the URL
215
-
via HTTPS.
221
+
description: |-
222
+
CaCertificateReference is a reference to the secret containing CA certificate to be used
223
+
when contacting the URL via HTTPS.
216
224
properties:
217
225
name:
218
226
description: Name is the name of the secret containing the
@@ -254,37 +262,37 @@ spec:
254
262
operational state.
255
263
properties:
256
264
lastTransitionTime:
257
-
description: Last time the condition transitioned from one status
258
-
to another. This should be when the underlying condition changed.
259
-
If that is not known, then using the time when the API field
260
-
changed is acceptable.
265
+
description: |-
266
+
Last time the condition transitioned from one status to another.
267
+
This should be when the underlying condition changed. If that is not known, then using the time when
268
+
the API field changed is acceptable.
261
269
format: date-time
262
270
type: string
263
271
message:
264
-
description: A human readable message indicating details about
265
-
the transition. This field may be empty.
272
+
description: |-
273
+
A human readable message indicating details about the transition.
274
+
This field may be empty.
266
275
type: string
267
276
reason:
268
-
description: The reason for the condition's last transition
269
-
in CamelCase. The specific API may choose whether or not this
270
-
field is considered a guaranteed API. This field may not be
271
-
empty.
277
+
description: |-
278
+
The reason for the condition's last transition in CamelCase.
279
+
The specific API may choose whether or not this field is considered a guaranteed API.
280
+
This field may not be empty.
272
281
type: string
273
282
severity:
274
-
description: Severity provides an explicit classification of
275
-
Reason code, so the users or machines can immediately understand
276
-
the current situation and act accordingly. The Severity field
277
-
MUST be set only when Status=False.
283
+
description: |-
284
+
Severity provides an explicit classification of Reason code, so the users or machines can immediately
285
+
understand the current situation and act accordingly.
286
+
The Severity field MUST be set only when Status=False.
278
287
type: string
279
288
status:
280
289
description: Status of the condition, one of True, False, Unknown.
281
290
type: string
282
291
type:
283
-
description: Type of condition in CamelCase or in foo.example.com/CamelCase.
284
-
Many .condition.type values are consistent across resources
285
-
like Available, but because arbitrary conditions can be useful
286
-
(see .node.status.conditions), the ability to deconflict is
287
-
important.
292
+
description: |-
293
+
Type of condition in CamelCase or in foo.example.com/CamelCase.
294
+
Many .condition.type values are consistent across resources like Available, but because arbitrary conditions
295
+
can be useful (see .node.status.conditions), the ability to deconflict is important.
288
296
type: string
289
297
required:
290
298
- lastTransitionTime
@@ -294,9 +302,9 @@ spec:
294
302
type: array
295
303
failureDomains:
296
304
additionalProperties:
297
-
description: FailureDomainSpec is the Schema for Cluster API failure
298
-
domains. It allows controllers to understand how many failure
299
-
domains a cluster can optionally span across.
305
+
description: |-
306
+
FailureDomainSpec is the Schema for Cluster API failure domains.
307
+
It allows controllers to understand how many failure domains a cluster can optionally span across.
0 commit comments