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

[v2] blockedImages doesn't behave as oc-mirror v1 and doesn't allow regular expressions

XMLWordPrintable

    • None
    • CLID Sprint 271, CLID Sprint 272
    • 2
    • False
    • Hide

      None

      Show
      None
    • Hide
      Previously, when defining the blockedImages in the imageSetConfiguration for oc-mirror v2, the user had to provide an exhaustive list of image references for excluding images from mirroring.
      The user needed to provide the exact reference that would be found in a release or in a catalog, digest included if the image was referenced by digest.
      This made it very difficult to exclude images from mirroring, as the digests may change between one execution to the next.

      In this change we introduce the possibility to use regular expressions when specifying blockedImages, aligning functionality with oc-mirror v1.
      Show
      Previously, when defining the blockedImages in the imageSetConfiguration for oc-mirror v2, the user had to provide an exhaustive list of image references for excluding images from mirroring. The user needed to provide the exact reference that would be found in a release or in a catalog, digest included if the image was referenced by digest. This made it very difficult to exclude images from mirroring, as the digests may change between one execution to the next. In this change we introduce the possibility to use regular expressions when specifying blockedImages, aligning functionality with oc-mirror v1.
    • Bug Fix
    • In Progress

      Description of problem:

      When the collection contains image quay.io/second-image@sha256:1234535341312343 , and blockedImages contains quay.io/second-image:v1.0, even if this digest corresponds to the tag, the image will not be excluded from the mirror set.
      
      It is very difficult to add an exact list of images to exclude from mirroring in ImageSetConfig's {{blockedImages}}, as the digests may change between one execution to the next. 
      
      V1 of oc-mirror did allow the user to specify a regular expression in this list, which substantially facilitated the use of this functionality 
          

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

      4.18
          

      How reproducible:

      Always
          

      Steps to Reproduce:

          1. with the following imageSetConfig
      kind: ImageSetConfiguration
      apiVersion: mirror.openshift.io/v2alpha1
      mirror:
        platform:
          channels:
          - name: stable-4.18
          blockedImages:
          - name: "(aws|gcp|azure|ibm|openstack)"
          2. oc-mirror --v2 -c isc.yaml --workspace file:///tmp/test docker://myregistry/myns --dry-run
          

      Actual results:

      Looking at the generated mapping.txt file, we see all images with names containing aws, azure, etc are still present in the file
          

      Expected results:

      the images corresponding to aws, gcp, etc (matching regex) are excluded from the file
          

      Additional info:

         

              skhoury@redhat.com Sherine Khoury
              skhoury@redhat.com Sherine Khoury
              Nidan Gavali Nidan Gavali
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: