operator-framework / operator-lifecycle-manager

A management framework for extending Kubernetes with Operators
https://olm.operatorframework.io
Apache License 2.0
1.72k stars 545 forks source link

Best practices to leverage operator release channels #2611

Open vaibhavjainwiz opened 2 years ago

vaibhavjainwiz commented 2 years ago

Type of question

Are you asking about community best practices, how to implement a specific feature, or about general context and help around the operator-sdk? Community best practices

Question

What did you do? A clear and concise description of the steps you took (or insert a code snippet).

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

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

Environment

Additional context Add any other context about the question here.

spolti commented 2 years ago

Hi @camilamacedo86, how are you, do you think you can help us with these questions or does know someone that could help with it?

Thanks!

camilamacedo86 commented 2 years ago

Hi @spolti,

Following the comments inline:

How to add a new channel ?

The channel is defined via the annotation operators.operatorframework.io.bundle.channels.v1 (See : https://github.com/operator-framework/operator-registry/blob/master/docs/design/operator-bundle.md#bundle-annotations)

By using SDK you will see that when you run make bundle you will find this annotation in the bundle/metadata/annotations.yaml. Also, this annotation will be copy to the bundle.Dockerfile (bundle index) generated for your project. See the sample: operator-sdk/testdata/go/v3/memcached-operator and its docs: https://sdk.operatorframework.io/docs/olm-integration/tutorial-bundle/

How to remove an old channel?

It depends on the rules of the index catalogue pipeline where you are publishing your solutions. So, feel free to ping me out via slack so we can check your use case.

How we can configure to keep only latest 3 channels ?

Again, It depends on the rules of the index catalogue pipeline where you are publishing your solutions. So, feel free to ping me out via slack so we can check your use case.

How to release bundle on specific channel ?

OLM will use the annotation operators.operatorframework.io.bundle.channels.v1 (See : https://github.com/operator-framework/operator-registry/blob/master/docs/design/operator-bundle.md#bundle-annotations)

So, after your push, your solution will be under the bundle informed.

Whats the recommended way to maintain channels ? like create new channel on every minor release or create static channel like stable, preview & fast?

I believe that the following doc will help you out. Could you please check this one and let me know? Please, feel free to reach out us via the slack.

https://olm.operatorframework.io/docs/best-practices/channel-naming/

How would seamless upgrade work between channels?

We cannot promote upgrades across channels. OLM users can update their subscriptions to began to use another channel. The idea is that a user creates a subscription to follow up for e.g. the stable channel where she/he will able to let OLM install any new stable release provided by you.

How we should plan to provide non backward compatible operator release like if we remove some CRD support from operator ?

Ideally, your upper version would need to be able to dealing with the scenario. See the following docs (they might help you out).

@spolti, wdyt about we close this one? I tried to provide here all that is common for any operator, however, I understand that you have very specific scenarios then, it might better we check them via the slack.

spolti commented 2 years ago

@vaibhavjainwiz if the answers are enough, feel free to close this issue.