cscetbon / casskop

This Kubernetes operator automates Cassandra operations such as deploying rack aware clusters, scaling up and down, configuring C* and its JVM, upgrading JVM and C*, backup/restores and many more...
https://cscetbon.github.io/casskop/
Apache License 2.0
13 stars 8 forks source link

Multicasskop fixes #29

Closed AKamyshnikova closed 2 years ago

AKamyshnikova commented 2 years ago

Fix crd name and drop files that are not used.

Restore dropped PROJECT in main directory.

Q A
Bug fix? [x]
New feature? []
API breaks? []
Deprecations? []
Related tickets fixes #X, partially #Y, mentioned in #Z
License Apache 2.0

What's in this PR?

Fix issues that were introduced with operator-sdk bump, see https://github.com/Orange-OpenSource/casskop/pull/376#issuecomment-1074669815

Checklist

cscetbon commented 2 years ago

@AKamyshnikova how are those PROJECT files needed ? When I ran not-missing-manifests without those I don't see any missing files or any differences. Can you elaborate on this ?

AKamyshnikova commented 2 years ago

@cscetbon

A PROJECT configuration file to store information about GVKs, plugins, and help the CLI make decisions. https://sdk.operatorframework.io/docs/building-operators/golang/migration/#what-is-new

If you try to run operator-sdk cli commands without existing PROJECT file(in case you want create new api, webhook) you will get an error. FATA[0000] failed to create API: unable to load configuration file: unable to load the configuration: unable to read "PROJECT" file: open PROJECT: no such file or directory

cscetbon commented 2 years ago

If you try to run operator-sdk cli commands without existing PROJECT file(in case you want create new api, webhook) you will get an error. FATA[0000] failed to create API: unable to load configuration file: unable to load the configuration: unable to read "PROJECT" file: open PROJECT: no such file or directory

Can you tell me more about the commands that we need to run now ? Cause I then need to update https://github.com/cscetbon/casskop/blob/master/.github/workflows/tests-and-docker-images.yml#L20-L58. This test didn't catch the missing PROJECT so I imagine it doesn't really do anything with the new operator-sdk

AKamyshnikova commented 2 years ago

@cscetbon make generate uses controller-gen for generating crds and k8s projects as expected. Error with missing PROJECT would appear if we wanted to create new API, webhook, etc using operator-sdk cli https://sdk.operatorframework.io/docs/cli/ So, having PROJECT is mostly meaningful in turns of development new things using operator-sdk functionality.
There is a feature named operator-sdk bundle https://sdk.operatorframework.io/docs/cli/operator-sdk_bundle/ I didn't adopt it for casskop with bump of operator-sdk. I guess operator-sdk bundle validate can be used as a test. If you think it is a valid thing to do I can add PR for that.

cscetbon commented 2 years ago

There is a feature named operator-sdk bundle https://sdk.operatorframework.io/docs/cli/operator-sdk_bundle/ I didn't adopt it for casskop with bump of operator-sdk. I guess operator-sdk bundle validate can be used as a test. If you think it is a valid thing to do I can add PR for that.

I saw you've added that command in multi-casskop but not in Casskop. So yes let's do it and use it to add validation

Thanks