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

[v2] helm repo mirroring is failing with Docker references with both a tag and digest are currently not supported

XMLWordPrintable

    • None
    • CLID Sprint 271
    • 1
    • False
    • Hide

      None

      Show
      None
    • Hide
      Previously, helm repo mirroring was failing for helm charts containing image references with both a tag and digest.
      With this fix, oc-mirror will use the image digest as the source of the mirroring, and will use the tag to reference the destination image.
      Show
      Previously, helm repo mirroring was failing for helm charts containing image references with both a tag and digest. With this fix, oc-mirror will use the image digest as the source of the mirroring, and will use the tag to reference the destination image.
    • Bug Fix
    • Done

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

      Description of problem:

      helm repo mirroring is failing with Docker references with both a tag and digest are currently not supported

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

      4.18

      How reproducible:

       100%

      Steps to Reproduce:

      1- Create below imageset to mirror helm repo

      kind: ImageSetConfiguration
      apiVersion: mirror.openshift.io/v2alpha1
      mirror:
        helm:
          repositories:
            - name: nginx-helm-charts
              url: https://kubernetes.github.io/ingress-nginx
              charts:
                - name: ingress-nginx
                  version: 4.12.1 

      2- Try to mirror to disk and observe below error

      # ./oc-mirror --config=./helmimageset.yaml file:///opt/testnginx/ --v2
      
      1 / 1 () [=====================================================================================================================================================================================================] 100 %
       ✗   () controller:v1.12.1@sha256:d2fbc4ec70d8aa2050dd91a91506e998765e86c96f32cffb56c503c9c34eed5b ➡️  cache 
      2025/04/11 11:25:01  [INFO]   : === Results ===
      2025/04/11 11:25:01  [INFO]   :  ✗  0 / 1 helm images mirrored: Some helm images failed to be mirrored - please check the logs
      2025/04/11 11:25:01  [ERROR]  : [Worker] error mirroring image registry.k8s.io/ingress-nginx/controller:v1.12.1@sha256:d2fbc4ec70d8aa2050dd91a91506e998765e86c96f32cffb56c503c9c34eed5b error: invalid source name docker://registry.k8s.io/ingress-nginx/controller:v1.12.1@sha256:d2fbc4ec70d8aa2050dd91a91506e998765e86c96f32cffb56c503c9c34eed5b: Docker references with both a tag and digest are currently not supported
      2025/04/11 11:25:01  [INFO]   : 📦 Preparing the tarball archive...
      2025/04/11 11:25:01  [INFO]   : mirror time     : 17.856017384s
      2025/04/11 11:25:01  [WARN]   : [Worker] some errors occurred during the mirroring. 

      3- The same mirroring is completed if i use v1

      Actual results:

      Mirroring image is failing

      Expected results:

      Mirroring should be completed as the same is working with v1

      Additional info:

          

              skhoury@redhat.com Sherine Khoury
              openshift-crt-jira-prow OpenShift Prow Bot
              Nidan Gavali Nidan Gavali
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: