Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-10320

Catalogs should not be included in the ImageContentSourcePolicy.yaml

    XMLWordPrintable

Details

    • No
    • CFE Sprint 233
    • 1
    • Proposed
    • False
    • Hide

      None

      Show
      None
    • Hide
      * Previously, the `oc-mirror` command added the operator catalog as an entry in the `ImageContentSourcePolicy`. With this update, the operator catalog is consumed directly from the destination registry because of the `CatalogSource` making the additon of the operator catalog in the `ImageContentSourcePolicy` is not needed. (link:https://issues.redhat.com/browse/OCPBUGS-10320[*OCPBUGS-10320*])
      Show
      * Previously, the `oc-mirror` command added the operator catalog as an entry in the `ImageContentSourcePolicy`. With this update, the operator catalog is consumed directly from the destination registry because of the `CatalogSource` making the additon of the operator catalog in the `ImageContentSourcePolicy` is not needed. (link: https://issues.redhat.com/browse/OCPBUGS-10320 [* OCPBUGS-10320 *])
    • Bug Fix
    • Done

    Description

      This is a clone of issue OCPBUGS-10051. The following is the description of the original issue:

      Description of problem:

      Currently when the oc-mirror command runs the generated ImageContentSourcePolicy.yaml should not include mirrors for the mirrored operator catalogs
      

      This should be the case for registry located catalogs and oci fbc catalogs (located on disk)
      jpower_personal, lfrfla can you help us confirm this is the expected behavior?

      Version-Release number of selected component (if applicable):

      4.13

      How reproducible:

      Always

      Steps to Reproduce:

      1.Run the oc mirror command mirroring the catalog
      /bin/oc-mirror --config imageSetConfig.yaml  docker://localhost:5000  --use-oci-feature  --dest-use-http  --dest-skip-tls
      with imagesetconfig:
      kind: ImageSetConfiguration
      apiVersion: mirror.openshift.io/v1alpha2
      storageConfig:
        local:
          path: /tmp/storageBackend
      mirror:
        operators:
        - catalog: oci:///home/user/catalogs/rhop4.12
          # copied from registry.redhat.io/redhat/redhat-operator-index:v4.12
          targetCatalog: "mno/redhat-operator-index"
          targetVersion: "v4.12"
          packages:
          - name: aws-load-balancer-operator
      

      Actual results:

      Catalog is included in the imageContentSourcePolicy.yaml
      apiVersion: operators.coreos.com/v1alpha1
      kind: CatalogSource
      metadata:
        name: redhat-operator-index
        namespace: openshift-marketplace
      spec:
        image: localhost:5000/mno/redhat-operator-index:v4.12
        sourceType: grpc
      
      ---
      apiVersion: operator.openshift.io/v1alpha1
      kind: ImageContentSourcePolicy
      metadata:
        labels:
          operators.openshift.org/catalog: "true"
        name: operator-0
      spec:
        repositoryDigestMirrors:
        - mirrors:
          - localhost:5000/albo
          source: registry.redhat.io/albo
        - mirrors:
          - localhost:5000/mno
          source: mno
        - mirrors:
          - localhost:5000/openshift4
          source: registry.redhat.io/openshift4
      

      Expected results:

      No catalog should be included in the imageContentSourcePolicy.yaml
      apiVersion: operators.coreos.com/v1alpha1
      kind: CatalogSource
      metadata:
        name: redhat-operator-index
        namespace: openshift-marketplace
      spec:
        image: localhost:5000/mno/redhat-operator-index:v4.12
        sourceType: grpc
      
      ---
      apiVersion: operator.openshift.io/v1alpha1
      kind: ImageContentSourcePolicy
      metadata:
        labels:
          operators.openshift.org/catalog: "true"
        name: operator-0
      spec:
        repositoryDigestMirrors:
        - mirrors:
          - localhost:5000/albo
          source: registry.redhat.io/albo
        - mirrors:
          - localhost:5000/openshift4
          source: registry.redhat.io/openshift4
      

      Additional info:

       

      Attachments

        Issue Links

          Activity

            People

              rh-ee-aguidi Alex Guidi
              openshift-crt-jira-prow OpenShift Prow Bot
              ying zhou ying zhou
              Darragh Fitzmaurice Darragh Fitzmaurice
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: