Merge pull request #9543 from ddysher/base64-w0

Document why we use 'tr -d' instead of 'base64 w0'
pull/6/head
Abhi Shah 2015-06-10 14:37:41 -07:00
commit 62911dc2fb
1 changed files with 2 additions and 0 deletions

View File

@ -550,6 +550,8 @@ function create-certs {
exit 2
}
CERT_DIR="${KUBE_TEMP}/easy-rsa-master/easyrsa3"
# By default, linux wraps base64 output every 76 cols, so we use 'tr -d' to remove whitespaces.
# Note 'base64 -w0' doesn't work on Mac OS X, which has different flags.
CA_CERT_BASE64=$(cat "${CERT_DIR}/pki/ca.crt" | base64 | tr -d '\r\n')
MASTER_CERT_BASE64=$(cat "${CERT_DIR}/pki/issued/${MASTER_NAME}.crt" | base64 | tr -d '\r\n')
MASTER_KEY_BASE64=$(cat "${CERT_DIR}/pki/private/${MASTER_NAME}.key" | base64 | tr -d '\r\n')