Просмотр исходного кода

HPCC-26551 Add env-sa to .gitignore, tag support, and bug fixes.

Signed-off-by: Godji Fortil <Godson.Fortil@LexisNexisRisk.com>
Godji Fortil 3 лет назад
Родитель
Сommit
a808f9244b
3 измененных файлов с 7 добавлено и 4 удалено
  1. 1 0
      .gitignore
  2. 4 3
      helm/examples/azure/sa/create-sa.sh
  3. 2 1
      helm/examples/azure/sa/env-sa

+ 1 - 0
.gitignore

@@ -8,3 +8,4 @@ ln/
 !esp/src/.vscode
 eclcc.log
 *.pyc
+./helm/examples/azure/sa/env-sa

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

@@ -31,7 +31,7 @@ fi
 rc=$(az group exists --name ${SA_RESOURCE_GROUP})
 if [ "$rc" != "true" ]
 then
-  az group create --name ${SA_RESOURCE_GROUP} --location ${SA_LOCATION}
+  az group create --name ${SA_RESOURCE_GROUP} --location ${SA_LOCATION} --tags ${TAGS}
 fi
 
 az storage account check-name -n $STORAGE_ACCOUNT_NAME | \
@@ -43,7 +43,8 @@ then
     -n $STORAGE_ACCOUNT_NAME \
     -g $SA_RESOURCE_GROUP \
     -l $SA_LOCATION \
-    --sku $SA_SKU
+    --sku $SA_SKU \
+    --tags ${TAGS}
 fi
 # Export the connection string as an environment variable,
 # this is used when creating the Azure file share
@@ -54,7 +55,7 @@ for shareName in $SHARE_NAMES
 do
   az storage share exists --connection-string "${AZURE_STORAGE_CONNECTION_STRING}" \
     --name  $shareName | grep -q  "\"exists\":[[:space:]]*false"
-  if [ $? -eq 0 ]
+  if [ $? -ne 0 ]
   then
     echo "create share $shareName"
     az storage share create \

+ 2 - 1
helm/examples/azure/sa/env-sa

@@ -2,6 +2,7 @@
 SUBSCRIPTION=
 STORAGE_ACCOUNT_NAME=
 SA_RESOURCE_GROUP=
+TAGS=
 # Set the same location as Kubernetes cluster
 SA_LOCATION=eastus
 SA_KEY_DIR=~/.azure/storage
@@ -14,4 +15,4 @@ SA_SKU=Standard_LRS
 # Kubernetes secret.
 SECRET_NAME=
 SECRET_NAMESPACE="default"
-SHARE_NAMES=
+SHARE_NAMES="dalishare dllshare sashashare datashare lzshare"