diff --git a/modules/osdu/scripts/install_asm.sh b/modules/osdu/scripts/install_asm.sh index 6d76f743eb94d7b2bae9ded4a435297a2e1b3485..4b605ab07baf9b50414667731ce57e6562e5875a 100755 --- a/modules/osdu/scripts/install_asm.sh +++ b/modules/osdu/scripts/install_asm.sh @@ -9,8 +9,6 @@ OUTDIR=${4} GATEWAY=istio-gateway PROJECT_NUMBER=$(gcloud projects describe "${PROJECT_ID}" --format="value(projectNumber)") -kubectl create ns $GATEWAY - gcloud services enable mesh.googleapis.com --project="${PROJECT_ID}" gcloud container fleet mesh enable --project="${PROJECT_ID}" gcloud container fleet memberships register "${CLUSTER_NAME}" --gke-cluster="${CLUSTER_LOCATION}"/"${CLUSTER_NAME}" --enable-workload-identity --project "${PROJECT_ID}" @@ -18,6 +16,14 @@ gcloud container clusters update "${CLUSTER_NAME}" --zone "${CLUSTER_LOCATION}" gcloud container fleet mesh update --control-plane automatic --memberships "${CLUSTER_NAME}" --project "${PROJECT_ID}" sleep 60 +CHECK_NS=$(kubectl get ns ${GATEWAY} --ignore-not-found) +if [[ "${CHECK_NS}" ]] +then + echo "$GATEWAY namespace exists" +else + kubectl create ns $GATEWAY +fi + echo "Downloading configuration files for gateways" if [[ -d "${OUTDIR}" ]] then