Commit e408814
authored
Upgrade controller-gen to address panics from go generate directive (#2167)
Summary: Upgrade controller-gen to address panics from go generate
directive
Our go upgrade to 1.24 caused our controller-gen's `go generate`
directive to start failing. This is because the `trivialVersions`
setting of controller-gen was removed. From searching the controller-gen
issues, I believe Go 1.22 and later hits this problem for controller-gen
versions < v0.14
(kubernetes-sigs/controller-tools#888 (comment))
The `pr-genfiles` GitHub action that runs our go generates does not
trigger on `go.mod` or `go.sum` changes, so this was missed when Go was
upgraded.
I'm not too familiar with controller-gen and the generated file changes
are minor, but please let me know if this requires more extensive
testing. If there were larger CRD changes, I would expect that it would
require testing on different k8s versions with an operator release
build. I don't think this change warrants it, but please advise if you
feel differently.
Relevant Issues: N/A
Type of change: /kind bugfix
Test Plan: Inspected generated file changes
- [x] `px.dev_viziers.yaml`: Description changes are all whitespace
changes and appear equivalent
- [x] `px.dev_viziers.yaml`: CRD top level `status` field was removed. I
don't believe our operator code uses this nor did I see any reference
from k8s release notes on this deprecation
- [x] Removal of `// +build !ignore_autogenerated` -- this is an older
syntax from controller-gen's pre Go 1.17 usage
---------
Signed-off-by: Dom Del Nano <ddelnano@gmail.com>1 parent abe7238 commit e408814
File tree
6 files changed
+117
-115
lines changed- k8s/operator/crd/base
- src/operator/apis/px.dev/v1alpha1
- tools/chef
- cookbooks/px_dev/recipes
6 files changed
+117
-115
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
0 commit comments