test: try k3s

This commit is contained in:
Michael Kriese 2024-08-16 13:51:00 +02:00
parent 0b5034b40f
commit 7ce3793b25
No known key found for this signature in database
GPG key ID: F8D7748549A5986A
2 changed files with 39 additions and 13 deletions

View file

@ -0,0 +1,20 @@
# action.yml
name: setup-k3s
description: 'setup k3s'
inputs:
version:
description: 'k3s version'
required: true
runs:
using: 'composite'
steps:
- shell: bash
name: install k3s
run: |
curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION=${INPUT_VERSION} K3S_KUBECONFIG_MODE=640 sh -s - server
echo "KUBECONFIG=/etc/rancher/k3s/k3s.yaml" >> $GITHUB_ENV
- shell: bash
name: check k3s
run: kubectl cluster-info

View file

@ -78,12 +78,14 @@ jobs:
strategy:
matrix:
k8s:
# from https://hub.docker.com/r/kindest/node/tags
- v1.27.16 # renovate: kindest
- v1.28.13 # renovate: kindest
- v1.29.8 # renovate: kindest
- v1.30.4 # renovate: kindest
# k8s:
# # from https://hub.docker.com/r/kindest/node/tags
# - v1.27.16 # renovate: kindest
# - v1.28.13 # renovate: kindest
# - v1.29.8 # renovate: kindest
# - v1.30.4 # renovate: kindest
k3s:
- v1.30.3+k3s1 # renovate: k3s
steps:
- run: cat /etc/os-release
@ -107,14 +109,18 @@ jobs:
with:
version: ${{ env.HELM_CHART_TESTING_VERSION }}
- uses: ./.forgejo/actions/setup-docker
- name: Create kind cluster
uses: helm/kind-action@0025e74a8c7512023d06dc019c617aa3cf561fde # v1.10.0
- uses: ./.forgejo/actions/setup-k3s
with:
node_image: kindest/node:${{ matrix.k8s }}
kubectl_version: ${{ env.KUBECTL_VERSION }}
version: ${{ env.KIND_VERSION }}
version: ${{ matrix.k3s }}
# - uses: ./.forgejo/actions/setup-docker
# - name: Create kind cluster
# uses: helm/kind-action@0025e74a8c7512023d06dc019c617aa3cf561fde # v1.10.0
# with:
# node_image: kindest/node:${{ matrix.k8s }}
# kubectl_version: ${{ env.KUBECTL_VERSION }}
# version: ${{ env.KIND_VERSION }}
- run: kubectl get no -o wide