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

could not apply CRDs #600

Closed
deitch opened this issue Apr 1, 2021 · 9 comments
Closed

could not apply CRDs #600

deitch opened this issue Apr 1, 2021 · 9 comments
Labels
area/dev-productivity Developer productivity related (how to improve development) effort/1d Effort for issue is around 1 day kind/bug Bug priority/2 Priority (lower number equals higher priority)

Comments

@deitch
Copy link
Contributor

deitch commented Apr 1, 2021

What happened:

I tried to apply the CRDs, in order to test individual providers. I got a warning and an error:

$ kubectl apply -f kubernetes/crds/
Warning: apiextensions.k8s.io/v1beta1 CustomResourceDefinition is deprecated in v1.16+, unavailable in v1.22+; use apiextensions.k8s.io/v1 CustomResourceDefinition
customresourcedefinition.apiextensions.k8s.io/alicloudmachineclasses.machine.sapcloud.io created
customresourcedefinition.apiextensions.k8s.io/awsmachineclasses.machine.sapcloud.io created
customresourcedefinition.apiextensions.k8s.io/azuremachineclasses.machine.sapcloud.io created
customresourcedefinition.apiextensions.k8s.io/gcpmachineclasses.machine.sapcloud.io created
customresourcedefinition.apiextensions.k8s.io/machineclasses.machine.sapcloud.io created
customresourcedefinition.apiextensions.k8s.io/machines.machine.sapcloud.io created
customresourcedefinition.apiextensions.k8s.io/machinesets.machine.sapcloud.io created
customresourcedefinition.apiextensions.k8s.io/openstackmachineclasses.machine.sapcloud.io created
customresourcedefinition.apiextensions.k8s.io/packetmachineclasses.machine.sapcloud.io created
customresourcedefinition.apiextensions.k8s.io/scales.machine.sapcloud.io created
The CustomResourceDefinition "machinedeployments.machine.sapcloud.io" is invalid: spec.validation.openAPIV3Schema.properties[metadata]: Forbidden: must not specify anything other than name and generateName, but metadata is implicitly specified

What you expected to happen:

it would apply them without error

How to reproduce it (as minimally and precisely as possible):

  1. Start a cluster (I used k3d v4.4.0, which uses cluster 1.20.5)
  2. kubectl apply -f kubernetes/crds/
  3. watch errors

Anything else we need to know:

The docs here are wrong, in that they say to apply kubernetes/crds.yaml, but kubernetes/crds/ now is a directory

Environment:

Running k3d on Docker Desktop for Mac.

@deitch deitch added the kind/bug Bug label Apr 1, 2021
@deitch
Copy link
Contributor Author

deitch commented Apr 1, 2021

Also running the MCM gives errors (unsurprisingly):

E0401 18:25:21.651179    8066 reflector.go:123] github.com/gardener/machine-controller-manager/pkg/client/informers/externalversions/factory.go:117: Failed to list *v1alpha1.MachineDeployment: the server could not find the requested resource (get machinedeployments.machine.sapcloud.io)

@prashanth26
Copy link
Contributor

Hi @deitch ,

This is an issue @AxiomSamarth had already looked into. He had proposed a fix here - #592. I am unsure what the status is, he can probably give more details on this.

@deitch
Copy link
Contributor Author

deitch commented Apr 1, 2021

Darn! And I thought I had found a new one. 😄

Thanks

@deitch
Copy link
Contributor Author

deitch commented Apr 1, 2021

In the meantime, how do I test MachineDeployment?

@prashanth26
Copy link
Contributor

@deitch
Copy link
Contributor Author

deitch commented Apr 1, 2021

Indeed, it does! I still get the deprecation warning, but it accepts it.

Warning: apiextensions.k8s.io/v1beta1 CustomResourceDefinition is deprecated in v1.16+, unavailable in v1.22+; use apiextensions.k8s.io/v1 CustomResourceDefinition

@AxiomSamarth
Copy link
Collaborator

Hi @deitch ,

This is an issue @AxiomSamarth had already looked into. He had proposed a fix here - #592. I am unsure what the status is, he can probably give more details on this.

Hey @prashanth26,

As Hardik has mentioned, maybe the autogeneration of the CRDs, is reverting it. So, even if we change the CRD file in the repo, it may get updated. I am not sure how I can fix this autogeneration.

@prashanth26
Copy link
Contributor

As Hardik has mentioned, maybe the autogeneration of the CRDs, is reverting it. So, even if we change the CRD file in the repo, it may get updated. I am not sure how I can fix this autogeneration.

We might have to update the k8s version (to the latest) in our vendors to permanently fix this issue - #402. Let's close this PR and pick this issue on priority.

@prashanth26 prashanth26 added effort/1d Effort for issue is around 1 day area/dev-productivity Developer productivity related (how to improve development) priority/2 Priority (lower number equals higher priority) labels Jul 21, 2021
@himanshu-kun
Copy link
Contributor

/close as the issue has been resolved with vendoring k8s v1.20.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/dev-productivity Developer productivity related (how to improve development) effort/1d Effort for issue is around 1 day kind/bug Bug priority/2 Priority (lower number equals higher priority)
Projects
None yet
Development

No branches or pull requests

5 participants