A comprehensive command-line tool for exploring OpenShift operator catalogs with professional formatting and advanced features. Fully tested and production-ready.
- π¦ List operator packages and their default channels
- πΊ Browse available channels for each operator
- π’ View all versions/bundles available for operators
- π’ Pre-configured hub collections - Hub cluster operator sets
- π‘ Pre-configured cloudran collections - CloudRAN/Telco operator sets
- π¨ Beautiful Unicode table formatting with colors and borders
- π Summary statistics showing count of results
- π Intelligent 20-hour caching - Smart cache management with auto-refresh
- π SHA256 digest support - Immutable catalog references
- π Custom index images - Support for private/custom registries
- β‘ Result limiting - Configurable output limits for performance
- π‘οΈ Robust error handling - Comprehensive validation and error messages
- π§ͺ Comprehensive testing - Full test suite with quality assurance
./oc-catalog.sh [options] <command> [packages...]- -v
<version>- OpenShift version or SHA256 digest (default: 4.20)- Version tag:
4.20,4.19, etc. - SHA256 digest:
sha256:6462dd0a33055240e169044356899aaa...
- Version tag:
- -c
<catalog>- Catalog name (default: redhat-operator)- Valid options:
redhat-operator,certified-operator,community-operator,redhat-marketplace
- Valid options:
- -i
<image>- Custom catalog index image (overrides -v and -c)- Example:
registry.example.com/my-catalog:latest
- Example:
- -l
<limit>- Limit number of results (default: no limit)- For packages/channels: limits total results
- For versions/hub/cloudran: limits versions per package
- -h - Show help message
- packages - List operator packages and their default channels
- channels - List all available channels for packages
- versions - List all available versions/bundles for packages
- hub - List versions for pre-configured hub operator collection
- cloudran - List versions for pre-configured cloudran operator collection
- packages... - Optional: specific package names to filter results
- If no packages provided, all packages will be listed
- Not used with
huborcloudrancommands (they have pre-configured package sets)
The tool supports these Red Hat operator catalogs:
| Catalog | Description | Example Usage |
|---|---|---|
redhat-operator |
Red Hat certified operators (default) | -c redhat-operator |
certified-operator |
Partner certified operators | -c certified-operator |
community-operator |
Community operators | -c community-operator |
redhat-marketplace |
Red Hat Marketplace operators | -c redhat-marketplace |
The tool supports three ways to specify catalog sources:
- Standard Red Hat Catalogs (using
-vand-c) - SHA256 Digests (for immutable references)
- Custom Index Images (using
-ifor any registry)
The tool supports both version tags and SHA256 digests for precise catalog targeting:
- Format:
4.20,4.19, etc. - Image Reference:
registry.redhat.io/redhat/redhat-operator-index:v4.20 - Use Case: Latest updates for a specific OpenShift version
- Format:
sha256:6462dd0a33055240e169044356899aaa... - Image Reference:
registry.redhat.io/redhat/redhat-operator-index@sha256:6462dd0a... - Use Case: Reproducible builds, pinning to exact catalog snapshots
Benefits of SHA256 Digests:
- π Immutable references - Content never changes
- π Reproducible builds - Same results every time
- π Audit trails - Exact catalog version tracking
- π― Precise targeting - Reference specific catalog snapshots
- Format: Any valid container image reference
- Image Reference: User-specified (e.g.,
registry.example.com/my-catalog:latest) - Use Case: Private catalogs, custom operator collections, development/testing
Benefits of Custom Index Images:
- π’ Private registries - Use internal/private operator catalogs
- π§ͺ Development/Testing - Point to custom-built catalog images
- π§ Custom collections - Curated operator sets for specific environments
- π Third-party catalogs - Access non-Red Hat operator repositories
The tool includes two pre-configured operator collections for common deployment scenarios:
Pre-configured collection for ACM Hub cluster deployments:
odf-operator- OpenShift Data Foundationopenshift-gitops-operator- OpenShift GitOps (ArgoCD)topology-aware-lifecycle-manager- TALM for cluster lifecycle managementlocal-storage-operator- Local Storage Operatorcluster-logging- OpenShift Loggingamq-streams- Apache Kafka (AMQ Streams)amq-streams-console- Kafka Console UIadvanced-cluster-management- Red Hat Advanced Cluster Management
Pre-configured collection for CloudRAN and Telco workloads:
ptp-operator- Precision Time Protocolsriov-network-operator- SR-IOV Network Operatorlocal-storage-operator- Local Storage Operatorcluster-logging- OpenShift Logginglifecycle-agent- Lifecycle Agent for SNO upgradesredhat-oadp-operator- OADP Backup and Restore
Usage:
# List all hub operator versions
./oc-catalog.sh hub
# List all cloudran operator versions
./oc-catalog.sh cloudran
# Limit results for performance
./oc-catalog.sh -l 3 hubShow operator packages and their default channels:
# List all packages (using defaults: 4.20, redhat-operator)
./oc-catalog.sh packages
# List specific packages
./oc-catalog.sh packages ptp-operator cluster-logging
# Use different catalog
./oc-catalog.sh -c certified-operator packages
# Use custom index image
./oc-catalog.sh -i registry.example.com/my-catalog:v1.0 packages
# Limit results for performance
./oc-catalog.sh -l 10 packages
# Different version with specific packages
./oc-catalog.sh -v 4.17 packages sriov-network-operator ptp-operatorOutput:
π¦ OpenShift Operator Packages (redhat-operator-4.20)
==================================================
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββ
β Package Name β Default Channel β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββ€
β ptp-operator β stable β
β cluster-logging β stable-6.3 β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ΄βββββββββββββββββββββββββββββββββ
π Summary: 2 packages found
Show all available channels for operators:
# List all channels (using defaults)
./oc-catalog.sh channels
# List channels for specific packages
./oc-catalog.sh channels ptp-operator sriov-network-operator
# Use different version
./oc-catalog.sh -v 4.17 channels cluster-logging
# Limit results for performance
./oc-catalog.sh -l 15 channels
# Use SHA256 digest for specific catalog snapshot
./oc-catalog.sh -v sha256:6462dd0a33055240e169044356899aaa76696fe8e58a51c95b42f0012ba6a1f7 channels cluster-logging
# Use custom index image
./oc-catalog.sh -i registry.example.com/my-catalog:latest channels cluster-logging
# Different catalog with channels
./oc-catalog.sh -c certified-operator channels sriov-fecOutput:
πΊ OpenShift Operator Channels (redhat-operator-4.20)
==================================================
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββ
β Package Name β Channel β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββββ€
β cluster-logging β stable-6.1 β
β cluster-logging β stable-6.2 β
β cluster-logging β stable-6.3 β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββββββββββ
π Summary: 3 channels found
Show all available versions/bundles for operators:
# List all versions (using defaults)
./oc-catalog.sh versions
# List versions for specific packages
./oc-catalog.sh versions ptp-operator cluster-logging
# Use different catalog and version
./oc-catalog.sh -v 4.17 -c redhat-operator versions ptp-operator
# Limit versions per package for performance
./oc-catalog.sh -l 5 versions ptp-operator
# Different version with SHA256 digest
./oc-catalog.sh -v sha256:78c4590eaa7a8c75... versions cluster-logging
# Custom catalog with version limiting
./oc-catalog.sh -i registry.example.com/my-catalog:latest -l 3 versions
# Use SHA256 digest for precise catalog targeting
./oc-catalog.sh -v sha256:6462dd0a33055240e169044356899aaa76696fe8e58a51c95b42f0012ba6a1f7 versions ptp-operator
# Use custom index image
./oc-catalog.sh -i registry.example.com/my-operators:v2.0 versions ptp-operatorOutput:
π’ OpenShift Operator Versions (redhat-operator-4.20)
==================================================
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββββββββββ
β Package Name β Version/Bundle β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββ€
β ptp-operator β ptp-operator.v4.20.0-202501230001 β
β ptp-operator β ptp-operator.v4.20.0-202502250302 β
β ptp-operator β ptp-operator.v4.20.0-202503121135 β
β ptp-operator β ptp-operator.v4.20.0-202503211332 β
β ptp-operator β ptp-operator.v4.20.0-202504021503 β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββββββββββββββββββββββ
π Summary: 5 versions found
SHA256 Digest Example:
# Using SHA256 digest shows different header format
./oc-catalog.sh -v sha256:6462dd0a33055240e169044356899aaa76696fe8e58a51c95b42f0012ba6a1f7 versions ptp-operatorOutput:
π’ OpenShift Operator Versions (redhat-operator@sha256:6462dd0a...)
==================================================
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββββββββββ
β Package Name β Version/Bundle β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββ€
β ptp-operator β ptp-operator.v4.14.0-202310201027 β
β ptp-operator β ptp-operator.v4.14.0-202311021650 β
β ptp-operator β ptp-operator.v4.14.0-202311092032 β
β ptp-operator β ptp-operator.v4.14.0-202311211133 β
β ptp-operator β ptp-operator.v4.14.0-202312052033 β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββββββββββββββββββββββ
π Summary: 31 versions found
Certified Operator Example:
# List versions for certified operator
./oc-catalog.sh -c certified-operator versions sriov-fecOutput:
π’ OpenShift Operator Versions (certified-operator-4.20)
==================================================
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββββββββββ
β Package Name β Version/Bundle β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββ€
β sriov-fec β sriov-fec.v2.10.0 β
β sriov-fec β sriov-fec.v2.11.0 β
β sriov-fec β sriov-fec.v2.11.1 β
β sriov-fec β sriov-fec.v2.7.1 β
β sriov-fec β sriov-fec.v2.7.2 β
β sriov-fec β sriov-fec.v2.8.0 β
β sriov-fec β sriov-fec.v2.9.0 β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββββββββββββββββββββββ
π Summary: 7 versions found
Show available versions for common hub operators:
# List versions for all hub operators
./oc-catalog.sh hub
# Use different version
./oc-catalog.sh -v 4.17 hub
# Use SHA256 digest
./oc-catalog.sh -v sha256:6462dd0a33055240e169044356899aaa76696fe8e58a51c95b42f0012ba6a1f7 hubOutput:
π’ OpenShift Operator Versions (redhat-operator-4.20)
==================================================
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββββββββββ
β Package Name β Version/Bundle β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββ€
β odf-operator β odf-operator.v4.20.0-202501230001 β
β openshift-gitops-operator β openshift-gitops-operator.v1.15.1 β
β topology-aware-lifecycle-manager β topology-aware-lifecycle-manager.v4.20.0 β
β local-storage-operator β local-storage-operator.v4.20.0-202501230001 β
β cluster-logging β cluster-logging.v6.3.0-202501230001 β
β amq-streams β amq-streams.v2.9.0-0 β
β amq-streams-console β amq-streams-console.v0.1.0 β
β advanced-cluster-management β advanced-cluster-management.v2.12.0 β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββββββββββββββββββββββ
π Summary: 8 versions found
Hub Operators Included:
odf-operator- OpenShift Data Foundationopenshift-gitops-operator- OpenShift GitOps (ArgoCD)topology-aware-lifecycle-manager- Topology Aware Lifecycle Managerlocal-storage-operator- Local Storage Operatorcluster-logging- Cluster Loggingamq-streams- AMQ Streams (Kafka)amq-streams-console- AMQ Streams Consoleadvanced-cluster-management- Advanced Cluster Management
Show available versions for common CloudRAN operators:
# List versions for all CloudRAN operators
./oc-catalog.sh cloudran
# Use different version
./oc-catalog.sh -v 4.17 cloudran
# Use SHA256 digest
./oc-catalog.sh -v sha256:6462dd0a33055240e169044356899aaa76696fe8e58a51c95b42f0012ba6a1f7 cloudranOutput:
π’ OpenShift Operator Versions (redhat-operator-4.20)
==================================================
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββββββββββ
β Package Name β Version/Bundle β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββ€
β ptp-operator β ptp-operator.v4.20.0-202501230001 β
β sriov-network-operator β sriov-network-operator.v4.20.0-202501230001 β
β local-storage-operator β local-storage-operator.v4.20.0-202501230001 β
β cluster-logging β cluster-logging.v6.3.0-202501230001 β
β lifecycle-agent β lifecycle-agent.v4.20.0-202501230001 β
β redhat-oadp-operator β redhat-oadp-operator.v1.5.0 β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββββββββββββββββββββββ
π Summary: 6 versions found
CloudRAN Operators Included:
ptp-operator- Precision Time Protocol Operatorsriov-network-operator- SR-IOV Network Operatorlocal-storage-operator- Local Storage Operatorcluster-logging- Cluster Logginglifecycle-agent- Lifecycle Agentredhat-oadp-operator- OADP (OpenShift API for Data Protection) Operator
Custom Index Image Example:
# Using custom index image shows different header format
./oc-catalog.sh -i registry.example.com/my-catalog:v1.0 packages ptp-operatorOutput:
π¦ OpenShift Operator Packages (custom-index: my-catalog:v1.0...)
==================================================
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββ
β Package Name β Default Channel β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββ€
β ptp-operator β stable β
β custom-operator β alpha β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ΄βββββββββββββββββββββββββββββββββ
π Summary: 2 packages found
# Get help
./oc-catalog.sh -h
# List all packages (using defaults: 4.20, redhat-operator)
./oc-catalog.sh packages
# Check specific operators
./oc-catalog.sh packages ptp-operator cluster-logging
# View channels for cluster logging
./oc-catalog.sh channels cluster-logging
# See all versions of PTP operator
./oc-catalog.sh versions ptp-operator
# Work with different OpenShift version
./oc-catalog.sh -v 4.17 packages
# Use certified operator catalog
./oc-catalog.sh -c certified-operator packages
# Check certified operator (e.g., SR-IOV FEC operator)
./oc-catalog.sh -c certified-operator packages sriov-fec
# Combine options
./oc-catalog.sh -v 4.17 -c certified-operator versions sriov-fec
# Use SHA256 digest for reproducible builds
./oc-catalog.sh -v sha256:6462dd0a33055240e169044356899aaa76696fe8e58a51c95b42f0012ba6a1f7 packages ptp-operator
# Use custom index image for private registry
./oc-catalog.sh -i registry.example.com/my-catalog:v1.0 packages ptp-operator
# Use development catalog
./oc-catalog.sh -i localhost:5000/dev-catalog:latest packages
# List all hub operator versions (predefined set)
./oc-catalog.sh hub
# List all CloudRAN operator versions (predefined set)
./oc-catalog.sh cloudran
# Use different version with hub operators
./oc-catalog.sh -v 4.17 hub
# Use SHA256 digest with CloudRAN operators
./oc-catalog.sh -v sha256:6462dd0a33055240e169044356899aaa76696fe8e58a51c95b42f0012ba6a1f7 cloudran
# Catalog validation example (will show error)
./oc-catalog.sh -c invalid-catalog packages
# Output: Error: Invalid catalog 'invalid-catalog'
# Valid catalogs are: redhat-operator certified-operator community-operator redhat-marketplaceRunning the script with -h or no arguments shows the complete help message:
./oc-catalog.sh -hOutput:
π OpenShift Operator Catalog Tool
==================================================
Usage: ./oc-catalog.sh [options] <command> [packages...]
Options:
-v <version> OpenShift version or SHA256 digest (default: 4.20)
Examples: 4.20, sha256:78c4590eaa7a8c75a08ece...
-c <catalog> Catalog name (default: redhat-operator)
-i <image> Custom catalog index image (overrides -v and -c)
Example: registry.example.com/my-catalog:latest
-h Show this help message
Commands:
π¦ packages - List operator packages and their default channels
πΊ channels - List all available channels for packages
π’ versions - List all available versions/bundles for packages
π’ hub - List available versions for hub packages
π‘ cloudran - List available versions for cloudran packages
Package Arguments:
β’ Specify one or more package names to filter results
β’ If no packages provided, all packages will be listed
Examples:
./oc-catalog.sh packages # Use defaults (4.20, redhat-operator)
./oc-catalog.sh -v 4.17 packages # Different version
./oc-catalog.sh -v sha256:78c4590eaa7a... packages # Use SHA256 digest
./oc-catalog.sh -c certified-operator packages # Different catalog
./oc-catalog.sh -i registry.example.com/my-catalog:v1.0 packages # Custom index
./oc-catalog.sh -v 4.20 -c redhat-operator packages ptp-operator cluster-logging
./oc-catalog.sh -c certified-operator packages sriov-fec # Certified operator
./oc-catalog.sh hub # List all hub operator versions
./oc-catalog.sh cloudran # List all cloudran operator versions
opmtool installed and available in PATHjqfor JSON processing- Bash shell environment
- Internet connectivity to download catalog data
-
Make the script executable:
chmod +x oc-catalog.sh
-
Run the script:
./oc-catalog.sh
The tool automatically caches catalog data in /tmp/ and refreshes it every 20 hours to balance performance with data freshness.
Cache files are named:
- Standard catalogs:
/tmp/{catalog}-{version}.json - Custom index images:
/tmp/custom-index-{safe-name}.json
The script validates catalog names and only accepts the following supported catalogs:
redhat-operator- Red Hat certified operatorscertified-operator- Third-party certified operatorscommunity-operator- Community operatorsredhat-marketplace- Red Hat Marketplace operators
Validation: If you specify an invalid catalog name, the script will display an error message with the list of valid catalogs and exit.
Built with β€οΈ for OpenShift operators exploration
Status: β Production Ready | Version: Latest | Tested: Comprehensive