-
Notifications
You must be signed in to change notification settings - Fork 427
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nested anonymous structs cause panic when generating CRDs #340
Comments
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Rotten issues close after 30d of inactivity. Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
@fejta-bot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
This issue was found while using
controller-tools
with Kubebuilder.To reproduce:
Create a new Kubebuilder v2 project:
go mod init example.com/m kubebuilder init --domain example.com --license apache2 --owner "Test Owner" kubebuilder create api --group ship --version v1 --kind Frigate
In
./api/v1/frigate_types.go
, modifyFrigateSpec
to be:And run
make manifests
.Expected behavior:
controller-get
is fetched, and the CRDs are generated.Actual behavior: I get the following panic:
The panic occurs whether or not the struct contains any fields. When the struct is removed,
make manifests
succeeds as expected.For an example of nested anonymous structs in use, check out https://medium.com/@xcoulon/nested-structs-in-golang-2c750403a007.
The text was updated successfully, but these errors were encountered: