зеркало из https://github.com/Azure/acs-engine.git
Perform JSON escaping of strings (#3919)
This commit is contained in:
Родитель
3213101c24
Коммит
e4cb44c04c
|
@ -134,6 +134,9 @@ function configureK8s() {
|
|||
set +x
|
||||
echo "${KUBELET_PRIVATE_KEY}" | base64 --decode > "${KUBELET_PRIVATE_KEY_PATH}"
|
||||
echo "${APISERVER_PUBLIC_KEY}" | base64 --decode > "${APISERVER_PUBLIC_KEY_PATH}"
|
||||
# Perform the required JSON escaping for special characters " and \
|
||||
SERVICE_PRINCIPAL_CLIENT_SECRET=$(echo $SERVICE_PRINCIPAL_CLIENT_SECRET | sed "s|\\\\|\\\\\\\|g")
|
||||
SERVICE_PRINCIPAL_CLIENT_SECRET=$(echo $SERVICE_PRINCIPAL_CLIENT_SECRET | sed 's|"|\\"|g')
|
||||
cat << EOF > "${AZURE_JSON_PATH}"
|
||||
{
|
||||
"cloud":"${TARGET_ENVIRONMENT}",
|
||||
|
|
Загрузка…
Ссылка в новой задаче