mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-28 00:07:16 +00:00
ci: k8s: Add a CRI-O test
Let's make sure we'll also be testing k8s using CRI-O. For now, we'll only be running the CRI-O test with QEMU. Once it becomes stable we can expand this to other Hypervisors as well. Fixes: #8005 Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
This commit is contained in:
parent
d7105cf7a4
commit
03b82e8484
86
.github/workflows/run-k8s-tests-with-crio-on-garm.yaml
vendored
Normal file
86
.github/workflows/run-k8s-tests-with-crio-on-garm.yaml
vendored
Normal file
@ -0,0 +1,86 @@
|
|||||||
|
name: CI | Run kubernetes tests, using CRI-O, on GARM
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
registry:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
repo:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
tag:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
pr-number:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
commit-hash:
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
target-branch:
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
default: ""
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
run-k8s-tests:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
vmm:
|
||||||
|
- qemu
|
||||||
|
k8s:
|
||||||
|
- k0s
|
||||||
|
instance:
|
||||||
|
- garm-ubuntu-2004
|
||||||
|
- garm-ubuntu-2004-smaller
|
||||||
|
include:
|
||||||
|
- instance: garm-ubuntu-2004
|
||||||
|
instance-type: normal
|
||||||
|
- instance: garm-ubuntu-2004-smaller
|
||||||
|
instance-type: small
|
||||||
|
- k8s: k0s
|
||||||
|
k8s-extra-params: '--cri-socket remote:unix:///var/run/crio/crio.sock --kubelet-extra-args --cgroup-driver="systemd"'
|
||||||
|
runs-on: ${{ matrix.instance }}
|
||||||
|
env:
|
||||||
|
DOCKER_REGISTRY: ${{ inputs.registry }}
|
||||||
|
DOCKER_REPO: ${{ inputs.repo }}
|
||||||
|
DOCKER_TAG: ${{ inputs.tag }}
|
||||||
|
PR_NUMBER: ${{ inputs.pr-number }}
|
||||||
|
KATA_HYPERVISOR: ${{ matrix.vmm }}
|
||||||
|
KUBERNETES: ${{ matrix.k8s }}
|
||||||
|
KUBERNETES_EXTRA_PARAMS: ${{ matrix.k8s-extra-params }}
|
||||||
|
USING_NFD: "false"
|
||||||
|
K8S_TEST_HOST_TYPE: ${{ matrix.instance-type }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: ${{ inputs.commit-hash }}
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Rebase atop of the latest target branch
|
||||||
|
run: |
|
||||||
|
./tests/git-helper.sh "rebase-atop-of-the-latest-target-branch"
|
||||||
|
env:
|
||||||
|
TARGET_BRANCH: ${{ inputs.target-branch }}
|
||||||
|
|
||||||
|
- name: Configure CRI-O
|
||||||
|
run: bash tests/integration/kubernetes/gha-run.sh setup-crio
|
||||||
|
|
||||||
|
- name: Deploy ${{ matrix.k8s }}
|
||||||
|
run: bash tests/integration/kubernetes/gha-run.sh deploy-k8s
|
||||||
|
|
||||||
|
- name: Deploy Kata
|
||||||
|
timeout-minutes: 10
|
||||||
|
run: bash tests/integration/kubernetes/gha-run.sh deploy-kata-garm
|
||||||
|
|
||||||
|
- name: Install `bats`
|
||||||
|
run: bash tests/integration/kubernetes/gha-run.sh install-bats
|
||||||
|
|
||||||
|
- name: Run tests
|
||||||
|
timeout-minutes: 30
|
||||||
|
run: bash tests/integration/kubernetes/gha-run.sh run-tests
|
||||||
|
|
||||||
|
- name: Delete kata-deploy
|
||||||
|
if: always()
|
||||||
|
run: bash tests/integration/kubernetes/gha-run.sh cleanup-garm
|
Loading…
Reference in New Issue
Block a user