-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
Feature Request
Describe the problem you need a feature to resolve.
In the projects I work, we sometimes upgrade Operator SDK versions. The way to do it is to follow the docs (https://sdk.operatorframework.io/docs/upgrading-sdk-version/) and apply changes for each version bump, right?
I was wondering if a command to do this automatically can be created?
Describe the solution you'd like.
One possible solution would be to annotate how that code user wants to upgrade was created.
Example of what I am doing with a helm based opeartor:
Create operator code in two temp folders. One using current Operator SDK version, and the other using the version I want to upgrade to
operator-sdk init --plugins=helm --domain=<OPERATOR_DOMAIN> --project-name=<OPERATOR_NAME>
operator-sdk create api --helm-chart=<CHARTS_FOLDER>
operator-sdk generate kustomize manifests -q --interactive=falseThen, I create a diff file between this two temp folders
diff -ruN <current_version_directory> <next_version_directory>And finally apply the diff to my operator code, using patch command. This part can be enhanced, sometimes the command does not fully succeed.