Skip to content

Upgrade Operator SDK version command #6628

@mateusoliveira43

Description

@mateusoliveira43

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=false

Then, 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.needs discussion

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions