openshift / oc-mirror

Lifecycle manager for internet-disconnected OpenShift environments
Apache License 2.0
90 stars 81 forks source link

Bug 2055579 - [RFE] Add the ability in oc-mirror to create a (single) custom index to mirror operator packages from different catalog sources #352

Closed afflom closed 2 years ago

afflom commented 2 years ago

From: https://bugzilla.redhat.com/show_bug.cgi?id=2055579

Description of problem:

For the Telco RH GitOps ZTP solutions, it is desirable to have just a single operator index instead of four different operator indexes (i.e. "community-operator-index" "redhat-operator-index" "certified-operator-index" "redhat-marketplace-index"). This could decrease the CPU usage of the RH ZTP GitOps solution greatly.

Ideally, would be really nice if this can be accomplished in a declarative way using the same ImageSetConfiguration.yaml.

apiVersion: mirror.openshift.io/v1alpha1
kind: ImageSetConfiguration
storageConfig:
  registry:
    imageURL: bastion-aio2-8a.e2e.bos.redhat.com:8443/ocp9
mirror:
  ocp:
    channels:
      - name: candidate-4.10
        versions:
          - '4.10.0-rc.2'
    graph: false
  operators:
    - catalog: registry.redhat.io/redhat/redhat-operator-index:v4.9
      headsOnly: false
      packages:
        - name: local-storage-operator
        - name: ocs-operator
        - name: performance-addon-operator
        - name: ptp-operator
        - name: sriov-network-operator
        - name: advanced-cluster-management
        - name: openshift-gitops-operator
    - catalog: registry.redhat.io/redhat/certified-operator-index:v4.9
      headsOnly: false
      packages:
        - name: sriov-fec
#        - name: n3000
    - catalog: registry.redhat.io/redhat/community-operator-index:v4.9
      headsOnly: false
      packages:
        - name: hive-operator

oc-mirror --config imageset-config-ztp-catalog.yaml docker://bastion-aio2-8a.e2e.bos.redhat.com:8443/ocp9

IIUC, ^^ ImageSetConfiguration creates four different indexes in the disconnected registry, but we are looking for a way to mirror the packages to a single index, and thus catalog in OCP, using the same yaml file.

For a sample procedure to achieve this using opm tool, you may follow the procedure described here: https://docs.google.com/document/d/1M4FDhSR-GQ7-KV3BSY9ZZxt6e2M9rbOV-h-SDIgBKK8/.

openshift-bot commented 2 years ago

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-bot commented 2 years ago

Stale issues rot after 30d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle rotten. Rotten issues close after an additional 30d of inactivity. Exclude this issue from closing by commenting /lifecycle frozen.

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

/lifecycle rotten /remove-lifecycle stale

openshift-bot commented 2 years ago

Rotten issues close after 30d of inactivity.

Reopen the issue by commenting /reopen. Mark the issue as fresh by commenting /remove-lifecycle rotten. Exclude this issue from closing again by commenting /lifecycle frozen.

/close

openshift-ci[bot] commented 2 years ago

@openshift-bot: Closing this issue.

In response to [this](https://github.com/openshift/oc-mirror/issues/352#issuecomment-1214248696): >Rotten issues close after 30d of inactivity. > >Reopen the issue by commenting `/reopen`. >Mark the issue as fresh by commenting `/remove-lifecycle rotten`. >Exclude this issue from closing again by commenting `/lifecycle frozen`. > >/close Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.