ImageSet configuration parameters for oc-mirror plugin v2

The oc-mirror plugin v2 requires an image set configuration file that defines what images to mirror.

The following table lists the available parameters for the `ImageSetConfiguration resource.

Note
  • When selecting bundles for mirroring, the oc-mirror plugin v2 does not automatically detect group/version/kind (GVK) and bundle dependencies. You must explicitly specify the required Operators, their channels, and the Operator versions in the ImageSetConfiguration file. For more information, see "opm CLI reference".

  • Using the minVersion and maxVersion properties to filter for a specific Operator version range can result in a multiple channel heads error. The error message states that there are multiple channel heads. This is because when the filter is applied, the update graph of the Operator is truncated.

  • OLM requires that every Operator channel contains versions that form an update graph with exactly one end point, that is, the latest version of the Operator. When the filter range is applied, that graph can turn into two or more separate graphs or a graph that has more than one end point.

  • To avoid this error, do not filter out the latest version of an Operator. If you still run into the error, depending on the Operator, either the maxVersion property must be increased or the minVersion property must be decreased. Because every Operator graph can be different, you might need to adjust these values until the error resolves.

Table 23. ImageSetConfiguration parameters
Parameter Description Values

apiVersion

The API version of the ImageSetConfiguration content.

String Example: mirror.openshift.io/v2alpha1

archiveSize

The maximum size, in GiB, of each archive file within the image set.

Integer Example: 4

kubeVirtContainer

When set to true, includes images from the HyperShift KubeVirt CoreOS container.

Boolean Example ImageSetConfiguration file:

apiVersion: mirror.openshift.io/v2alpha1
kind: ImageSetConfiguration
mirror:
  platform:
    channels:
    - name: stable-4.16
      minVersion: 4.16.0
      maxVersion: 4.16.0
    kubeVirtContainer: true

mirror

The configuration of the image set.

Object

mirror.additionalImages

The additional images configuration of the image set.

Array of objects

Example:

additionalImages:
  - name: registry.redhat.io/ubi8/ubi:latest

mirror.additionalImages.name

The tag or digest of the image to mirror.

String Example: registry.redhat.io/ubi8/ubi:latest

mirror.blockedImages

List of images with a tag or digest (SHA) to block from mirroring.

Array of strings Example: docker.io/library/alpine

mirror.helm

The helm configuration of the image set. The oc-mirror plugin does not support helm charts with manually modified values.yaml files.

Object

mirror.helm.local

The local helm charts to mirror.

Array of objects. For example:

local:
  - name: podinfo
    path: /test/podinfo-5.0.0.tar.gz

mirror.helm.local.charts.imagePaths

The custom path of a container image inside of the local helm chart.

+

Note

oc-mirror detects and mirrors container images from the helm chart by searching well-known paths. You can also specify custom paths using this field.

+

Note

Operand images, dynamically deployed by Operator controllers at runtime, are typically referenced by environment variables within the controller’s deployment template. Before {product-title} 4.20, while oc-mirror could access these environment variables, it attempted to mirror all values, including non-image references, for example, log levels, leading to failures. With this update, you can mirror only the container images referenced in these environment variables.

Array of string. For example: "- {.spec.template.spec.custom[*].image}".

mirror.helm.local.name

The name of the local helm chart to mirror.

String. For example: podinfo.

mirror.helm.local.path

The path of the local helm chart to mirror.

String. For example: /test/podinfo-5.0.0.tar.gz.

mirror.helm.repositories

The remote helm repositories to mirror from.

Array of objects. For example:

repositories:
  - name: podinfo
    url: https://example.github.io/podinfo
    charts:
      - name: podinfo
        version: 5.0.0
         imagePaths:
         - "{.spec.template.spec.custom[*].image}"

mirror.helm.repositories.name

The name of the helm repository to mirror from.

String. For example: podinfo.

mirror.helm.repositories.url

The URL of the helm repository to mirror from.

String. For example: https://example.github.io/podinfo.

mirror.helm.repositories.charts

The remote helm charts to mirror.

Array of objects.

mirror.helm.repositories.charts.name

The name of the helm chart to mirror.

String. For example: podinfo.

mirror.helm.repositories.charts.imagePaths

The custom path of a container image inside of the helm chart.

+

Note

oc-mirror detects and mirrors container images from the helm chart by searching well-known paths. You can also specify custom paths using this field.

+

Note

Operand images, dynamically deployed by Operator controllers at runtime, are typically referenced by environment variables within the controller’s deployment template. Before {product-title} 4.20, while oc-mirror could access these environment variables, it attempted to mirror all values, including non-image references, for example, log levels, leading to failures. With this update, you can mirror only the container images referenced in these environment variables.

Array of string. For example: "- {.spec.template.spec.custom[*].image}".

mirror.operators

The Operators configuration of the image set.

Array of objects

Example:

operators:
  - catalog: registry.redhat.io/redhat/redhat-operator-index:4.20
    packages:
      - name: elasticsearch-operator
        minVersion: '2.4.0'

mirror.operators.catalog

The Operator catalog to include in the image set.

String Example: registry.redhat.io/redhat/redhat-operator-index:v4.15

mirror.operators.full

When true, downloads the full catalog, Operator package, or Operator channel.

Boolean The default value is false.

mirror.operators.packages

The Operator packages configuration.

Array of objects

Example:

operators:
  - catalog: registry.redhat.io/redhat/redhat-operator-index:4.20
    packages:
      - name: elasticsearch-operator
        minVersion: '5.2.3-31'

mirror.operators.packages.name

The Operator package name to include in the image set.

String Example: elasticsearch-operator

mirror.operators.packages.channels

Operator package channel configuration

Object

mirror.operators.packages.channels.name

The Operator channel name, unique within a package, to include in the image set.

String Example: fast or stable-v4.15

mirror.operators.packages.channels.maxVersion

The highest version of the Operator mirror across all channels in which it exists.

String Example: 5.2.3-31

mirror.operators.packages.channels.minVersion

The lowest version of the Operator to mirror across all channels in which it exists

String Example: 5.2.3-31

mirror.operators.packages.maxVersion

The highest version of the Operator to mirror across all channels in which it exists.

String Example: 5.2.3-31

mirror.operators.packages.minVersion

The lowest version of the Operator to mirror across all channels in which it exists.

String Example: 5.2.3-31

mirror.operators.targetCatalog

An alternative name and optional namespace hierarchy to mirror the referenced catalog as

String Example: my-namespace/my-operator-catalog

mirror.operators.targetCatalogSourceTemplate

Path on disk for a template to use to complete catalogSource custom resource generated by oc-mirror plugin v2.

String Example: /tmp/catalog-source_template.yaml Example of a template file:

apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
  name: discarded
  namespace: openshift-marketplace
spec:
  image: discarded
  sourceType: grpc
  updateStrategy:
    registryPoll:
      interval: 30m0s

mirror.operators.targetTag

An alternative tag to append to the targetName or targetCatalog.

String Example: v1

mirror.platform

The platform configuration of the image set.

Object

mirror.platform.architectures

The architecture of the platform release payload to mirror.

Array of strings Example:

architectures:
  - amd64
  - arm64
  - multi
  - ppc64le
  - s390x

The default value is amd64. The value multi ensures that the mirroring is supported for all available architectures, eliminating the need to specify individual architectures

mirror.platform.channels

The platform channel configuration of the image set.

Array of objects Example:

channels:
  - name: stable-4.12
  - name: stable-4.20

mirror.platform.channels.full

When true, sets the minVersion to the first release in the channel and the maxVersion to the last release in the channel.

Boolean The default value is false

mirror.platform.channels.name

Name of the release channel

String Example: stable-4.15

mirror.platform.channels.minVersion

The minimum version of the referenced platform to be mirrored.

String Example: 4.12.6

mirror.platform.channels.maxVersion

The highest version of the referenced platform to be mirrored.

String Example: 4.15.1

mirror.platform.channels.shortestPath

Toggles shortest path mirroring or full range mirroring.

Boolean The default value is false

mirror.platform.channels.type

Type of the platform to be mirrored

String Example: ocp or okd. The default is ocp.

mirror.platform.graph

Indicates whether the OSUS graph is added to the image set and subsequently published to the mirror.

Boolean The default value is false

mirror.operators.packages.defaultChannel

Must be defined when excluding the default channel from the filtering.

Array of objects. For example:

 mirror:
  operators:
    - catalog: registry.redhat.io/redhat/redhat-operator-index:v4.20
      packages:
        - name: rhods-operator
          defaultChannel: fast
          channels:
            - name: fast