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

The CatalogSource file created by oc-mirror for v2 format is invalid

    XMLWordPrintable

Details

    • Important
    • CLID Sprint 252
    • 1
    • Rejected
    • False
    • Hide

      None

      Show
      None
    • N/A
    • Release Note Not Required
    • In Progress
    • Customer Facing

    Description

      Description of problem:

      when I used the file to create CatalogSource, the creation failed and hit error:
      [root@preserve-fedora36 cluster-resources]# oc create -f cs-redhat-operator-index-v4-15.yaml 
      The CatalogSource "cs-redhat-operator-index-v4-15" is invalid: 
      * spec.icon.base64data: Required value
      * spec.icon.mediatype: Required value
      [root@preserve-fedora36 cluster-resources]# cat cs-redhat-operator-index-v4-15.yaml 
      apiVersion: operators.coreos.com/v1alpha1
      kind: CatalogSource
      metadata:
        creationTimestamp: null
        name: cs-redhat-operator-index-v4-15
        namespace: openshift-marketplace
      spec:
        icon: {}
        image: ec2-3-144-93-237.us-east-2.compute.amazonaws.com:5000/redhat/redhat-operator-index:v4.15
        sourceType: grpc
      status: {}
      

       

       

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

      oc-mirror version 
      WARNING: This version information is deprecated and will be replaced with the output from --short. Use --output=yaml|json to get the full version.
      Client Version: version.Info{Major:"", Minor:"", GitVersion:"4.16.0-202403070215.p0.gc4f8295.assembly.stream.el9-c4f8295", GitCommit:"c4f829512107f7d0f52a057cd429de2030b9b3b3", GitTreeState:"clean", BuildDate:"2024-03-07T03:46:24Z", GoVersion:"go1.21.7 (Red Hat 1.21.7-1.el9) X:strictfipsruntime", Compiler:"gc", Platform:"linux/amd64"}

      How reproducible:

      always

      Steps to Reproduce:

      1. Use following imagesetconfigure to mirror to localhost:
      cat config.yaml 
      kind: ImageSetConfiguration
      apiVersion: mirror.openshift.io/v1alpha2
      #archiveSize: 8
      storageConfig:
        local:
          path: /app1/ocmirror/offline
      mirror:
        platform:
          channels:
          - name: stable-4.12                                             
            type: ocp
            minVersion: '4.12.46'
            maxVersion: '4.12.46'
            shortestPath: true
          graph: true
        operators:
        - catalog: registry.redhat.io/redhat/redhat-operator-index:v4.15
          packages:
          - name: advanced-cluster-management                                  
            channels:
            - name: release-2.9             
          - name: compliance-operator
            channels:
            - name: stable
          - name: multicluster-engine
            channels:
            - name: stable-2.4
            - name: stable-2.5
        additionalImages:
        - name: registry.redhat.io/ubi8/ubi:latest                        
        - name: registry.redhat.io/rhel8/support-tools:latest
        - name: registry.access.redhat.com/ubi8/nginx-120:latest
        - name: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.8.0
        - name: registry.k8s.io/sig-storage/csi-resizer:v1.8.0
      `oc-mirror --config config.yaml  file://operatortest --v2`
      2. mirror to registry :
      `oc-mirror  --config config.yaml --from file://operatortest   docker://ec2-3-144-93-237.us-east-2.compute.amazonaws.com:5000  --v2`
      
      3. Create catalogsource with the created file:
      cat cs-redhat-operator-index-v4-15.yaml 
      apiVersion: operators.coreos.com/v1alpha1
      kind: CatalogSource
      metadata:
        creationTimestamp: null
        name: cs-redhat-operator-index-v4-15
        namespace: openshift-marketplace
      spec:
        icon: {}
        image: ec2-3-144-93-237.us-east-2.compute.amazonaws.com:5000/redhat/redhat-operator-index:v4.15
        sourceType: grpc
      status: {}
      
      oc create -f cs-redhat-operator-index-v4-15.yaml 
      The CatalogSource "cs-redhat-operator-index-v4-15" is invalid: 
      * spec.icon.base64data: Required value
      * spec.icon.mediatype: Required value

      Actual results: 

      Failed to create catalogsource by the created file.
      

      Expected results:

      No error.

      Attachments

        Issue Links

          Activity

            People

              skhoury@redhat.com Sherine Khoury
              yinzhou@redhat.com ying zhou
              Rama Kasturi Narra Rama Kasturi Narra
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated: