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

Kubernetes 1.17.5 incompatible CRD API version #364

Closed
Antiarchitect opened this issue Aug 18, 2020 · 5 comments · Fixed by #367
Closed

Kubernetes 1.17.5 incompatible CRD API version #364

Antiarchitect opened this issue Aug 18, 2020 · 5 comments · Fixed by #367

Comments

@Antiarchitect
Copy link

Stuck installing snapshotter CRDs:
Applying https://github.com/kubernetes-csi/external-snapshotter/tree/master/config/crd (seems like last modification was at Feb 27) without modification:

[ERROR] templates/crds/snapshot.storage.k8s.io_volumesnapshotclasses.yaml: the kind "apiextensions.k8s.io/v1beta1 CustomResourceDefinition" is deprecated in favor of "apiexte
nsions.k8s.io/v1 CustomResourceDefinition"
[ERROR] templates/crds/snapshot.storage.k8s.io_volumesnapshotcontents.yaml: the kind "apiextensions.k8s.io/v1beta1 CustomResourceDefinition" is deprecated in favor of "apiext
ensions.k8s.io/v1 CustomResourceDefinition"
[ERROR] templates/crds/snapshot.storage.k8s.io_volumesnapshots.yaml: the kind "apiextensions.k8s.io/v1beta1 CustomResourceDefinition" is deprecated in favor of "apiextensions
.k8s.io/v1 CustomResourceDefinition"

Changing apiextensions.k8s.io/v1beta1 to apiextensions.k8s.io/v1:

Error: UPGRADE FAILED: error validating "": error validating data: [ValidationError(CustomResourceDefinition.spec): unknown field "additionalPrinterColumns" in io.k8s.apiexte
nsions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionSpec, ValidationError(CustomResourceDefinition.spec): unknown field "subresources" in io.k8s.apiextensions-
apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionSpec, ValidationError(CustomResourceDefinition.spec): unknown field "validation" in io.k8s.apiextensions-apiserver
.pkg.apis.apiextensions.v1.CustomResourceDefinitionSpec, ValidationError(CustomResourceDefinition.spec): unknown field "version" in io.k8s.apiextensions-apiserver.pkg.apis.ap
iextensions.v1.CustomResourceDefinitionSpec]
helm.go:94: [debug] error validating "": error validating data: [ValidationError(CustomResourceDefinition.spec): unknown field "additionalPrinterColumns" in io.k8s.apiextensi
ons-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionSpec, ValidationError(CustomResourceDefinition.spec): unknown field "subresources" in io.k8s.apiextensions-api
server.pkg.apis.apiextensions.v1.CustomResourceDefinitionSpec, ValidationError(CustomResourceDefinition.spec): unknown field "validation" in io.k8s.apiextensions-apiserver.pk
g.apis.apiextensions.v1.CustomResourceDefinitionSpec, ValidationError(CustomResourceDefinition.spec): unknown field "version" in io.k8s.apiextensions-apiserver.pkg.apis.apiex
tensions.v1.CustomResourceDefinitionSpec]
helm.sh/helm/v3/pkg/kube.scrubValidationError
@xing-yang
Copy link
Collaborator

Manifest under https://github.com/kubernetes-csi/external-snapshotter/tree/master/config/crd are generated automatically by controller-gen. We are not supposed to manually modify those manifests.

@xing-yang
Copy link
Collaborator

xing-yang commented Aug 18, 2020

Do you already have those volume snapshot CRDs installed on your system? You'll have to uninstall the old ones before installing new ones.

@Antiarchitect
Copy link
Author

I've uninstalled alpha CRDs

@xing-yang
Copy link
Collaborator

It seems that your helm chart requires apiextensions.k8s.io/v1 but we have v1beta1 in the manifests files. Will need to do some investigation to figure out how to get the manifests generated using v1. It automatically uses v1beta1, even with controller-gen 0.3.0 which is the latest release.

@prateekpandey14
Copy link
Member

@xing-yang we can use $CONTROLLER_GEN crd:crdVersions=v1,... to generate the apiextensions.k8s.io/v1 CRDs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants