🌱 Fix go generate validation#1348
Conversation
| limitations under the License. | ||
| */ | ||
|
|
||
| //go:generate ../../../../../.run-controller-gen.sh crd:crdVersions=v1beta1 paths=. output:dir=. |
There was a problem hiding this comment.
We don't support v1beta1 CRDs
| // trusting k/k conversion, which is probably fine though) | ||
|
|
||
| //go:generate ../../../.run-controller-gen.sh crd:ignoreUnexportedFields=true,allowDangerousTypes=true paths=./;./deprecated;./unserved;./job/... output:dir=. | ||
| //go:generate bash -c "! ../../../../.run-controller-gen.sh crd:ignoreUnexportedFields=true,allowDangerousTypes=true paths=. output:none" |
There was a problem hiding this comment.
This is expected to fail, so assert that
| //go:generate ../../../../../../.run-controller-gen.sh crd:ignoreUnexportedFields=true,allowDangerousTypes=true paths=./;./deprecated;./unserved;./job/... output:dir=. | ||
| //go:generate ../../../../../../.run-controller-gen.sh crd:ignoreUnexportedFields=true,allowDangerousTypes=true paths=. output:dir=. | ||
|
|
||
| // +groupName=testdata.kubebuilder.io |
There was a problem hiding this comment.
The generated CRD is almost identical with the generated CRD under pkg/crd/testdata/ but the issue is in the almost - We removed some fields because the AC generator doesn't support them and in order to write an envtest test in #1346 I need a CRD with a schema
There was a problem hiding this comment.
Do you know which fields were removed, can we comment with that list? Do we want to keep this in ~sync in the future?
There was a problem hiding this comment.
We generally just comment them out, e.G. here: https://github.com/kubernetes-sigs/controller-tools/pull/1346/changes#diff-d8169aa02594b49946ef0329f828f88afae342f4f508f7b8bad1fab9d66ffd0aR302
a4bc07f to
16ca7ef
Compare
|
Thank you! /lgtm /hold |
|
LGTM label has been added. DetailsGit tree hash: 57971dcba7ed800ee9fb0d46156717e2482e5455 |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alvaroaleman, JoelSpeed The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Uh oh!
There was an error while loading. Please reload this page.