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

Import on ImageStreams does not honor ImageTagMirrorSet

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • 4.16.z
    • ImageStreams
    • None
    • None
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Description of problem:

      With ImageTagMirrorSet defined in the cluster, the import on an imagestream fails to redirect the import to be done from the mirror registry.  

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

          

      How reproducible:

          Always
      1. Define the ImageTagMirror set as below with `NeverContactSource` mirrorSourcePolicy:
      apiVersion: config.openshift.io/v1 
      kind: ImageTagMirrorSet
      metadata:
        name: app-tag-mirror
      spec:
        imageTagMirrors:
        - source: docker.io
          mirrors:
          - <mirror-registry>
          mirrorSourcePolicy: NeverContactSource 
       

      2. Import the image using below command:

      oc import-image test:latest --from=docker.io/<any-image> --confirm 
      Actual results: The import on imagestream fails with below error:
        tags:
        - conditions:
          - generation: 1
            lastTransitionTime: "2025-11-30T15:27:23Z"
            message: 'forbidden: registry docker.io blocked'
            reason: Forbidden
            status: "False"
            type: ImportSuccess
          items: null
          tag: latest
      

       

          

      Expected results:

          The import succeeds from the mirror registry defined.

      Additional info:

          

              fmissi Flavian Missi
              rhn-support-jyarora Jyotsana Arora
              None
              None
              XiuJuan Wang XiuJuan Wang
              None
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: