Orange-OpenSource / casskop

This Kubernetes operator automates the Cassandra operations such as deploying a new rack aware cluster, adding/removing nodes, configuring the C* and JVM parameters, upgrading JVM and C* versions, and many more...
https://orange-opensource.github.io/casskop/
Apache License 2.0
183 stars 54 forks source link

Which apiextensions.k8s.io version should be for crd #262

Closed mizunos closed 4 years ago

mizunos commented 4 years ago

Bug Report

What did you do? Follow README.md to install crds using

kubectl apply -f https://raw.githubusercontent.com/Orange-OpenSource/casskop/master/deploy/crds/db.orange.com_cassandraclusters_crd.yaml

What did you expect to see? A clear and concise description of what you expected to happen (or insert a code snippet).

customresourcedefinition.apiextensions.k8s.io/cassandraclusters.db.orange.com created

What did you see instead? Under which circumstances? A clear and concise description of what you expected to happen (or insert a code snippet). Got the following error message

error: unable to recognize "https://raw.githubusercontent.com/Orange-OpenSource/casskop/master/deploy/crds/db.orange.com_cassandraclusters_crd.yaml": no matches for kind "CustomResourceDefinition" in version "apiextensions.k8s.io/v1"

Environment

Client Version: version.Info{Major:"1", Minor:"16+", GitVersion:"v1.16.6-beta.0", GitCommit:"e7f962ba86f4ce7033828210ca3556393c377bcc", GitTreeState:"clean", BuildDate:"2020-01-15T08:26:26Z", GoVersion:"go1.13.5", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"15+", GitVersion:"v1.15.12-gke.13", GitCommit:"039be162890396e3365ebcf824b3cf412b6f6cc4", GitTreeState:"clean", BuildDate:"2020-07-21T02:38:48Z", GoVersion:"go1.12.17b4", Compiler:"gc", Platform:"linux/amd64"}

Possible Solution

Change the command to :

kubectl apply -f https://raw.githubusercontent.com/Orange-OpenSource/casskop/master/deploy/crds/v1beta1/db.orange.com_cassandraclusters_crd.yaml

Then it works fine

Additional context README files command may need change

cscetbon commented 4 years ago

Hey @mizunos actually it's because CRD has been promoted to v1 in 1.16. I think we should have different folders for 1.16+ and older versions