Description of problem:
When using oc mirror with an imageset-config.yaml that contains only a couple of operators, the resulting index image referenced by the catalogsource is showing all the packages in the upstream catalog. Expected result is that in OperatorHub on the disconnected cluster only the two packages referenced in the imageset-config.yaml would display
Version-Release number of selected component (if applicable):
$ oc mirror version --output=yaml clientVersion: buildDate: "2024-06-05T22:52:38Z" compiler: gc gitCommit: e91f573c771182f7fd4a2d3513ed49562dee6b38 gitTreeState: clean gitVersion: 4.15.0-202406052127.p0.ge91f573.assembly.stream.el9-e91f573 goVersion: go1.20.12 X:strictfipsruntime major: "" minor: "" platform: linux/amd64
How reproducible:
Steps to Reproduce:
1.create the following imageset-config.yaml kind: ImageSetConfiguration apiVersion: mirror.openshift.io/v1alpha2 storageConfig: registry: imageURL: fminafra-mirror-registry.c.cee-gcp-emea.internal:8443/mirror/oc-mirror-metadata skipTLS: false mirror: platform: channels: - name: stable-4.15 type: ocp minVersion: 4.15.15 maxVersion: 4.15.16 graph: true operators: - catalog: registry.redhat.io/redhat/redhat-operator-index:v4.15 packages: - name: cluster-logging channels: - name: stable-5.9 minVersion: '5.9.2' maxVersion: '5.9.2' - name: cincinnati-operator channels: - name: v1 minVersion: '5.0.2' maxVersion: '5.0.2' 2. mirror the release images and operators to a local registry 3. apply the resulting catalogsource to the cluster: apiVersion: operators.coreos.com/v1alpha1 kind: CatalogSource metadata: name: fminafra-disconnected-operator-catalog namespace: openshift-marketplace spec: image: fminafra-mirror-registry.c.cee-gcp-emea.internal:8443/ocp4/openshift4/redhat/redhat-operator-index:v4.15 sourceType: grpc displayName: My disconnected Operator Catalog publisher: Francesco Minafra updateStrategy: registryPoll: interval: 3m
Actual results:
all the 114 operators are showing in operatorhub on the disconnected cluster and in the output of command: $ oc get packagemanifest -n openshift-marketplace
Expected results:
only two operators should appear in operatorhub and in the output of the packagemanifest command
Additional info: