Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
md5 hash secrets to detect when to bounce apps
oc get secrets | md5sum > /tmp/secrets.md5
SECRETS_MD5_NEW=$(oc get secrets | md5sum)
if [ "$SECRETS_MD5_NEW" != "$SECRETS_MD5_OLD" ]; then
echo "secrets have changed. bouncing apps."
oc rollout latest dc/appone -n env-demo-staging
oc rollout latest dc/apptwo -n env-demo-staging
oc rollout latest dc/appthree -n env-demo-staging
echo "secrets have NOT changed."
cowsay "Secrets all done!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.