diff --git a/Tiltfile b/Tiltfile index b1549f0f625..21df3eaafc9 100644 --- a/Tiltfile +++ b/Tiltfile @@ -323,7 +323,7 @@ def flavors(): if "aks" in settings.get("kustomize_substitutions", {}).get("MGMT_CLUSTER_NAME", ""): delete_all_workload_clusters += clear_aks_vnet_peerings() - delete_all_workload_clusters += "; echo \"\n-----------------------------------\n\"" + local_resource( name = "delete-all-workload-clusters", cmd = ["sh", "-ec", delete_all_workload_clusters], @@ -399,9 +399,9 @@ def deploy_worker_templates(template, substitutions): flavor_cmd += "; " + kubectl_cmd + " get secret ${CLUSTER_NAME}-kubeconfig -o jsonpath={.data.value} | base64 --decode > ./${CLUSTER_NAME}.kubeconfig" flavor_cmd += "; chmod 600 ./${CLUSTER_NAME}.kubeconfig" flavor_cmd += "; echo \"Kubeconfig for $CLUSTER_NAME created and saved in the local\"" - flavor_cmd += "; echo \"Waiting for $CLUSTER_NAME nodes to become available\"" + flavor_cmd += "; echo \"Waiting for $CLUSTER_NAME API Server to be accessible\"" flavor_cmd += "; until " + kubectl_cmd + " --kubeconfig=./${CLUSTER_NAME}.kubeconfig get nodes > /dev/null 2>&1; do sleep 5; done" - flavor_cmd += "; echo \"Nodes for $CLUSTER_NAME are available\"" + flavor_cmd += "; echo \"API Server of $CLUSTER_NAME is accessible\"" # copy the kubeadm configmap to the calico-system namespace. # This is a workaround needed for the calico-node-windows daemonset to be able to run in the calico-system namespace. @@ -414,7 +414,7 @@ def deploy_worker_templates(template, substitutions): flavor_cmd += peer_vnets() flavor_cmd += get_addons(flavor_name) - flavor_cmd += "; echo \"\n-----------------------------------\n\"" + local_resource( name = flavor_name, cmd = ["sh", "-ec", flavor_cmd], @@ -524,6 +524,7 @@ def clear_aks_vnet_peerings(): delete_peering_cmd += "; az network vnet wait --resource-group ${AKS_RESOURCE_GROUP} --name ${AKS_MGMT_VNET_NAME} --created --timeout 180" delete_peering_cmd += "; echo \" 1/2 ${AKS_MGMT_VNET_NAME} found \"" + # TODO: xargs: command line cannot be assembled, too long delete_peering_cmd += "; az network vnet peering list --resource-group ${AKS_RESOURCE_GROUP} --vnet-name ${AKS_MGMT_VNET_NAME} --output tsv | xargs -I {} az network vnet peering delete --name {} --resource-group ${AKS_RESOURCE_GROUP} --vnet-name ${AKS_MGMT_VNET_NAME} --only-show-errors --output none" delete_peering_cmd += "; echo \" 2/2 All peerings deleted in mgmt cluster's vnet ${AKS_MGMT_VNET_NAME}\""