Skip to content

Instantly share code, notes, and snippets.

@gallettilance
Last active July 9, 2021 11:07
Show Gist options
  • Save gallettilance/b8458bf013d4eca6ccc96063d46fa0a0 to your computer and use it in GitHub Desktop.
Save gallettilance/b8458bf013d4eca6ccc96063d46fa0a0 to your computer and use it in GitHub Desktop.

How to Run the Script

    python3 add_properties.py

Change INDEX_IMAGE (image that needs the properties added) and TARGET_INDEX (output image that will contain all the properties) to add the property to different indexes.

INDEX_IMAGE should be:

STAGE

  1. registry.stage.redhat.io/redhat/certified-operator-index:v4.8
  2. registry.stage.redhat.io/redhat/redhat-marketplace-index:v4.8
  3. registry.stage.redhat.io/redhat/redhat-operator-index:v4.8

PROD

  1. registry.redhat.io/redhat/certified-operator-index:v4.8
  2. registry.redhat.io/redhat/redhat-marketplace-index:v4.8
  3. registry.redhat.io/redhat/redhat-operator-index:v4.8

Note: to run this script in parrallel you must run the script in a different directory.

Dependencies

All these binaries need to be in your PATH.

For all image / container tooling you should login to:

  1. registry.redhat.io
  2. registry.stage.redhat.io
  3. registry.connect.redhat.com

OPM

https://github.com/operator-framework/operator-registry/releases/download/v1.17.4/linux-amd64-opm

mv linux-amd64-opm opm && chmod +x opm

operator-sdk

https://github.com/operator-framework/operator-sdk/releases/download/v1.9.0/operator-sdk_linux_amd64

mv operator-sdk_linux_amd64 operator-sdk && chmod +x operator-sdk

manifest-tool

https://github.com/estesp/manifest-tool/releases/download/v1.0.0/manifest-tool-linux-amd64

chmod +x manifest-tool

Note: this tool gets auth from $HOME/.docker/config. If you don't store your auth there you'll want to copy it over using: cp ${XDG_RUNTIME_DIR}/containers/auth.json $HOME/.docker/config.json

grpcurl

https://github.com/fullstorydev/grpcurl/releases/download/v1.7.0/grpcurl_1.7.0_linux_x86_64.tar.gz

tar -xf grpcurl_1.7.0_linux_x86_64.tar.gz grpcurl && chmod +x grpcurl

podman or docker

skopeo

buildah

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