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

vendor/sigs.k8s.io/kustomize/pkg/transformers/config/factorycrd.go:71:47: cannot use api.Schema.SchemaProps.Properties (type spec.SchemaProperties) as type myProperties in argument to looksLikeAk8sType #3262

Closed
geokb opened this issue Nov 22, 2020 · 10 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. triage/needs-information Indicates an issue needs more information in order to work on it.

Comments

@geokb
Copy link

geokb commented Nov 22, 2020

Upon upgrading my k8s.io/client-go dependency from v0.18 to v0.19, the build fails with the message. This failure happens both in my machine and in Github action runners.

vendor/sigs.k8s.io/kustomize/pkg/transformers/config/factorycrd.go:71:47: cannot use api.Schema.SchemaProps.Properties (type spec.SchemaProperties) as type myProperties in argument to looksLikeAk8sType

If that helps, here is the output of go mod graph | grep kustomize

k8s.io/kubectl@v0.19.0 sigs.k8s.io/kustomize@v2.0.3+incompatible
k8s.io/kubectl@v0.19.3 sigs.k8s.io/kustomize@v2.0.3+incompatible
k8s.io/cli-runtime@v0.19.3 sigs.k8s.io/kustomize@v2.0.3+incompatible
k8s.io/cli-runtime@v0.19.0 sigs.k8s.io/kustomize@v2.0.3+incompatible

The weird thing is that the error itself doesn't make any sense. I checked that file sigs.k8s.io/kustomize/pkg/transformers/config/factorycrd.go:71 and the types are equivalent. The solution in helm/helm#8616 (comment) is not really a solution since it pins k8s.io/client-go to v0.18

@Shell32-Natsu
Copy link
Contributor

Looks like thats a very old version of kustomize. Can you update to newer version?

@Shell32-Natsu Shell32-Natsu added kind/bug Categorizes issue or PR as related to a bug. triage/needs-information Indicates an issue needs more information in order to work on it. labels Nov 23, 2020
@geokb
Copy link
Author

geokb commented Nov 23, 2020

I don't have kustomize as a direct dependency. It's imported kubectl which is itself imported by helm and I already imported helm latest stable version v3.4.1. As you see the kubectl verion in my go mod graph is up-to-date.

@Shell32-Natsu
Copy link
Contributor

#1500 #2506

We are working on updating the kustomize version in kubectl.

@geokb
Copy link
Author

geokb commented Nov 23, 2020

Thanks @Shell32-Natsu. Can I ask how is this error even possible? kustomize@v2.0.3+incompatible even though it's very old it still successfully builds with kubectl@v0.19 which in turn successfully builds when imported in helm@v3.4.1 but when I import this version of helm the build fails. How is that even possible?

@Shell32-Natsu
Copy link
Contributor

I am not sure about this error. What I suspect is there might be some dependency conflict or override.

@erir910
Copy link

erir910 commented Feb 17, 2021

Why is this closed? Did anybody manage to solve this @geokb, @dsimansk, @Shell32-Natsu ?

@Shell32-Natsu
Copy link
Contributor

@erir910 If you involved old version of kustomize via kubectl, you may need to wait for a couple of days. We are nearly finishing the reintegration for kustomize and kubectl.

@erir910
Copy link

erir910 commented Feb 17, 2021

@Shell32-Natsu thanks! does that mean it is coming in v0.20.x? as for my case, I didn't actually add kustomize dependency, it's automatically added because I imported helmv3 as a library. I am afraid even if you fix this, I have to wait until helm guys update their kubectl dependency too.

@Shell32-Natsu
Copy link
Contributor

@erir910 We want to do it ASAP but it not a trivial change for kubectl.

@pepesi
Copy link

pepesi commented May 17, 2021

I had a similar problem;
try modify go.mod replace github.com/go-openapi/spec => github.com/go-openapi/spec v0.19.8

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. triage/needs-information Indicates an issue needs more information in order to work on it.
Projects
None yet
Development

No branches or pull requests

4 participants