oc-mirror requires that an operator's default channel is included in the ImageSetConfiguration

Solution Verified - Updated -

Issue

  • Is it possible to not mirror the default channel of an operator when using oc-mirror?
  • When using an older version of oc-mirror, the following error is shown:

    The rendered catalog is invalid.
    
    Run "oc-mirror list operators --catalog CATALOG-NAME --package PACKAGE-NAME" for more information.
    
    Please check the minVersion, maxVersion, and default channel for each invalid package.
    error: error converting declarative config to include config: invalid index:
    └── invalid package "example-operator":
      └── invalid channel "stable":
          └── channel must contain at least one bundle
    
  • When using a newer version of oc-mirror, an error similar to the following is shown:

    The current default channel was not valid, so an attempt was made to automatically assign a new default channel, which has failed.
    The failure occurred because none of the remaining channels contain a "olm.channel" priority property, so it was not possible to establish a channel to use as the default channel.
    
    This can be resolved by one of the following changes:
    1) assign a "olm.channel" property on the appropriate channels to establish a channel priority
    2) modify the default channel manually in the catalog
    3) by changing the ImageSetConfiguration to filter channels or packages in such as way that it will include a package version that exists in the current default channel
    
    The rendered catalog is invalid.
    
    Run "oc-mirror list operators --catalog CATALOG-NAME --package PACKAGE-NAME" for more information.
    
    error: error generating diff: the current default channel "latest" for package "example-operator" could not be determined... ensure that your ImageSetConfiguration filtering criteria results in a package version that exists in the current default channel
    

Environment

  • OpenShift Container Platform 4.x
  • oc-mirror plugin

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content