Browse Source

Merge pull request #15385 from xwang2713/HPCC-26359-remove-whitespace

HPCC-26359 remove whitespace in azure storage account key

Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 3 năm trước cách đây
mục cha
commit
bb3cab53e1
1 tập tin đã thay đổi với 3 bổ sung3 xóa
  1. 3 3
      helm/examples/azure/sa/create-secret.sh

+ 3 - 3
helm/examples/azure/sa/create-secret.sh

@@ -27,10 +27,10 @@ kubectl get secret -n $SECRET_NAMESPACE  | cut -d' ' -f1 | grep -q "$SECRET_NAME
 if [[ $? -ne 0 ]]
 then
   echo "create secret $SECRET_NAME"
-  account_key=$(cat ${SA_KEY_DIR}/${STORAGE_ACCOUNT_NAME}.key | cut -d':' -f2 | sed 's/[[:space:]]\+//g')
+  account_key=$(cat ${SA_KEY_DIR}/${STORAGE_ACCOUNT_NAME}.key | cut -d':' -f2 | sed 's/[[:space:]]*//g')
   kubectl create secret generic $SECRET_NAME -n $SECRET_NAMESPACE \
-    --from-literal=azurestorageaccountname=${STORAGE_ACCOUNT_NAME} \
-    --from-literal=azurestorageaccountkey=${account_key}
+    --from-literal="azurestorageaccountname=${STORAGE_ACCOUNT_NAME}" \
+    --from-literal="azurestorageaccountkey=${account_key}"
 else
   echo "Secret $SECRET_NAME already exists"
 fi