Description
Tiltfile uses if "aks" in settings.get("kustomize_substitutions", {}).get("MGMT_CLUSTER_NAME", ""):
to check if the tilt is being used with AKS cluster as a management cluster.
This is an inefficient approach. Especially when a user is switching from AKS -> KIND.
Suggested approach:
- There are two approaches to solve this
- Have
MGMT_CLUSTER_TYPE
saved to an .env file in the repo directory withMGMT_CLUSTER_TYPE=aks
when runningmake aks-create
. Source this env file before runningtilt-up
. The env file must be updated when runningmake kind-create
.
OR - Update tilt-settings.yaml, add or delete
MGMT_CLUSTER_TYPE
every timeaks-create
orkind-create
is called. Tilt-settings.yaml gets parsed in Tiltfilecluster-api-provider-azure/Tiltfile
Line 41 in 6bce7f8
- Once settings struct in tiltfile is updated, we can then use it to check if the mgmt cluster type is aks or not.
- Have
- Once a similar logic is implemented, we want to update all the occurrences of
if "aks" in settings.get("kustomize_substitutions", {}).get("MGMT_CLUSTER_NAME", ""):
in the Tiltfile with appropriate if condition.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
In Progress