Skip to content

Instantly share code, notes, and snippets.

@shvasude
Created September 21, 2020 05:48
Show Gist options
  • Save shvasude/f8589f7124f5446de1fcbe6803856384 to your computer and use it in GitHub Desktop.
Save shvasude/f8589f7124f5446de1fcbe6803856384 to your computer and use it in GitHub Desktop.
install-sbo-stage-catalog-for-upshift-registry
#!/bin/bash -xe
CATALOG_IMAGE=${1:-registry-proxy.engineering.redhat.com/rh-osbs/iib-pub-pending:v4.5}
MIRROR_REGISTRY_HOST_NAME='ec2-18-218-9-177.us-east-2.compute.amazonaws.com:5000'
OUTPUT_IMAGE=$MIRROR_REGISTRY_HOST_NAME'/olm/redhat-developer'
docker pull $CATALOG_IMAGE
docker tag $CATALOG_IMAGE $MIRROR_REGISTRY_HOST_NAME
oc registry login --registry $MIRROR_REGISTRY_HOST_NAME --auth-basic="dummy:dummy" --insecure=true
docker push $OUTPUT_IMAGE
kubectl apply -f - << EOD
apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
name: rh-sbo-stage-registry
namespace: openshift-marketplace
spec:
sourceType: grpc
image: $OUTPUT_IMAGE
displayName: Red Hat SBO Stage registry
updateStrategy:
registryPoll:
interval: 30m
EOD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment