diff --git a/deploy/tfs.sh b/deploy/tfs.sh index b73bbbf81c4c91c1ade590fb565f505d6a3c4dc3..ea6923155e4f9c3df1bd74c23412047131508cfc 100755 --- a/deploy/tfs.sh +++ b/deploy/tfs.sh @@ -123,6 +123,11 @@ export KFK_SERVER_PORT=${KFK_SERVER_PORT:-"9092"} # If not already set, if flag is YES, Apache Kafka will be redeployed and topic will be lost. export KFK_REDEPLOY=${KFK_REDEPLOY:-""} +# ----- Telemetry Config ------------------------------------------------------ + +# Replace LOAD_BALANCER_IP +export LOAD_BALANCER_IP=${LOAD_BALANCER_IP:-""} + ######################################################################################################################## # Automated steps start here ######################################################################################################################## @@ -241,6 +246,9 @@ else fi printf "\n" +# Before deployment change the telemetry LOAD_BALANCER_IP +sed -i "s|_LOAD_BALANCER_IP_|$LOAD_BALANCER_IP|g" manifests/telemetryservice.yaml + for COMPONENT in $TFS_COMPONENTS; do echo "Processing '$COMPONENT' component..." @@ -623,6 +631,9 @@ if [[ "$TFS_COMPONENTS" == *"monitoring"* ]] && [[ "$TFS_COMPONENTS" == *"webui" printf "\n\n" fi +# Revert _LOAD_BALANCER_IP_ for the next deployment +sed -i "s|$LOAD_BALANCER_IP|_LOAD_BALANCER_IP_|g" manifests/telemetryservice.yaml + echo "Pruning Docker Images..." docker image prune --force printf "\n\n" diff --git a/manifests/telemetryservice.yaml b/manifests/telemetryservice.yaml index 2add96516b0747ea8f3c9f6200e2bc676de6a3db..1a8794dc70464336a51db27a8e823106f7d26d93 100644 --- a/manifests/telemetryservice.yaml +++ b/manifests/telemetryservice.yaml @@ -95,7 +95,7 @@ metadata: app: telemetryservice spec: type: LoadBalancer - loadBalancerIP: 192.168.5.250 + loadBalancerIP: externalTrafficPolicy: Local selector: app: telemetryservice diff --git a/my_deploy.sh b/my_deploy.sh index 4d3820f41affacdb5aea743e3f4cedc310442a05..7ba0c9c386955e976fa18c34af13d0e9180765e8 100644 --- a/my_deploy.sh +++ b/my_deploy.sh @@ -211,3 +211,8 @@ export KFK_SERVER_PORT="9092" # Set the flag to YES for redeploying of Apache Kafka export KFK_REDEPLOY="" + +# ----- Telemetry Config ------------------------------------------------------ + +# Replace LOAD_BALANCER_IP +export LOAD_BALANCER_IP="192.168.5.250"