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

Merge feature/run-bundle into master: Add FBC support to run bundle and run bundle-upgrade commands #5809

Merged
merged 5 commits into from Jun 9, 2022

Conversation

rashmigottipati
Copy link
Member

@rashmigottipati rashmigottipati commented May 26, 2022

Closes #5593

Description of the change:

  • Add FBC support to run bundle and run bundle-upgrade commands by create a file-based catalog (FBC) on the fly by generating the bundle, package and channel blobs, if an index image is not provided by the user (i.e. for a default index image quay.io/operator-framework/opm:latest) and serve it over a gRPC port.
  • For run bundle: If an index image is provided through the flag, then bundle image will be inserted to the index by appending the bundle contents (rendered bundle image) to the index that's converted to a declarative config and this index containing the bundle will be served over a gRPC port.
  • If bundle already exists in the index, then we error out and not serve the index image (which is consistent with the existing SQLite behavior).
  • Generated FBC will be validated and converted to a string format.
  • Infer the label type on the index image and indicate there's an FBC label through registry pod for container creation.
  • Added a new container creation command for images that have FBC label on them. For images without the label, old commands (opm registry add and opm registry serve) that use SQLite under the hood will be called. So support for both (FBC/SQLite) exist at the moment. For more details, please refer to run bundle design proposal.

For run bundle-upgrade: Handle upgrade for both scenarios when an operator bundle is installed using run bundle command and also installed traditionally via OLM. For more details, please refer to run bundle upgrade design proposal.

Motivation for the change:
#5593

Checklist

If the pull request includes user-facing changes, extra documentation is required:

Signed-off-by: rashmigottipati chowdary.grashmi@gmail.com

@rashmigottipati rashmigottipati temporarily deployed to deploy May 26, 2022 15:05 Inactive
@rashmigottipati rashmigottipati temporarily deployed to deploy May 26, 2022 15:05 Inactive
@rashmigottipati rashmigottipati temporarily deployed to deploy May 26, 2022 15:05 Inactive
@rashmigottipati rashmigottipati temporarily deployed to deploy May 26, 2022 15:05 Inactive
@rashmigottipati rashmigottipati temporarily deployed to deploy May 26, 2022 15:05 Inactive
@rashmigottipati rashmigottipati temporarily deployed to deploy May 26, 2022 15:05 Inactive
@rashmigottipati rashmigottipati temporarily deployed to deploy May 26, 2022 15:05 Inactive
@rashmigottipati rashmigottipati temporarily deployed to deploy May 26, 2022 15:18 Inactive
@rashmigottipati rashmigottipati temporarily deployed to deploy May 26, 2022 15:18 Inactive
@rashmigottipati rashmigottipati temporarily deployed to deploy May 26, 2022 15:18 Inactive
@rashmigottipati rashmigottipati temporarily deployed to deploy May 26, 2022 15:18 Inactive
@rashmigottipati rashmigottipati temporarily deployed to deploy May 26, 2022 15:18 Inactive
@rashmigottipati rashmigottipati temporarily deployed to deploy May 26, 2022 15:18 Inactive
@rashmigottipati rashmigottipati temporarily deployed to deploy May 26, 2022 15:18 Inactive
@rashmigottipati
Copy link
Member Author

@rashmigottipati rashmigottipati requested review from everettraven and removed request for marc-obrien May 26, 2022 15:20
@rashmigottipati
Copy link
Member Author

(Just FYI to the reviewers): The feature branch commits have been reviewed earlier:
#5671 - PR that adds FBC support to run bundle.
#5769 - PR that adds FBC support to run bundle-upgrade.
#5788 - PR that refactored FBC-related code into a utility module.

Copy link
Contributor

@everettraven everettraven left a comment

Choose a reason for hiding this comment

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

This looks good to me overall.

I would really like to see some tests added that reflect the test cases in the EP: https://github.com/operator-framework/enhancements/blob/master/enhancements/sdk-fbc-bundle-upgrade.md#test-plan

I think it would be okay if it was a follow-up but would be ideal if they were included in this PR.

Copy link
Contributor

@VenkatRamaraju VenkatRamaraju left a comment

Choose a reason for hiding this comment

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

Since I've already reviewed the PRs that went into the feature branch, I'll leave this to @jmrodri and @joelanford.

Copy link
Contributor

@everettraven everettraven left a comment

Choose a reason for hiding this comment

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

/lgtm

@jmrodri
Copy link
Member

jmrodri commented Jun 8, 2022

/lgtm

Signed-off-by: rashmigottipati <chowdary.grashmi@gmail.com>
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Jun 8, 2022
@rashmigottipati rashmigottipati temporarily deployed to deploy June 8, 2022 20:59 Inactive
@rashmigottipati rashmigottipati temporarily deployed to deploy June 8, 2022 20:59 Inactive
@rashmigottipati rashmigottipati temporarily deployed to deploy June 8, 2022 20:59 Inactive
@rashmigottipati rashmigottipati temporarily deployed to deploy June 8, 2022 20:59 Inactive
@rashmigottipati rashmigottipati temporarily deployed to deploy June 8, 2022 21:00 Inactive
@rashmigottipati rashmigottipati temporarily deployed to deploy June 8, 2022 21:00 Inactive
@rashmigottipati rashmigottipati temporarily deployed to deploy June 8, 2022 21:00 Inactive
@rashmigottipati rashmigottipati temporarily deployed to deploy June 8, 2022 21:00 Inactive
@rashmigottipati rashmigottipati temporarily deployed to deploy June 8, 2022 21:00 Inactive
@rashmigottipati rashmigottipati temporarily deployed to deploy June 8, 2022 21:00 Inactive
@rashmigottipati rashmigottipati temporarily deployed to deploy June 8, 2022 21:00 Inactive
@rashmigottipati rashmigottipati temporarily deployed to deploy June 8, 2022 21:00 Inactive
@rashmigottipati rashmigottipati temporarily deployed to deploy June 8, 2022 21:00 Inactive
@rashmigottipati rashmigottipati temporarily deployed to deploy June 8, 2022 21:00 Inactive
@everettraven everettraven added this to the v1.22.0 milestone Jun 8, 2022
@everettraven everettraven added the release-blocker This issue blocks the parent release milestone label Jun 8, 2022
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jun 9, 2022
@rashmigottipati rashmigottipati merged commit 0eb9ae4 into master Jun 9, 2022
VenkatRamaraju pushed a commit to VenkatRamaraju/operator-sdk that referenced this pull request Jun 9, 2022
…-upgrade` subcommands (operator-framework#5809)

* Implement File-Based Catalog support for `run bundle` and `run bundle-upgrade` command in SDK

* Create a valid File-Based Catalog by generating bundle, package and channel blobs for a given bundle image

* Generate a valid FBC if index image provided in the CLI is FBC - add bundle to index if bundle is not present in index

* Infer the image type (SQLite/FBC) based on the image label and handle FBC scenarios accordingly

* Validate the generated FBC and convert to a string format

* Add a new registry pod container creation command to support FBC type and use new opm commands

Signed-off-by: rashmigottipati <chowdary.grashmi@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm Indicates that a PR is ready to be merged. release-blocker This issue blocks the parent release milestone
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add File-Based Catalog (FBC) support to run bundle and run bundle-upgrade commands
5 participants