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

FBC: catalog-build target in Makefile needs to be updated to generate an FBC catalog image #5832

Open
rashmigottipati opened this issue Jun 6, 2022 · 12 comments
Assignees
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. needs discussion olm-integration Issue relates to the OLM integration priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Milestone

Comments

@rashmigottipati
Copy link
Member

Bug Report

What did you do?

The catalog-build target in Makefile still uses opm index add to generate a SQLite catalog index image. This needs to be updated to generating an FBC index image as we will be defaulting to using File-Based Catalogs once PR is merged into master.

How reproducible:
Always

Steps to Reproduce:

  1. generate an operator through operator-sdk
  2. cat Makefile

What did you expect to see?

Generate the FBC index image in the following way:
$ mkdir catalog
$ opm generate dockerfile catalog
$ mkdir catalog/xxxx
$ opm init xxxx -c alpha -o yaml > catalog/xxxx/index.yaml
$ opm render quay.io/test/xxxx:v1.0 -o yaml >> catalog/xxxx/index.yaml

What did you see instead? Under which circumstances?

Screen Shot 2022-06-06 at 11 27 34 AM

Environment

$ operator-sdk version

operator-sdk version: "v1.20.0-16-g38b8b8d9", commit: "38b8b8d949578a44fb23319e56c242fd620523ca", kubernetes version: "v1.23", go version: "go1.17.4", GOOS: "linux", GOARCH: "amd64"

$ go version (if language is Go)

go version: "go1.17.4"

@rashmigottipati rashmigottipati added kind/bug Categorizes issue or PR as related to a bug. olm-integration Issue relates to the OLM integration labels Jun 9, 2022
@varshaprasad96 varshaprasad96 added this to the v1.23.0 milestone Jun 13, 2022
@asmacdo asmacdo self-assigned this Jun 23, 2022
@asmacdo asmacdo added the release-blocker This issue blocks the parent release milestone label Jun 29, 2022
@asmacdo asmacdo modified the milestones: v1.23.0, v1.22.1 Jun 29, 2022
@jmrodri jmrodri removed the release-blocker This issue blocks the parent release milestone label Jul 9, 2022
@jmrodri
Copy link
Member

jmrodri commented Jul 9, 2022

I removed the release-blocker label because this turns out to be more of an RFE than a bug.

@jmrodri jmrodri changed the title catalog-build target in Makefile needs to be updated to generate an FBC catalog image FBC: catalog-build target in Makefile needs to be updated to generate an FBC catalog image Jul 9, 2022
@jmrodri jmrodri modified the milestones: v1.22.1, v1.23.0 Jul 14, 2022
@asmacdo asmacdo modified the milestones: v1.23.0, v1.24.0 Jul 20, 2022
@asmacdo asmacdo removed this from the v1.24.0 milestone Aug 31, 2022
@asmacdo
Copy link
Member

asmacdo commented Aug 31, 2022

Removed the milestone for re-triage. @jmrodri thoughts?

@jberkhahn jberkhahn added this to the v1.25.0 milestone Sep 19, 2022
@everettraven
Copy link
Contributor

There was some internal discussion a while back about what possibly needs to be done to resolve this. To make it more transparent and easier to find I wanted to copy that discussion over here:

Things that likely need to be done:

  • Scaffold a new Dockerfile with the name <operator-name>-index.Dockerfile
  • Scaffold a new directory with the name <operator-name>-index
  • Scaffold the <operator-name>-index/index.yaml file OR run the command:
$ opm init <operator_name> \ 
    --default-channel=preview \ 
    --description=./README.md \ 
    --icon=./operator-icon.svg \ 
    --output yaml \ 
    > <operator_name>-index/index.yaml
  • Render the bundle image and append it to the <operator-name>-index/index.yaml file
  • Add a channel entry to the <operator-name>-index/index.yaml file
  • Validate the catalog with opm validate
  • Build the image with:
docker build . \
    -f <operator_name>-index.Dockerfile \
    -t <registry>/<namespace>/<catalog_image_name>:<tag>

@jberkhahn jberkhahn added kind/feature Categorizes issue or PR as related to a new feature. and removed kind/bug Categorizes issue or PR as related to a bug. labels Oct 12, 2022
@jberkhahn jberkhahn modified the milestones: v1.25.0, v1.26.0 Oct 12, 2022
@jberkhahn jberkhahn removed this from the v1.26.0 milestone Oct 12, 2022
@kensipe kensipe added this to the v1.26.0 milestone Oct 17, 2022
@kensipe kensipe added the priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. label Oct 17, 2022
@jmrodri jmrodri modified the milestones: v1.26.0, v1.27.0 Nov 2, 2022
@asmacdo asmacdo removed their assignment Dec 20, 2022
@everettraven
Copy link
Contributor

/unassign jmrodri

@joelanford
Copy link
Member

I don't think this one is ready to be worked. The existing makefile targets assume an imperative flow where new bundles can be added to existing catalogs. File-based catalogs are a major change because an individual bundle (which is the context of an individual commit of an operator-sdk project) no longer carries upgrade edge information necessary to add that bundle to a catalog.

IMO any work related to this is blocked until we have more answers about the way we expect upstream users to build and maintain file-based catalogs.

@openshift-bot
Copy link

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@openshift-ci openshift-ci bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 26, 2023
@everettraven
Copy link
Contributor

everettraven commented Apr 26, 2023

/lifecycle frozen

1 similar comment
@everettraven
Copy link
Contributor

/lifecycle frozen

@openshift-ci openshift-ci bot added lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Apr 26, 2023
@Nilesh20
Copy link

Facing same issue. Any update ? How/When can we have FBC: catalog-build target in Makefile ?

@jmrodri
Copy link
Member

jmrodri commented Jun 14, 2023

Facing same issue. Any update ? How/When can we have FBC: catalog-build target in Makefile ?

@Nilesh20 this issue is still blocked by Joe's comment in #5832 (comment)

@sukhil-suresh
Copy link

Is there any plan to update the opm index add command to support File Based Catalogs (FBC), any time soon? This ticket has been open for 1.5 years. We depend on the opm index commands for our automation to test Operator upgrades and install scenarios. The RedHat Marketplace catalog moved to FBC long ago with OpenShift 4.11. Kindly provide an update. Thanks.

@adambkaplan
Copy link

This is important for operators that expect OLM to manage install and uninstall with file-based catalogs. The current Makefile target is in fact broken if a developer wants to "shim" their bundle into an existing FBC catalog.

For the Red Hat OpenShift Builds operator, I was able to template a test FBC catalog that could be built and deployed as part of a developer "inner loop": redhat-openshift-builds/operator#38

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. needs discussion olm-integration Issue relates to the OLM integration priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Projects
None yet
Development

No branches or pull requests