Skip to content

Commit

Permalink
Merge pull request #5306 from rihib/issue5289
Browse files Browse the repository at this point in the history
Update Tiltfile to use env variable to check aks cluster is being used
  • Loading branch information
k8s-ci-robot authored Dec 31, 2024
2 parents f4125c7 + 4cbde49 commit 177964e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -742,10 +742,12 @@ verify-container-images: ## Verify container images
.PHONY: kind-create
kind-create: $(KUBECTL) ## Create capz kind cluster if needed.
./scripts/kind-with-registry.sh
unset MGMT_CLUSTER_TYPE

.PHONY: aks-create
aks-create: $(KUBECTL) ## Create aks cluster as mgmt cluster.
./scripts/aks-as-mgmt.sh
export MGMT_CLUSTER_TYPE=aks

.PHONY: tilt-up
tilt-up: install-tools ## Start tilt and build kind cluster if needed.
Expand Down
3 changes: 2 additions & 1 deletion Tiltfile
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@ if "allowed_contexts" in settings:
if "default_registry" in settings:
default_registry(settings.get("default_registry"))

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

Expand Down

0 comments on commit 177964e

Please # to comment.