How this command is triggered — by the user, by Claude, or both
Slash command
/olm:catalog <list|add|remove|refresh|status> [arguments]The summary Claude sees in its command listing — used to decide when to auto-load this command
## Name olm:catalog ## Synopsis ## Description The `olm:catalog` command manages catalog sources for operator discovery and installation. Catalog sources provide the list of operators available for installation in the cluster. This command helps you: - List all available catalog sources and their health status - Add custom or private catalog sources - Remove catalog sources - Refresh catalog sources to get latest operator updates ## Implementation ### Subcommand: list 1. **Get All CatalogSources**: 2. **Parse CatalogSource Data**: For each catalog, extract: - Name: `.metad...
olm:catalog
/olm:catalog list
/olm:catalog add <name> <image> [--namespace=openshift-marketplace]
/olm:catalog remove <name> [--namespace=openshift-marketplace]
/olm:catalog refresh <name> [--namespace=openshift-marketplace]
/olm:catalog status <name> [--namespace=openshift-marketplace]
The olm:catalog command manages catalog sources for operator discovery and installation. Catalog sources provide the list of operators available for installation in the cluster.
This command helps you:
Get All CatalogSources:
oc get catalogsource -n openshift-marketplace -o json
Parse CatalogSource Data: For each catalog, extract:
.metadata.name.spec.displayName.spec.publisher.spec.sourceType (grpc, configmap, etc.).spec.image (for grpc type).status.connectionState.lastObservedState.status.connectionState.lastUpdatedTimeGet Catalog Pod Status:
oc get pods -n openshift-marketplace -l olm.catalogSource={catalog-name}
Format Output:
═══════════════════════════════════════════════════════════
CATALOG SOURCES
═══════════════════════════════════════════════════════════
NAME STATUS OPERATORS LAST UPDATED SOURCE TYPE
redhat-operators READY 150 2h ago grpc
certified-operators READY 45 3h ago grpc
community-operators READY 200 1h ago grpc
redhat-marketplace READY 30 4h ago grpc
custom-catalog FAILED 0 - grpc
═══════════════════════════════════════════════════════════
DETAILS
═══════════════════════════════════════════════════════════
redhat-operators:
Display Name: Red Hat Operators
Publisher: Red Hat
Image: registry.redhat.io/redhat/redhat-operator-index:v4.20
Pod: redhat-operators-abc123 (Running)
custom-catalog (FAILED):
Display Name: Custom Catalog
Publisher: My Company
Image: registry.example.com/custom-catalog:latest
Pod: custom-catalog-xyz789 (CrashLoopBackOff)
Error: ImagePullBackOff
To troubleshoot:
/olm:catalog status custom-catalog
Parse Arguments:
name: Catalog source name (required)image: Catalog image (required)--namespace: Target namespace (default: openshift-marketplace)--display-name: Display name (optional)--publisher: Publisher name (optional)Validate Image:
Create CatalogSource Manifest:
apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
name: {name}
namespace: {namespace}
spec:
sourceType: grpc
image: {image}
displayName: {display-name}
publisher: {publisher}
updateStrategy:
registryPoll:
interval: 30m
Apply CatalogSource:
oc apply -f /tmp/catalogsource-{name}.yaml
Wait for CatalogSource to be Ready:
oc wait --for=condition=READY catalogsource/{name} -n {namespace} --timeout=300s
Verify Pod is Running:
oc get pods -n {namespace} -l olm.catalogSource={name}
Display Result:
✓ Catalog source added: {name}
Name: {name}
Namespace: {namespace}
Image: {image}
Status: READY
Pod: {pod-name} (Running)
To search operators: /olm:search --catalog {name}
Parse Arguments:
name: Catalog source name (required)--namespace: Namespace (default: openshift-marketplace)Check if CatalogSource Exists:
oc get catalogsource {name} -n {namespace} --ignore-not-found
Check for Operators Using This Catalog:
oc get subscription --all-namespaces -o json | \
jq -r '.items[] | select(.spec.source=="{name}") | "\(.metadata.namespace)/\(.metadata.name)"'
Display Warning (if operators found):
WARNING: The following operators are using this catalog:
- namespace-1/operator-1
- namespace-2/operator-2
Removing this catalog will prevent these operators from receiving updates.
Do you want to continue? (yes/no)
Delete CatalogSource:
oc delete catalogsource {name} -n {namespace}
Wait for Pod to be Deleted:
oc wait --for=delete pod -l olm.catalogSource={name} -n {namespace} --timeout=60s
Display Result:
✓ Catalog source removed: {name}
Parse Arguments:
name: Catalog source name (required)--namespace: Namespace (default: openshift-marketplace)Get Current CatalogSource:
oc get catalogsource {name} -n {namespace} -o json
Trigger Refresh by Deleting Pod:
oc delete pod -n {namespace} -l olm.catalogSource={name}
Wait for New Pod to be Ready:
oc wait --for=condition=Ready pod -l olm.catalogSource={name} -n {namespace} --timeout=300s
Verify Catalog is Updated:
oc get catalogsource {name} -n {namespace} -o json | \
jq -r '.status.connectionState.lastUpdatedTime'
Display Result:
✓ Catalog source refreshed: {name}
Last Updated: {timestamp}
Status: READY
Pod: {pod-name} (Running)
New operators may now be available: /olm:search --catalog {name}
Parse Arguments:
name: Catalog source name (required)--namespace: Namespace (default: openshift-marketplace)Get CatalogSource Details:
oc get catalogsource {name} -n {namespace} -o json
Get Pod Details:
oc get pods -n {namespace} -l olm.catalogSource={name} -o json
Get Recent Events:
oc get events -n {namespace} --field-selector involvedObject.name={name} --sort-by='.lastTimestamp'
Count Available Operators:
oc get packagemanifests -n openshift-marketplace -o json | \
jq -r '.items[] | select(.status.catalogSource=="{name}") | .metadata.name' | wc -l
Verify Catalog Connectivity:
oc logs -n {namespace} {catalog-pod-name}
Format Comprehensive Status Report:
═══════════════════════════════════════════════════════════
CATALOG SOURCE STATUS: {name}
═══════════════════════════════════════════════════════════
General Information:
Name: {name}
Namespace: {namespace}
Display Name: {display-name}
Publisher: {publisher}
Source Type: {source-type}
Image: {image}
Connection Status:
State: {state} (READY | CONNECTING | CONNECTION_FAILED)
Last Updated: {timestamp}
Last Successful: {timestamp}
Pod Status:
Name: {pod-name}
Status: {status} (Running | CrashLoopBackOff | ImagePullBackOff)
Ready: {ready-containers}/{total-containers}
Restarts: {restart-count}
Age: {age}
Catalog Content:
Operators Available: {count}
[If issues detected:]
⚠️ Issues Detected:
- Pod in CrashLoopBackOff
- Last update: 24h ago (stale)
- Connection state: CONNECTION_FAILED
Recent Events:
{timestamp} Warning: Failed to pull image
{timestamp} Warning: Back-off restarting failed container
Troubleshooting Steps:
1. Check pod logs: oc logs -n {namespace} {pod-name}
2. Check image accessibility
3. Refresh catalog: /olm:catalog refresh {name}
4. Verify network connectivity (for disconnected environments)
Related Commands:
- Refresh: /olm:catalog refresh {name}
- List operators: /olm:search --catalog {name}
List all catalog sources:
/olm:catalog list
Add custom catalog:
/olm:catalog add my-catalog registry.example.com/my-catalog:v1.0
Add catalog with metadata:
/olm:catalog add my-catalog registry.example.com/catalog:latest \
--display-name="My Custom Catalog" \
--publisher="My Company"
Remove catalog:
/olm:catalog remove my-catalog
Refresh catalog to get latest operators:
/olm:catalog refresh redhat-operators
Check catalog health:
/olm:catalog status custom-catalog
Add catalog for disconnected environment:
/olm:catalog add disconnected-operators \
mirror-registry.local:5000/olm/redhat-operators:v4.20 \
--namespace=openshift-marketplace
No arguments required.
Catalog pod failing:
# Check pod logs
oc logs -n openshift-marketplace {catalog-pod-name}
# Check image pull issues
oc describe pod -n openshift-marketplace {catalog-pod-name}
No operators showing up:
# Verify catalog is ready
/olm:catalog status {catalog-name}
# Check PackageManifests
oc get packagemanifests -n openshift-marketplace
Image pull errors (disconnected environment):
Stale catalog data:
# Force refresh
/olm:catalog refresh {catalog-name}
Connection failures:
# Check catalog source definition
oc get catalogsource {catalog-name} -n openshift-marketplace -o yaml
# Run cluster diagnostics
/olm:diagnose --cluster
/olm:search - Search for operators in catalogs/olm:install - Install operators from catalogs/olm:diagnose - Diagnose catalog health issuesnpx claudepluginhub bryan-cox/ai-helpers --plugin olm