openshift / oc-mirror

Lifecycle manager for internet-disconnected OpenShift environments
Apache License 2.0
91 stars 82 forks source link

All operators visible despite filter #930

Open dadav opened 2 months ago

dadav commented 2 months ago

Version

$ oc-mirror version
Client Version: version.Info{Major:"", Minor:"", GitVersion:"4.16.0-202407221538.p0.g2bfefcc.assembly.stream.el9-2bfefcc", GitCommit:"2bfefccc11eb7f08ce6b1806624e03472bf33b6e", GitTreeState:"clean", BuildDate:"2024-07-22T16:12:18Z", GoVersion:"go1.21.11 (Red Hat 1.21.11-1.module+el8.10.0+21986+2112108a) X:strictfipsruntime", Compiler:"gc", Platform:"linux/amd64"}

What happened?

I used the following config to make only the neuvector available in the cluster:

operators:
    - catalog: registry.redhat.io/redhat/certified-operator-index:v4.16
      full: true
      packages:
        - name: neuvector-certified-operator

Which was successful, but now every certified operator is visible in the operatorhub. You can't install them, because the images weren't mirrored. This confuses the users, because they don't know which operators really can be installed.

What did you expect to happen?

The users can only see the neuvector operator in the operatorhub.

dadav commented 2 months ago

In the past, only the operators listed in packages were visible in the operatorhub. I don't know if this is intentional, but I'd love to have this back.

dadav commented 2 months ago

It's basically this example:

https://github.com/openshift/oc-mirror/blob/main/docs/examples/imageset-config-filter-catalog.yaml#L29