From ab377f1e9e19ddbd559fb9d5a06b77b460c67e6c Mon Sep 17 00:00:00 2001 From: Kevin Hahn Date: Mon, 10 Jun 2024 11:52:00 -0600 Subject: [PATCH] ensure that kind forwards localhost:80 to ingress in gha --- .github/workflows/k8s-action.yaml | 5 +++++ deployment/gha/kind.yaml | 11 +++++++++++ 2 files changed, 16 insertions(+) create mode 100644 deployment/gha/kind.yaml diff --git a/.github/workflows/k8s-action.yaml b/.github/workflows/k8s-action.yaml index d3019fa615..ba9687cae5 100644 --- a/.github/workflows/k8s-action.yaml +++ b/.github/workflows/k8s-action.yaml @@ -8,6 +8,7 @@ on: jobs: execute: + timeout-minutes: 60 runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -18,6 +19,8 @@ jobs: - run: task setup-local-env - name: setup k8s uses: helm/kind-action@v1.10.0 + with: + config: deployment/gha/kind.yaml - name: Verify k8s run: | kubectl cluster-info @@ -33,6 +36,8 @@ jobs: kubectl describe pods -l 'app in (lexbox, ui, hg, db)' -n languagedepot echo "========== LOGS ==========" kubectl logs -l 'app in (lexbox, ui, hg, db)' -n languagedepot --prefix --all-containers --tail=50 + - name: verify ingress + run: curl -v http://localhost - name: test env: TEST_SERVER_HOSTNAME: 'localhost' diff --git a/deployment/gha/kind.yaml b/deployment/gha/kind.yaml new file mode 100644 index 0000000000..fd7063b0b9 --- /dev/null +++ b/deployment/gha/kind.yaml @@ -0,0 +1,11 @@ +kind: Cluster +apiVersion: kind.x-k8s.io/v1alpha4 +nodes: +- role: control-plane + extraPortMappings: + - containerPort: 80 + hostPort: 80 + protocol: TCP + - containerPort: 443 + hostPort: 443 + protocol: TCP