diff --git a/.github/workflows/kind.yaml b/.github/workflows/kind.yaml index 86f7d3d..9227fa1 100644 --- a/.github/workflows/kind.yaml +++ b/.github/workflows/kind.yaml @@ -86,10 +86,11 @@ jobs: - name: Wait for All Pods to be Ready id: wait-all-pods run: | + set -x direnv allow make wait-all-pods env: - ACTIONS_STEP_DEBUG: false + ACTIONS_STEP_DEBUG: true PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/Makefile b/Makefile index db123a5..ebd6a6a 100644 --- a/Makefile +++ b/Makefile @@ -170,7 +170,7 @@ kind-cluster: && touch ${KUBECONFIG} \ && chmod 600 ${KUBECONFIG} \ && sudo chown -R $$(whoami):$$(whoami) ${KUBECONFIG} - @sudo kind create cluster --wait 1m --retain --config=hack/kind.yaml --kubeconfig ${KUBECONFIG} + @sudo kind create cluster --retain --config=hack/kind.yaml --kubeconfig ${KUBECONFIG} @echo "Kind Kubernetes Clusters: $$(sudo kind get clusters || true)" @kubectl get all --all-namespaces --kubeconfig ${KUBECONFIG} || true @pulumi config set kubernetes kind || true @@ -179,7 +179,11 @@ kind-cluster: # --- Wait for Kind Cluster Ready --- kind-ready: @echo "Waiting for Kind Kubernetes API to be ready..." - @set -x; bash -c 'COUNT=0; until kubectl wait --for=condition=Ready pod -l component=kube-apiserver --namespace=kube-system --timeout=180s --kubeconfig ${KUBECONFIG}; do echo "Waiting for kube-apiserver to be ready..."; sleep 6; ((COUNT++)); if [[ $$COUNT -ge 10 ]]; then echo "kube-apiserver is not ready after 12 attempts. Exiting with error."; exit 1; fi; done' + @printenv + @echo ${KUBECONFIG} + @cat ${KUBECONFIG} + @set -x; bash -c 'COUNT=0; until kubectl wait --for=condition=Ready pod -l component=kube-apiserver --namespace=kube-system --timeout=180s --kubeconfig ${KUBECONFIG}; do echo "Waiting for kube-apiserver to be ready..."; sleep 8; ((COUNT++)); if [[ $$COUNT -ge 10 ]]; then echo "kube-apiserver is not ready after 12 attempts. Exiting with error."; exit 1; fi; done' + @set -ex; kubectl wait --for=condition=Ready pod -l component=kube-apiserver --namespace=kube-system --timeout=180s --kubeconfig .kube/config @set -x; bash -c "until kubectl wait --for=condition=Ready pod -l component=kube-scheduler --namespace=kube-system --timeout=180s --kubeconfig ${KUBECONFIG}; do echo 'Waiting for kube-scheduler to be ready...'; sleep 5; done" @set -x; bash -c "until kubectl wait --for=condition=Ready pod -l component=kube-controller-manager --namespace=kube-system --timeout=180s --kubeconfig ${KUBECONFIG}; do echo 'Waiting for kube-controller-manager to be ready...'; sleep 5; done" @echo "Kind Cluster is ready."