From 57af746d21081dea4e2490f3d77784e35e0ee7e9 Mon Sep 17 00:00:00 2001 From: denis-tingaikin Date: Fri, 20 Dec 2024 22:38:10 +0300 Subject: [PATCH] add kind selfhost Signed-off-by: denis-tingaikin --- .github/workflows/main.yaml | 89 ++++++++++++++++++++++++++++ kube/KIND.md | 87 +++++++++++++++++++++++++++ kube/README.md | 6 ++ kube/account/account-deployment.yaml | 5 ++ kube/hosts | 6 ++ kube/mongodb/mongodb-deployment.yaml | 1 - kube/mongodb/mongodb-service.yaml | 4 +- 7 files changed, 195 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/main.yaml create mode 100644 kube/KIND.md create mode 100644 kube/hosts diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml new file mode 100644 index 0000000..e178669 --- /dev/null +++ b/.github/workflows/main.yaml @@ -0,0 +1,89 @@ +name: ci + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +on: + pull_request: + +jobs: + kind-selfhost: + runs-on: ubuntu-latest + timeout-minutes: 20 + steps: + - name: "Checkout repository" + uses: actions/checkout@v4 + with: + path: ${{ github.workspace }}/src/github.com/${{ github.repository }} + + - name: "Install kind" + run: | + [ $(uname -m) = x86_64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.26.0/kind-linux-amd64 + # For ARM64 + [ $(uname -m) = aarch64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.26.0/kind-linux-arm64 + chmod +x ./kind + sudo mv ./kind /usr/local/bin/kind + + - name: "Setup k8s cluster" + run: | + cat < [!NOTE] +> On the host computer, `localhost:80` should be accessible. + +```bash +cat <