@@ -307,9 +307,6 @@ create-management-cluster: $(KUSTOMIZE) $(ENVSUBST) $(KUBECTL) $(KIND) ## Create
307307 # Install cert manager and wait for availability
308308 ./hack/install-cert-manager.sh
309309
310- # Create secret for AzureClusterIdentity
311- ./hack/create-identity-secret.sh
312-
313310 # Create customized cloud provider configs
314311 ./hack/create-custom-cloud-provider-config.sh
315312
@@ -335,7 +332,7 @@ create-management-cluster: $(KUSTOMIZE) $(ENVSUBST) $(KUBECTL) $(KIND) ## Create
335332 timeout --foreground 300 bash -c "until $(KUBECTL) get clusterresourcesets -A; do sleep 3; done"
336333
337334 # install Windows Calico cluster resource set
338- timeout --foreground 300 bash -c "until $(KUBECTL) create configmap calico-windows-addon --from-file="$(ADDONS_DIR)/windows/calico" --dry-run=client -o yaml | kubectl apply -f -; do sleep 5; done"
335+ timeout --foreground 300 bash -c "until $(KUBECTL) create configmap calico-windows-addon -n default - -from-file="$(ADDONS_DIR)/windows/calico" --dry-run=client -o yaml | kubectl apply -f -; do sleep 5; done"
339336 timeout --foreground 300 bash -c "until $(KUBECTL) apply -f templates/addons/windows/calico-resource-set.yaml; do sleep 5; done"
340337
341338 # Wait for CAPZ deployments
@@ -363,10 +360,10 @@ create-workload-cluster: $(ENVSUBST) $(KUBECTL) ## Create a workload cluster.
363360 fi
364361
365362 # Wait for the kubeconfig to become available.
366- timeout --foreground 1800 bash -c "while ! $(KUBECTL) get secrets | grep $(CLUSTER_NAME)-kubeconfig; do sleep 1; done"
363+ timeout --foreground 1800 bash -c "while ! $(KUBECTL) get secrets -n default | grep $(CLUSTER_NAME)-kubeconfig; do sleep 1; done"
367364 # Get kubeconfig and store it locally.
368- $(KUBECTL) get secrets $(CLUSTER_NAME)-kubeconfig -o json | jq -r .data.value | base64 --decode > ./kubeconfig
369- $(KUBECTL) wait --for=condition=Ready --timeout=10m cluster "$(CLUSTER_NAME)"
365+ $(KUBECTL) get secret/ $(CLUSTER_NAME)-kubeconfig -n default -o json | jq -r .data.value | base64 --decode > ./kubeconfig
366+ $(KUBECTL) -n default wait --for=condition=Ready --timeout=10m cluster "$(CLUSTER_NAME)"
370367
371368 @echo 'run "$(KUBECTL) --kubeconfig=./kubeconfig ..." to work with the new target cluster'
372369
0 commit comments