mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-30 01:02:33 +00:00
Merge pull request #10929 from kata-containers/topic/enable-arm-tests
arm: ci: k8s: Enable CI
This commit is contained in:
commit
e3eb9e4f28
1
.github/actionlint.yaml
vendored
1
.github/actionlint.yaml
vendored
@ -7,6 +7,7 @@
|
|||||||
self-hosted-runner:
|
self-hosted-runner:
|
||||||
# Labels of self-hosted runner that linter should ignore
|
# Labels of self-hosted runner that linter should ignore
|
||||||
labels:
|
labels:
|
||||||
|
- arm64-k8s
|
||||||
- ubuntu-22.04-arm
|
- ubuntu-22.04-arm
|
||||||
- garm-ubuntu-2004
|
- garm-ubuntu-2004
|
||||||
- garm-ubuntu-2004-smaller
|
- garm-ubuntu-2004-smaller
|
||||||
|
12
.github/workflows/ci.yaml
vendored
12
.github/workflows/ci.yaml
vendored
@ -221,6 +221,18 @@ jobs:
|
|||||||
target-branch: ${{ inputs.target-branch }}
|
target-branch: ${{ inputs.target-branch }}
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
|
run-k8s-tests-on-arm64:
|
||||||
|
if: ${{ inputs.skip-test != 'yes' }}
|
||||||
|
needs: publish-kata-deploy-payload-arm64
|
||||||
|
uses: ./.github/workflows/run-k8s-tests-on-arm64.yaml
|
||||||
|
with:
|
||||||
|
registry: ghcr.io
|
||||||
|
repo: ${{ github.repository_owner }}/kata-deploy-ci
|
||||||
|
tag: ${{ inputs.tag }}-arm64
|
||||||
|
commit-hash: ${{ inputs.commit-hash }}
|
||||||
|
pr-number: ${{ inputs.pr-number }}
|
||||||
|
target-branch: ${{ inputs.target-branch }}
|
||||||
|
|
||||||
run-kata-coco-tests:
|
run-kata-coco-tests:
|
||||||
if: ${{ inputs.skip-test != 'yes' }}
|
if: ${{ inputs.skip-test != 'yes' }}
|
||||||
needs:
|
needs:
|
||||||
|
83
.github/workflows/run-k8s-tests-on-arm64.yaml
vendored
Normal file
83
.github/workflows/run-k8s-tests-on-arm64.yaml
vendored
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
name: CI | Run kubernetes tests on arm64
|
||||||
|
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-on-arm64:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
vmm:
|
||||||
|
- qemu
|
||||||
|
k8s:
|
||||||
|
- kubeadm
|
||||||
|
runs-on: arm64-k8s
|
||||||
|
env:
|
||||||
|
DOCKER_REGISTRY: ${{ inputs.registry }}
|
||||||
|
DOCKER_REPO: ${{ inputs.repo }}
|
||||||
|
DOCKER_TAG: ${{ inputs.tag }}
|
||||||
|
GH_PR_NUMBER: ${{ inputs.pr-number }}
|
||||||
|
KATA_HYPERVISOR: ${{ matrix.vmm }}
|
||||||
|
KUBERNETES: ${{ matrix.k8s }}
|
||||||
|
USING_NFD: "false"
|
||||||
|
K8S_TEST_HOST_TYPE: all
|
||||||
|
TARGET_ARCH: "aarch64"
|
||||||
|
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: Deploy Kata
|
||||||
|
timeout-minutes: 10
|
||||||
|
run: bash tests/integration/kubernetes/gha-run.sh deploy-kata
|
||||||
|
|
||||||
|
- 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: Collect artifacts ${{ matrix.vmm }}
|
||||||
|
if: always()
|
||||||
|
run: bash tests/integration/kubernetes/gha-run.sh collect-artifacts
|
||||||
|
continue-on-error: true
|
||||||
|
|
||||||
|
- name: Archive artifacts ${{ matrix.vmm }}
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: k8s-tests-${{ matrix.vmm }}-${{ matrix.k8s }}-${{ inputs.tag }}
|
||||||
|
path: /tmp/artifacts
|
||||||
|
retention-days: 1
|
||||||
|
|
||||||
|
- name: Delete kata-deploy
|
||||||
|
if: always()
|
||||||
|
timeout-minutes: 5
|
||||||
|
run: bash tests/integration/kubernetes/gha-run.sh cleanup
|
@ -40,6 +40,8 @@ setup_yaml() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@test "Running within memory constraints" {
|
@test "Running within memory constraints" {
|
||||||
|
[ "$(uname -m)" == "aarch64" ] && skip "See: https://github.com/kata-containers/kata-containers/issues/10926"
|
||||||
|
|
||||||
memory_limit_size="600Mi"
|
memory_limit_size="600Mi"
|
||||||
allocated_size="150M"
|
allocated_size="150M"
|
||||||
|
|
||||||
|
@ -9,6 +9,7 @@ load "${BATS_TEST_DIRNAME}/tests_common.sh"
|
|||||||
|
|
||||||
setup() {
|
setup() {
|
||||||
[ "${KATA_HYPERVISOR}" == "fc" ] && skip "test not working see: https://github.com/kata-containers/kata-containers/issues/7873"
|
[ "${KATA_HYPERVISOR}" == "fc" ] && skip "test not working see: https://github.com/kata-containers/kata-containers/issues/7873"
|
||||||
|
[ "$(uname -m)" == "aarch64" ] && skip "See: https://github.com/kata-containers/kata-containers/issues/10927"
|
||||||
|
|
||||||
get_pod_config_dir
|
get_pod_config_dir
|
||||||
|
|
||||||
@ -37,6 +38,7 @@ setup() {
|
|||||||
|
|
||||||
teardown() {
|
teardown() {
|
||||||
[ "${KATA_HYPERVISOR}" == "fc" ] && skip "test not working see: https://github.com/kata-containers/kata-containers/issues/7873"
|
[ "${KATA_HYPERVISOR}" == "fc" ] && skip "test not working see: https://github.com/kata-containers/kata-containers/issues/7873"
|
||||||
|
[ "$(uname -m)" == "aarch64" ] && skip "See: https://github.com/kata-containers/kata-containers/issues/10927"
|
||||||
|
|
||||||
# Debugging information
|
# Debugging information
|
||||||
kubectl describe deployment ${deployment_name}
|
kubectl describe deployment ${deployment_name}
|
||||||
|
@ -12,6 +12,7 @@ setup() {
|
|||||||
[ "${KATA_HYPERVISOR}" == "dragonball" ] || [ "${KATA_HYPERVISOR}" == "cloud-hypervisor" ] && \
|
[ "${KATA_HYPERVISOR}" == "dragonball" ] || [ "${KATA_HYPERVISOR}" == "cloud-hypervisor" ] && \
|
||||||
skip "runtime-rs is still using the old vcpus allocation algorithm, skipping the test see https://github.com/kata-containers/kata-containers/issues/8660"
|
skip "runtime-rs is still using the old vcpus allocation algorithm, skipping the test see https://github.com/kata-containers/kata-containers/issues/8660"
|
||||||
[ "${KATA_HYPERVISOR}" = "qemu-runtime-rs" ] && skip "Requires CPU hotplug which isn't supported on ${KATA_HYPERVISOR} yet"
|
[ "${KATA_HYPERVISOR}" = "qemu-runtime-rs" ] && skip "Requires CPU hotplug which isn't supported on ${KATA_HYPERVISOR} yet"
|
||||||
|
[ "$(uname -m)" == "aarch64" ] && skip "See: https://github.com/kata-containers/kata-containers/issues/10928"
|
||||||
|
|
||||||
get_pod_config_dir
|
get_pod_config_dir
|
||||||
pods=( "vcpus-less-than-one-with-no-limits" "vcpus-less-than-one-with-limits" "vcpus-more-than-one-with-limits" )
|
pods=( "vcpus-less-than-one-with-no-limits" "vcpus-less-than-one-with-limits" "vcpus-more-than-one-with-limits" )
|
||||||
@ -38,6 +39,7 @@ teardown() {
|
|||||||
[ "${KATA_HYPERVISOR}" == "dragonball" ] || [ "${KATA_HYPERVISOR}" == "cloud-hypervisor" ] && \
|
[ "${KATA_HYPERVISOR}" == "dragonball" ] || [ "${KATA_HYPERVISOR}" == "cloud-hypervisor" ] && \
|
||||||
skip "runtime-rs is still using the old vcpus allocation algorithm, skipping the test see https://github.com/kata-containers/kata-containers/issues/8660"
|
skip "runtime-rs is still using the old vcpus allocation algorithm, skipping the test see https://github.com/kata-containers/kata-containers/issues/8660"
|
||||||
[ "${KATA_HYPERVISOR}" = "qemu-runtime-rs" ] && skip "Requires CPU hotplug which isn't supported on ${KATA_HYPERVISOR} yet"
|
[ "${KATA_HYPERVISOR}" = "qemu-runtime-rs" ] && skip "Requires CPU hotplug which isn't supported on ${KATA_HYPERVISOR} yet"
|
||||||
|
[ "$(uname -m)" == "aarch64" ] && skip "See: https://github.com/kata-containers/kata-containers/issues/10928"
|
||||||
|
|
||||||
for pod in "${pods[@]}"; do
|
for pod in "${pods[@]}"; do
|
||||||
kubectl logs ${pod}
|
kubectl logs ${pod}
|
||||||
|
Loading…
Reference in New Issue
Block a user