File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -416,7 +416,12 @@ create-workload-cluster: $(ENVSUBST) $(KUBECTL) ## Create a workload cluster.
416416 # Get kubeconfig and store it locally.
417417 $(KUBECTL) get secret/$(CLUSTER_NAME)-kubeconfig -n default -o json | jq -r .data.value | base64 --decode > ./kubeconfig
418418 # TODO: Standardize timeouts across the Makefile and make them configurable based on the job.
419- $(KUBECTL) -n default wait --for=condition=Ready --timeout=60m cluster "$(CLUSTER_NAME)"
419+ $(KUBECTL) -n default wait --for=condition=Ready --timeout=60m cluster "$(CLUSTER_NAME)" && RET=$$? || RET=$$?; \
420+ if [ "$$RET" -ne "0" ]; then \
421+ echo "Failed to wait for cluster to be ready"; \
422+ $(KUBECTL) -n default get cluster-api -o yaml > ${ARTIFACTS}/debug.yaml; \
423+ exit 1; \
424+ fi; \
420425
421426 # Set the namespace to `default` b/c when the service account is auto mounted, the namespace is changed to `test-pods`.
422427 $(KUBECTL) --kubeconfig=./kubeconfig config set-context --current --namespace="default"
You can’t perform that action at this time.
0 commit comments