Skip to content

Operator Bundle metadata updates#70

Merged
openshift-merge-robot merged 1 commit intoopenshift:masterfrom
kevinrizza:add-channel-metadata-to-bundle
Oct 18, 2019
Merged

Operator Bundle metadata updates#70
openshift-merge-robot merged 1 commit intoopenshift:masterfrom
kevinrizza:add-channel-metadata-to-bundle

Conversation

@kevinrizza
Copy link
Copy Markdown
Member

@kevinrizza kevinrizza commented Oct 16, 2019

This PR updates the olm/operator-bundle enhancement to include a reference to an additional (optional) file that can be added to the metadata folder in the bundle image. This file is an attempt to relate the old package.yaml file to metadata defined per operator bundle. Additionally, it updates the expected storage format for the metadata input folder and defines the location more arbitrarily so that it can be specified by an additional annotation.

@openshift-ci-robot openshift-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Oct 16, 2019
Comment thread enhancements/olm/operator-bundle.md Outdated
- stable
```

Also note that this file is optional. If it is not specified, the registry tooling will put the bundle in a default channel.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

by default channel do you mean a new channel named default or is there some other mechanism to specify the default channel?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

sorry, maybe this isn't clear. I'm not suggesting we are defining the default channel. i'm suggesting that if you don't specify a channel then when that operator bundle is added to an index we will have a predefined default channel for you. I was thinking that channel can be called default.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

So what if an older version of the bundle had a default channel defined?

would you:

  1. Create a new channel default
  2. Use the existing channel that was marked as default most recently
  3. Fail(?)
  4. ? some other option that I can not think of

What happens if I add a default AFTER I have been using this default? do we move the implicit default channel to this newly named default channel? Do we keep the default channel and the new default channel and mark the new one default even if there is a named "defautl" channel?

I think we need to describe the rules around this.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yep we do need to define all of it. In this enhancement I was just calling out that this file was optional. In the operator-registry enhancement I am going to create an additional PR that will describe how all of this will work.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@shawn-hurley I am going to back off on this for now and will define what I am imagining for this defaulting behavior in a future enhancement.

Comment thread enhancements/olm/operator-bundle.md Outdated
An additional point of concern is the fact that the current [operator-registry manifest format](https://github.com/operator-framework/operator-registry#manifest-format) also has a multi-version aggregation file `package.yaml` that describes data about the channels that individual versions are subscribed to. Given that we are splitting up these manifests into separate objects, we now need a way to define how an individual version subscribes to a given channel. To do this, we will create a new metadata file that defines the channels explicitly for each version called `channels.yaml`

*channels.yaml*
```yaml
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why not have these be labels / annotations.yaml entries?

operators.operatorframework.io.bundle.package=etcd
operators.operatorframework.io.bundle.channels=alpha,stable

It doesn't help much on-cluster because we have to go through crio, but on the registry side it saves us some blob unpacking.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I actually like this idea given it will simplify things even further for bundle.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

But the registry will still need to unpack all of the other files, so I'm not sure it really saves us anything. @dinhxuanvu @ecordell Could you elaborate on why this will simplify it? Just because don't have to worry about multiple files?

Copy link
Copy Markdown

@dinhxuanvu dinhxuanvu Oct 17, 2019

Choose a reason for hiding this comment

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

From my perspective, we're adding a stripped-down version of package.yaml that only contains package name and some channels. Those can be easily added to annotations.yaml as the annotations.yaml itself is a new metadata file that we require as a part of this bundle image enhancement (similar to what you are doing with channels.yaml in this PR). Two new things can be combined into one. As a result, we only require 1 single metadata file. That sounds beneficial.
To be honest, Evan's approach requires some medium changes in the existing PR that I already have compared to your approach, Kevin, which requires only minor adjustment. I'm totally fine to make changes on either way as long as we can agree on one or the other.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We discussed offline yesterday, but the idea is that, in the future, we may have access to labels directly on a cluster and can deprecate the in-image annotations.yaml.

@kevinrizza kevinrizza force-pushed the add-channel-metadata-to-bundle branch from 7853504 to 8d56183 Compare October 17, 2019 13:02
Comment thread enhancements/olm/operator-bundle.md Outdated
Comment thread enhancements/olm/operator-bundle.md Outdated
@kevinrizza kevinrizza force-pushed the add-channel-metadata-to-bundle branch from 8d56183 to e8548d1 Compare October 18, 2019 12:23
@kevinrizza kevinrizza changed the title Operator Bundle channel metadata Operator Bundle metadata updates Oct 18, 2019
Copy link
Copy Markdown
Contributor

@ecordell ecordell left a comment

Choose a reason for hiding this comment

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

Couple last questions

Comment thread enhancements/olm/operator-bundle.md Outdated
@@ -88,6 +93,11 @@ The labels will also be put inside a YAML file, as shown below.
annotations:
operators.operatorframework.io.bundle.resources: "manifests+metadata"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It seems like we don't need this field if we have the other two?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

yep, good point.

Comment thread enhancements/olm/operator-bundle.md Outdated
annotations:
operators.operatorframework.io.bundle.resources: "manifests+metadata"
operators.operatorframework.io.bundle.mediatype: "registry+v1"
operators.operatorframework.io.bundle.manifests: "path/to/manifests/"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

should we version all of these?

...mediatype.v1: , ...pacakge.v1, etc?

@kevinrizza kevinrizza force-pushed the add-channel-metadata-to-bundle branch from e8548d1 to 8209674 Compare October 18, 2019 12:55
@ecordell
Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 18, 2019
@openshift-ci-robot
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ecordell, kevinrizza

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

The pull request process is described here

Details 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 Oct 18, 2019
@openshift-merge-robot openshift-merge-robot merged commit 43efbb5 into openshift:master Oct 18, 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. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants