Skip to content

Instantly share code, notes, and snippets.

@cesarvr
Created April 21, 2020 11:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cesarvr/0f06317b5ae906b8b66ae43b7a40a1f0 to your computer and use it in GitHub Desktop.
Save cesarvr/0f06317b5ae906b8b66ae43b7a40a1f0 to your computer and use it in GitHub Desktop.
Tagging images on Openshift
#!/bin/bash
oc create dc $1 --image=$(oc get is $1 -o=jsonpath='{.status.dockerImageRepository}'):prod || true &&
oc expose dc $1 --port=8080 -l app=$1 || true &&
oc expose svc $1 -l app=$1 || true &&
oc label dc $1 app=$1 production=true --overwrite=true || true
oc label svc $1 app=$1 production=true --overwrite=true || true
oc label route $1 app=$1 production=true --overwrite=true || true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment