Skip to content

Commit

Permalink
opinionate private IP of the internal LB
Browse files Browse the repository at this point in the history
  • Loading branch information
nawazkh committed Dec 28, 2024
1 parent 66e5b0d commit 9ba18dd
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Tiltfile
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,13 @@ def deploy_worker_templates(template, substitutions):
yaml = shlex.quote(yaml)
flavor_name = os.path.basename(flavor)
flavor_cmd = "RANDOM=$(bash -c 'echo $RANDOM')"

apiserver_lb_private_ip = os.getenv("AZURE_INTERNAL_LB_PRIVATE_IP", "")
if "windows-apiserver-ilb" in flavor and apiserver_lb_private_ip == "":
flavor_cmd += "; export AZURE_INTERNAL_LB_PRIVATE_IP=40.0.11.100"
elif "apiserver-ilb" in flavor and apiserver_lb_private_ip == "":
flavor_cmd += "; export AZURE_INTERNAL_LB_PRIVATE_IP=30.0.11.100"

flavor_cmd += "; export CLUSTER_NAME=" + flavor.replace("windows", "win") + "-$RANDOM; echo " + yaml + "> ./.tiltbuild/" + flavor + "; cat ./.tiltbuild/" + flavor + " | " + envsubst_cmd + " | " + kubectl_cmd + " apply -f -"
flavor_cmd += "; echo \"Cluster \'$CLUSTER_NAME\' created, don't forget to delete\""

Expand Down

0 comments on commit 9ba18dd

Please sign in to comment.