diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml new file mode 100644 index 0000000..63c93b3 --- /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] +> kind does not require kubectl, but you will not be able to perform some of the examples in our docs without it. To install kubectl see the upstream kubectl installation docs. + +## Install + +**macOS:** +```bash +# For Intel Macs +[ $(uname -m) = x86_64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.26.0/kind-darwin-amd64 +# For M1 / ARM Macs +[ $(uname -m) = arm64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.26.0/kind-darwin-arm64 +chmod +x ./kind +mv ./kind /some-dir-in-your-PATH/kind +``` + +**Linux:** +```bash +# For AMD64 / x86_64 +[ $(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 +``` + +## Setup cluster with port forwarding + +> [!NOTE] +> On the host computer, `localhost:80` should be accessible. + +```bash +cat <