Skip to content

Instantly share code, notes, and snippets.

@nickboldt
Created May 4, 2023 15:29
Show Gist options
  • Save nickboldt/d0bb4297999bc82223cda8dee04d1e1e to your computer and use it in GitHub Desktop.
Save nickboldt/d0bb4297999bc82223cda8dee04d1e1e to your computer and use it in GitHub Desktop.
render an IIB as json to see what's in it
#!/bin/bash
cd "$(mktemp -d)" || exit
echo "Working in $(pwd)"
IMG=${IMG:-registry.redhat.io/redhat/redhat-operator-index:v4.12}
echo "Processing $IMG"
opm render "$IMG" > render.json
for name in "web-terminal" "devworkspace-operator" "devspaces"; do
jq --arg name "$name" 'select(.package == $name)' render.json > "$name.json"
jq 'select(.schema == "olm.channel")' "$name.json" > "$name.channel.json"
done
@nickboldt
Copy link
Author

nickboldt commented May 4, 2023

Run the above script, then look in the /tmp/<temp folder>/ and read the .json files created.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment