Created
April 11, 2018 18:08
-
-
Save jupierce/c4dc77bf5e2149cd3e8b7f8a6e246ecd to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| #!/bin/bash | |
| set -o xtrace | |
| # CERT_FILE=./registry.apps.abutcher.com.crt KEY_FILE=./registry.apps.abutcher.com.key CA_FILE=./ca-chain.cert.pem ./regcerts.sh | |
| DEST_CA="$(awk '{printf "%s\\n", $0}' /etc/origin/master/ca.crt)" | |
| CERTIFICATE="$(awk '{printf "%s\\n", $0}' ${CERT_FILE})" | |
| KEY="$(awk '{printf "%s\\n", $0}' ${KEY_FILE})" | |
| CABUNDLE="$(awk '{printf "%s\\n", $0}' ${CA_FILE})" | |
| oc patch route/docker-registry -p '{"spec":{"tls":{"certificate":"'"${CERTIFICATE}"'","key":"'"${KEY}"'","caCertificate":"'"${CABUNDLE}"'","destinationCACertificate":"'"${DEST_CA}"'"}}}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment