Skip to content

Commit 4cbde49

Browse files
committed
update Tiltfile to use env variable to check aks cluster is being used
1 parent 78e1385 commit 4cbde49

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -741,10 +741,12 @@ verify-container-images: ## Verify container images
741741
.PHONY: kind-create
742742
kind-create: $(KUBECTL) ## Create capz kind cluster if needed.
743743
./scripts/kind-with-registry.sh
744+
unset MGMT_CLUSTER_TYPE
744745

745746
.PHONY: aks-create
746747
aks-create: $(KUBECTL) ## Create aks cluster as mgmt cluster.
747748
./scripts/aks-as-mgmt.sh
749+
export MGMT_CLUSTER_TYPE=aks
748750

749751
.PHONY: tilt-up
750752
tilt-up: install-tools ## Start tilt and build kind cluster if needed.

Tiltfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,9 @@ if "allowed_contexts" in settings:
5050
if "default_registry" in settings:
5151
default_registry(settings.get("default_registry"))
5252

53+
mgmt_cluster_type = os.getenv("MGMT_CLUSTER_TYPE", "")
5354
os_arch = str(local("go env GOARCH")).rstrip("\n")
54-
if "aks" in settings.get("kustomize_substitutions", {}).get("MGMT_CLUSTER_NAME", ""):
55+
if mgmt_cluster_type == "aks":
5556
print("Using AKS as management cluster, setting os_arch to amd64")
5657
os_arch = "amd64"
5758

0 commit comments

Comments
 (0)