Created
May 4, 2023 15:29
-
-
Save nickboldt/d0bb4297999bc82223cda8dee04d1e1e to your computer and use it in GitHub Desktop.
render an IIB as json to see what's in it
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Run the above script, then look in the /tmp/<temp folder>/ and read the .json files created.