Skip to content

Conversation

@ankitathomas
Copy link
Contributor

Adds a new command to list contents of available, healthy ClusterCatalogs.

Addresses operator-framework/operator-controller#1768

$ kubectl operator olmv1 search catalog  --help
Search catalogs for installable operators matching parameters

Usage:
  operator olmv1 search catalog [flags]

Aliases:
  catalog, catalogs

Flags:
      --catalog string              Catalog to search on. If not provided, all available catalogs are searched.
      --catalogd-namespace string   Namespace for the catalogd controller (default "olmv1-system")
  -h, --help                        help for catalog
      --list-versions               List all versions available for each package
  -o, --output string               output format. One of: (yaml|json)
      --package string              Search for package by name. If empty, all available packages will be listed
  -l, --selector string             Selector (label query) to filter catalogs on, supports '=', '==', and '!='
      --timeout string              Timeout for fetching catalog contents (default "5m")

Global Flags:
  -n, --namespace string   If present, namespace scope for this CLI request
ankithom@ankithom-thinkpadt14sgen2i:~/go/src/github.com/operator-framework/ku

By default, the command lists all available packages and channels from all catalogs present on cluster. --timeout can be modified to support listing large catalogs.

$ kubectl operator olmv1 search catalog 
PACKAGE                                   CATALOG        PROVIDER  CHANNELS
accuknox-operator                         operatorhubio            stable
aerospike-kubernetes-operator             operatorhubio            alpha,stable
...

The command also supports listing available bundle versions with `--list-versions`
```bash
$ kubectl operator olmv1 search catalog --list-versions
PACKAGE                                   CATALOG        PROVIDER                            VERSION
accuknox-operator                         operatorhubio  Accuknox Inc.                       0.7.1
ack-acm-controller                        operatorhubio  Amazon, Inc.                        1.1.1
ack-acm-controller                        operatorhubio  Amazon, Inc.                        1.1.0

The queried catalogs can be restricted via a label selector, specified by --selector, and the output can be restricted to a specific package with --package.

Currently supports yaml and json outputs for the catalog FBC, in addition to the table output.

@openshift-ci openshift-ci bot requested review from benluddy and jmrodri November 3, 2025 15:03
Signed-off-by: Ankita Thomas <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants