From 66ed747789d446569c3bad330d269fa7e70356cc Mon Sep 17 00:00:00 2001 From: Lluis Gifre Date: Mon, 1 Aug 2022 20:05:54 +0200 Subject: [PATCH] Deploy scripts: - corrected service name computation in expose_ingress_grpc.sh script - corrected log format in deploy.sh script - added control to configure Grafana only when both webui and monitoring are deployed --- deploy.sh | 4 ++-- expose_ingress_grpc.sh | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/deploy.sh b/deploy.sh index 1eeebb805..172889c07 100755 --- a/deploy.sh +++ b/deploy.sh @@ -91,7 +91,7 @@ for COMPONENT in $TFS_COMPONENTS; do fi if [ -n "$TFS_REGISTRY_IMAGE" ]; then - echo "Pushing Docker image to '$TFS_REGISTRY_IMAGE'..." + echo " Pushing Docker image to '$TFS_REGISTRY_IMAGE'..." TAG_LOG="$TMP_LOGS_FOLDER/tag_${COMPONENT}.log" docker tag "$IMAGE_NAME" "$IMAGE_URL" > "$TAG_LOG" @@ -165,7 +165,7 @@ for COMPONENT in $TFS_COMPONENTS; do printf "\n" done -if [[ "$TFS_COMPONENTS" == *"webui"* ]]; then +if [[ "$TFS_COMPONENTS" == *"webui"* ]] && [[ "$TFS_COMPONENTS" == *"monitoring"* ]]; then echo "Configuring WebUI DataStores and Dashboards..." sleep 3 diff --git a/expose_ingress_grpc.sh b/expose_ingress_grpc.sh index 37d72aa8d..8a4c83740 100755 --- a/expose_ingress_grpc.sh +++ b/expose_ingress_grpc.sh @@ -37,7 +37,8 @@ for COMPONENT in $TFS_COMPONENTS; do continue; fi - PATCH='{"data": {"'${SERVICE_GRPC_PORT}'": "'$TFS_K8S_NAMESPACE'/'${COMPONENT}service':'${SERVICE_GRPC_PORT}'"}}' + COMPONENT_OBJNAME=$(echo "${COMPONENT}" | sed "s/\_/-/") + PATCH='{"data": {"'${SERVICE_GRPC_PORT}'": "'$TFS_K8S_NAMESPACE'/'${COMPONENT_OBJNAME}service':'${SERVICE_GRPC_PORT}'"}}' #echo "PATCH: ${PATCH}" kubectl patch configmap nginx-ingress-tcp-microk8s-conf --namespace ingress --patch "${PATCH}" -- GitLab