-
Notifications
You must be signed in to change notification settings - Fork 54
Bump operator sdk v1.13.0 #376
Bump operator sdk v1.13.0 #376
Conversation
@cscetbon Hi! Could you upload newer version of casskop-build with v1.13.0 tag to orangeopensource? So I can update circleci settings as well. |
@AKamyshnikova Done ✅ |
@cscetbon Thanks! |
That was for existing clusters. If you have to get rid of v1 do it |
@cscetbon |
@AKamyshnikova I just did it again 😉 |
Upgrade to operator-sdk 1.x version requires major structure refactoring [1]. Current commit updates file structure. [1] - https://sdk.operatorframework.io/docs/building-operators/golang/migration/ Signed-off-by: akamyshnikova <akamyshnikova@mirantis.com>
@cscetbon This pull request is ready for review. |
@AKamyshnikova it seems to be a big work. Not sure why kustomize is used but I started to review your PR, not done yet. But e2e tests are failing and you can fix them in the meantime ? |
@cscetbon Yeah, will fix this. Kustomize is part of new things with v1.x https://sdk.operatorframework.io/docs/building-operators/golang/migration/#what-is-new |
@AKamyshnikova lmk when it's ready and I'll rerun the tests. You can try them locally using k3d like circle does |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AKamyshnikova a few comments. I like what you did. I would probably have done the renaming in a different PR to keep that one small but it's okay. thanks for your hard work !
@AKamyshnikova trying to rerun tests on your branch I see that TestCassandraBackupAlreadyExists is failing. let me know when you think it's ready |
@cscetbon I've updated client-go to v.22.0 and controller-runtime to v0.9.0 - it seems to break unittests. I reverted to use v.0.19.3 and v0.6.5, I think update of these dependencies can be done in separate pull request as requires some additional work. Now tests are passing. |
👏 @AKamyshnikova unit tests are fixed now. e2e tests are failing though because of an error with helm
|
@cscetbon Seems I accidentally created file helm/cassandra-operator/crds/*.yaml :( I dropped it now. |
Helm install doesn't fail anymore but e2e are failing. It seems it can't find the status key in the object for some reason |
@cscetbon One of changes is that ready is dropped https://sdk.operatorframework.io/docs/upgrading-sdk-version/v1.0.0/#removed-package-pkgready I missed that helm templates require update for this, fixed now. |
e2e Tests ran again. Still missing status key in k8s object |
I run tests locally and don't get missing .status I'm not sure how to debug this for now. |
@cscetbon Hi! Could you allow running rest of the checks? I dropped +kubebuilder:subresource:status in latest patch set, may be this was a problem. |
Better now. There is one remaining task failing but I'm not sure it's on you this time. I'm gonna review it. If in the meantime you think the failing test is on you don't hesitate to fix it 😉 |
I checked and was some strange diff in two website/static/slides*.js files, hopefully fixed now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the hard work. A few comments and changes asked. Also do you know what would be the impact for a person who's already running the current version to move to this one ?
metadata: | ||
annotations: | ||
cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME) | ||
name: cassandraclusters.db.orange.com |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do those files have any impact on an existing cluster ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will drop this, this is not enabled via kustomization.yaml so do not effect anything.
@@ -25,7 +25,7 @@ kubectl create namespace cassandra-demo | |||
kubectl config set-context $(kubectl config current-context) --namespace=cassandra-demo | |||
|
|||
echo "Create CRD" | |||
kubectl apply -f deploy/crds/db.orange.com_cassandraclusters_crd.yaml | |||
kubectl apply -f config/crd/bases/db.orange.com_cassandraclusters.yaml | |||
|
|||
echo "configure helm" | |||
helm init |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't use dind anymore. We use k3d, let's get rid of dind files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AKamyshnikova it's still present 👆
While I was testing this pull request I've updated my test cluster (which use casskop v2.0.2 and has cassandra clusters) with this version and things work in the same way. So, from user perspective it would be just update to latest version, no additional steps will be needed. |
Refactor pkg/apis and pkg/controller folders Signed-off-by: akamyshnikova <akamyshnikova@mirantis.com>
@AKamyshnikova please try to not force push anymore, it's hard for me to review your last changes. As soon as a review has started you shouldn't force push anymore, that way only the changes can be reviewed and not the whole thing every time. |
Let me know when it's ready for review. Also I tried to rerun an old PR tests and the deploy works there. So there must be something wrong on your branch. Take a look at https://app.circleci.com/pipelines/github/Orange-OpenSource/casskop/1840/workflows/ef53e126-ec4b-453c-959d-2d3c20a7b52c/jobs/18369 |
@cscetbon Sorry, I'm not used to github review process. Always has gerrit review for this :) Will keep that in mind. |
Yes, it is ready for review. Can you suggest how I can fix this branch? |
hello @AKamyshnikova , |
@fdehay Thank you! |
@@ -25,7 +25,7 @@ kubectl create namespace cassandra-demo | |||
kubectl config set-context $(kubectl config current-context) --namespace=cassandra-demo | |||
|
|||
echo "Create CRD" | |||
kubectl apply -f deploy/crds/db.orange.com_cassandraclusters_crd.yaml | |||
kubectl apply -f config/crd/bases/db.orange.com_cassandraclusters.yaml | |||
|
|||
echo "configure helm" | |||
helm init |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AKamyshnikova it's still present 👆
Thanks @AKamyshnikova I'll take care of the few minor things I've seen. We'll try to test it more before making any new release and open issues if we find some |
@AKamyshnikova any idea why in that PR you've renamed the CRD file ?
You might want to create a PR to fix that PR. If yes, I moved the repo to https://github.com/cscetbon/casskop. You can be the 1st to create a PR there. I still need to create a PR here to redirect to my repo as I'm taking over from there. |
@cscetbon It is the name that is generated by controller-gen. |
But why does it have v1alpha1 in its name ? I'm also fixing an issue in the backup/restore that was introduced by the upgrade of the sdk operator. |
I guess because when I start working on PR it was v1alpha1, I send PR with fixes cscetbon/casskop#29 |
What's in this PR?
Use latest operator-sdk version.
Fixes #351
Additional context
v1.x.x of operator-sdk contains several breaking changes and require massive refactor of operator structure.
https://sdk.operatorframework.io/docs/building-operators/golang/migration/
Checklist
To Do
Work is still in progress.
Multi-casskop is not finally switched yet.