Skip to content

Operator-sdk doesn't work inside of docker container #3429

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

Closed
kotyara85 opened this issue Jul 15, 2020 · 1 comment
Closed

Operator-sdk doesn't work inside of docker container #3429

kotyara85 opened this issue Jul 15, 2020 · 1 comment
Assignees
Labels
triage/support Indicates an issue that is a support question.

Comments

@kotyara85
Copy link

What did you do?
run docker with operator-sdk in it

What did you expect to see?
operator-sdk run without any errors

What did you see instead? Under which circumstances?
time="2020-07-15T04:17:46Z" level=info msg="Running deepcopy code-generation for Custom Resource group versions: [app:[v1alpha1], ]\n"
F0715 04:17:46.926457 11 deepcopy.go:885] Hit an unsupported type invalid type for invalid type, from pkg/apis/app/v1alpha1.AppService
make: *** [Makefile:24: operator-sdk] Error 255

Environment

  • operator-sdk version: 0.18.2
  • go version:

1.13.8

@camilamacedo86
Copy link
Contributor

Hi @kotyara85,

The SDK tool is working in the place where you added it. However, you are facing the issue Hit an unsupported type invalid type for invalid type, from which can be because you have an error in the implementation of (AppService)*_type.go or because of the local configuration is not accurate.

See here that this issue is common when the local env is not properly set. PS.: Just as a tip, you can looking for similar issues always to see if it was faced for others and how it was solved.

Also, see that this scenario is documented in: https://sdk.operatorframework.io/docs/faq/#i-see-deepcopy-errors-and-image-build-fails-how-do-i-fix-this

In order to fix this, you simply need to export the GOROOT environment variable
$ export GOROOT=$(go env GOROOT)

PS.: may the #2979 (comment) help you see how Go works inside and outside of its path.

I am closing this one as sorted out. However, please feel free to ping us to re-open if you need and/or raise new issues. Note that, if you have further/other questions I'd kindly ask for you raise a new issue. We try to keep 1 subject/question per issue is helpful for we are able to collab with more assertively as easier to others who are facing similar issues and are looking in the tracked ones.

@camilamacedo86 camilamacedo86 added the triage/support Indicates an issue that is a support question. label Jul 15, 2020
@camilamacedo86 camilamacedo86 self-assigned this Jul 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage/support Indicates an issue that is a support question.
Projects
None yet
Development

No branches or pull requests

2 participants