Created
March 20, 2023 17:53
-
-
Save ralphbean/cde52a6cfa19c3dcf4a34b9034474ba8 to your computer and use it in GitHub Desktop.
Finding what images are applied to which environments
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
# I have one Environment | |
❯ oc get Environments -o name | |
environment.appstudio.redhat.com/development | |
# I have three apps, each with some different images bound to the same Environment. | |
❯ oc get SnapshotEnvironmentBindings -o name | |
snapshotenvironmentbinding.appstudio.redhat.com/a-game-development-binding-2llmg | |
snapshotenvironmentbinding.appstudio.redhat.com/my-app-development-binding-24n5k | |
snapshotenvironmentbinding.appstudio.redhat.com/that-python-app-development-binding-sb4m8 | |
# Pick one, and find the bound Snapshot | |
❯ oc get -o yaml snapshotenvironmentbinding.appstudio.redhat.com/my-app-development-binding-24n5k | yq .spec.snapshot | |
my-app-s4z5n | |
# Get the image pullspec | |
❯ oc get snapshots/my-app-s4z5n -o yaml | yq .spec.components.\[\].containerImage | |
quay.io/redhat-appstudio/user-workload@sha256:fe2a04ab3d2b66e9aee88b2744c4d57a6727c50d3e8b7df8b019198b5bba09da | |
# Download the sbom | |
❯ cosign download sbom quay.io/redhat-appstudio/user-workload@sha256:fe2a04ab3d2b66e9aee88b2744c4d57a6727c50d3e8b7df8b019198b5bba09da |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment