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

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

XMLWordPrintable

    • Quality / Stability / Reliability
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • CLID Sprint 271, CLID Sprint 272
    • 2
    • Done
    • Bug Fix
    • Hide
      * Before this update, when you defined the `blockedImages` value in the `imageSetConfiguration` parameter for `oc-mirror v2`, you were required to provide an extensive list of image references for excluding images from mirroring. This requirement sometimes prevented the exclusion of images from mirroring because the image digests changed between executions. With this release, you can use regular expressions for the `blockedImages` value to facilitate the exclusion of images from mirroring. (link:https://issues.redhat.com/browse/OCPBUGS-56728[OCPBUGS-56728])
      Show
      * Before this update, when you defined the `blockedImages` value in the `imageSetConfiguration` parameter for `oc-mirror v2`, you were required to provide an extensive list of image references for excluding images from mirroring. This requirement sometimes prevented the exclusion of images from mirroring because the image digests changed between executions. With this release, you can use regular expressions for the `blockedImages` value to facilitate the exclusion of images from mirroring. (link: https://issues.redhat.com/browse/OCPBUGS-56728 [ OCPBUGS-56728 ])
    • None
    • None
    • None
    • None

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

      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
              openshift-crt-jira-prow OpenShift Prow Bot
              None
              None
              Nidan Gavali Nidan Gavali
              None
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: