Skip to content
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

"make generate" results in error due to invalid type: interface{} #131

Open
mikeshng opened this issue Mar 21, 2022 · 0 comments
Open

"make generate" results in error due to invalid type: interface{} #131

mikeshng opened this issue Mar 21, 2022 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@mikeshng
Copy link
Member

mikeshng commented Mar 21, 2022

Describe the bug
The make generate Makefile target currently doesn't work because of the helmrelease_types.go contains a spec field that has interface{}.

The current workaround is:
Commented out the following 2 lines in helmrelease_types.go

1) Spec   HelmAppSpec   `json:"spec,omitempty"`
2) type HelmAppSpec interface{} // modified

then run make generate then exclude the helmrelease related changes

$ git checkout -- pkg/apis/apps/helmrelease/v1/helmrelease_types.go 
$ git checkout  -- pkg/apis/apps/helmrelease/v1/zz_generated.deepcopy.go

It seems like controller-gen used to support interface but not anymore probably due to security reason.
We will need to look into how to modify this field and most importantly maintain backward compatibility.
See some suggestions in https://github.com/kubernetes-sigs/controller-tools/issues/636

To Reproduce
Run make generate

Expected behavior
make generate to return successfully.

Additional context
Thank you @TomerFi for discovering and reporting this issue.

@mikeshng mikeshng added the bug Something isn't working label Mar 21, 2022
@mikeshng mikeshng self-assigned this Mar 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant