Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(doc) How to update operators documentation #988

Merged
merged 1 commit into from
Sep 14, 2019

Conversation

dinhxuanvu
Copy link
Member

Signed-off-by: Vu Dinh vdinh@redhat.com

@openshift-ci-robot openshift-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Aug 16, 2019
@dinhxuanvu
Copy link
Member Author

/retest

1 similar comment
@dinhxuanvu
Copy link
Member Author

/retest

Copy link
Member

@njhale njhale left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for writing this up - looking good!

I left a few thoughts:

Documentation/design/how-to-update-operators.md Outdated Show resolved Hide resolved
Documentation/design/how-to-update-operators.md Outdated Show resolved Hide resolved
Documentation/design/how-to-update-operators.md Outdated Show resolved Hide resolved
Documentation/design/how-to-update-operators.md Outdated Show resolved Hide resolved
Documentation/design/how-to-update-operators.md Outdated Show resolved Hide resolved

![Channels Image](images/channels.png)

A user indicates a particular package (etcd) and channel (alpha) in a particular `CatalogSource` in a `Subscription`. If a `Subscription` is made to a package that hasn’t yet been installed in the namespace, the newest operator in the package/channel/catalog is installed.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest describing it as the "head" of the channel rather than "newest", since OLM seems to deliberately avoid version comparisons in the way that some other familiar packaging formats do. It's all about the graph.

Speaking of which, it would be helpful to talk directly about that graph, maybe in a dedicated section, to get people on the same page about how an upgrade target is chosen.


## Replaces / Channels

Each Operator’s definition also known as `ClusterServiceVersion` (CSV) has a `replaces` field that indicates which operator it replaces. This builds a DAG ([directed acyclic graph](https://en.wikipedia.org/wiki/Directed_acyclic_graph)) of CSVs that can be queried by OLM, and updates can be shared between channels. Channels can be thought of as entrypoints into the DAG of updates. A more accurate diagram would be:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Language nit-pick: the operator community at large thinks that etc-operator, prometheus-operator, mongodb-operator etc are all "operators". Those operators each have "releases" aka "versions". If possible to do while being consistent with existing OLM docs, it would help to clarify here that a CSV represents a specific release of an operator.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding commas: "Each Operator’s definition, also known as ClusterServiceVersion (CSV), has a"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Does OLM do anything to prevent the graph from being cyclic?


OLM’s happy path for updates is:

* A `CatalogSource` is updated with one or more updates to an operator
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should both of these lines say "Channel" instead of "CatalogSource"?

OLM’s happy path for updates is:

* A `CatalogSource` is updated with one or more updates to an operator
* We traverse every version of the operator until we’re at the newest version the `CatalogSource` contains.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By "traverse", are you implying that each version will be installed along the way? The next sentence seems to imply that, but it would be helpful to be explicit here.

And again I suggest using the word "head" instead of "newest version".

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a section named Upgrade Path with a given upgrade scenario that requires "traverse" through multiple versions to demonstrate this upgrade concept a bit better.


Creating the “New Catalog” described above requires publishing CSVs that `replace` one operator, but can `skip` several.

## Z-stream support
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a desire by many operators to have y-release channels that each contain only z-releases. For example, a 1.1 channel and 1.2 channel. That gives the end user the ability to deliberately upgrade to a new y-release only when they are ready, but automatically consume z-releases.

That use case requires a particular use of skipRange and particular assumptions about testing and potential upgrade paths. It would be very helpful to describe that here. If you like, I'm happy to add that section after this PR merges.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are welcome to submit PRs to improve the doc further after the initial PR is merged. Any practical use cases that will provide further contexts to the doc are certainly appreciated.

@mhrivnak
Copy link
Member

mhrivnak commented Sep 3, 2019

Can we move this forward soon and get it merged? I would like to contribute additional docs about z-stream management before I forget what we settled on; that'll be a lot easier with this in-place. Thanks!

@dinhxuanvu
Copy link
Member Author

I will get this PR updated to address some of the feedbacks and will get it moving forward and merged soon. Thanks.

@ecordell
Copy link
Member

ecordell commented Sep 9, 2019

Quick note - docs now live in /docs, so these should be moved as well.

@dinhxuanvu dinhxuanvu force-pushed the update-csv branch 3 times, most recently from 94c8abc to 9a09a28 Compare September 12, 2019 18:06
@openshift-ci-robot openshift-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Sep 12, 2019
@dinhxuanvu
Copy link
Member Author

/retest

2 similar comments
@dinhxuanvu
Copy link
Member Author

/retest

@dinhxuanvu
Copy link
Member Author

/retest

Copy link
Member

@njhale njhale left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost there -- I think we're good to merge after a few quick changes:

doc/design/how-to-update-operators.md Outdated Show resolved Hide resolved
doc/design/how-to-update-operators.md Show resolved Hide resolved
doc/design/how-to-update-operators.md Show resolved Hide resolved
doc/design/how-to-update-operators.md Outdated Show resolved Hide resolved
@njhale njhale added the kind/documentation Categorizes issue or PR as related to documentation. label Sep 12, 2019
@dinhxuanvu dinhxuanvu force-pushed the update-csv branch 2 times, most recently from f737764 to 542b3e9 Compare September 12, 2019 21:28
Signed-off-by: Vu Dinh <vdinh@redhat.com>
Copy link
Member

@njhale njhale left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good start!

Let's get this in so other folks can contribute too.

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Sep 13, 2019
@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dinhxuanvu, njhale

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 13, 2019
@dinhxuanvu
Copy link
Member Author

/retest

1 similar comment
@dinhxuanvu
Copy link
Member Author

/retest

@openshift-ci-robot
Copy link
Collaborator

openshift-ci-robot commented Sep 13, 2019

@dinhxuanvu: The following tests failed, say /retest to rerun them all:

Test name Commit Details Rerun command
ci/prow/e2e-aws-console-olm 98c24d9 link /test e2e-aws-console-olm
ci/prow/e2e-aws-olm 98c24d9 link /test e2e-aws-olm

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@ecordell
Copy link
Member

doc-only, merging

@ecordell ecordell merged commit ceebad1 into operator-framework:master Sep 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/documentation Categorizes issue or PR as related to documentation. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants