Skip to content

Commit

Permalink
fix ci actions
Browse files Browse the repository at this point in the history
  • Loading branch information
usrbinkat committed Jan 31, 2024
1 parent 67b31e0 commit 6e2a96e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/kind.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

Expand Down
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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."
Expand Down

0 comments on commit 6e2a96e

Please sign in to comment.