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

Kubebuilder inits in go1.16 and pkgs miss methods later on #2518

Closed
nikfot opened this issue Feb 23, 2022 · 2 comments
Closed

Kubebuilder inits in go1.16 and pkgs miss methods later on #2518

nikfot opened this issue Feb 23, 2022 · 2 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. kind/support Categorizes issue or PR as a support question. triage/needs-information Indicates an issue needs more information in order to work on it.

Comments

@nikfot
Copy link

nikfot commented Feb 23, 2022

What broke? What's expected?

I am followin the basic tutorial documentation, just instead of creating a CronJob I try it out with a deployment. It initiates the env with go1.16 in go.mod.

Later on, when running kubebuilder create api --group apps --version v1 --kind Deployment I get errors saying Deployment struct is missing DeepCopy method.

When changing the version in go.mod and running go mod tidy it fixes all issues.

Reproducing this issue

  1. kubebuilder init --domain tutorial.kubebuilder.io --repo tutorial.kubebuilder.io/project
  2. kubebuilder create api --group apps --version v1 --kind Deployment

KubeBuilder (CLI) Version

Version: main.version{KubeBuilderVersion:"v3.0.0-alpha.0-411-gf4dbb5c8", KubernetesVendor:"unknown", GitCommit:"f4dbb5c82e436c6943d81abb2bf0b5b2b3478921", BuildDate:"2021-12-14T07:10:30Z", GoOs:"linux", GoArch:"amd64"}

PROJECT version

3

Plugin versions

No response

Other versions

go version go1.17.7 linux/amd64

Extra Labels

No response

@nikfot nikfot added the kind/bug Categorizes issue or PR as related to a bug. label Feb 23, 2022
@camilamacedo86
Copy link
Member

Hi @nikfot,

You are using Kubebuilder v3.0.0 right? So, the go version supported for it is 1.15 : https://github.com/kubernetes-sigs/kubebuilder/blob/v3.0.0/go.mod#L3

Please, see the comment: #2512 (comment)

Also, could you please check if your issue scenario can be reproduced with the latest KB release and go 1.17+?

@camilamacedo86 camilamacedo86 added kind/support Categorizes issue or PR as a support question. triage/needs-information Indicates an issue needs more information in order to work on it. labels Feb 23, 2022
@nikfot
Copy link
Author

nikfot commented Feb 23, 2022

Hello @camilamacedo86 ,

I now sow the copatibility matrix between kubebuilder and go, although I was on master so I thought it was enough in the first place.

Anyway, I installed kubebuilder v3.3.0 and the issue is fixed.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. kind/support Categorizes issue or PR as a support question. triage/needs-information Indicates an issue needs more information in order to work on it.
Projects
None yet
Development

No branches or pull requests

2 participants