mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-19 15:58:25 +00:00
gha: k8s: prepare AKS workflow to install the CoCo KBS
Changed the "run k8s tests on AKS" workflows to get the CoCo KBS installed so that we can run attestation tests. The plan is to run attestation tests only on a subset of non-TEE jobs initially, so this commit restricts to install KBS only on kata-qemu configuration. Actually at this point it is added only stubs commands to tests/integration/kubernetes/gha-run.sh that should be implemented in a future commit. Fixes #9058 Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
This commit is contained in:
16
.github/workflows/run-k8s-tests-on-aks.yaml
vendored
16
.github/workflows/run-k8s-tests-on-aks.yaml
vendored
@@ -52,6 +52,10 @@ jobs:
|
|||||||
GH_PR_NUMBER: ${{ inputs.pr-number }}
|
GH_PR_NUMBER: ${{ inputs.pr-number }}
|
||||||
KATA_HOST_OS: ${{ matrix.host_os }}
|
KATA_HOST_OS: ${{ matrix.host_os }}
|
||||||
KATA_HYPERVISOR: ${{ matrix.vmm }}
|
KATA_HYPERVISOR: ${{ matrix.vmm }}
|
||||||
|
# Set to install the KBS for attestation tests
|
||||||
|
KBS: ${{ (matrix.vmm == 'qemu' && matrix.host_os == 'ubuntu') && 'true' || 'false' }}
|
||||||
|
# Set the KBS ingress handler (empty string disables handling)
|
||||||
|
KBS_INGRESS: "aks"
|
||||||
KUBERNETES: "vanilla"
|
KUBERNETES: "vanilla"
|
||||||
USING_NFD: "false"
|
USING_NFD: "false"
|
||||||
K8S_TEST_HOST_TYPE: ${{ matrix.instance-type }}
|
K8S_TEST_HOST_TYPE: ${{ matrix.instance-type }}
|
||||||
@@ -103,7 +107,17 @@ jobs:
|
|||||||
- name: Deploy Kata
|
- name: Deploy Kata
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
run: bash tests/integration/kubernetes/gha-run.sh deploy-kata-aks
|
run: bash tests/integration/kubernetes/gha-run.sh deploy-kata-aks
|
||||||
|
|
||||||
|
- name: Deploy CoCo KBS
|
||||||
|
if: env.KBS == 'true'
|
||||||
|
timeout-minutes: 5
|
||||||
|
run: bash tests/integration/kubernetes/gha-run.sh deploy-coco-kbs
|
||||||
|
|
||||||
|
- name: Install `kbs-client`
|
||||||
|
if: env.KBS == 'true'
|
||||||
|
timeout-minutes: 5
|
||||||
|
run: bash tests/integration/kubernetes/gha-run.sh install-kbs-client
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
timeout-minutes: 60
|
timeout-minutes: 60
|
||||||
run: bash tests/integration/kubernetes/gha-run.sh run-tests
|
run: bash tests/integration/kubernetes/gha-run.sh run-tests
|
||||||
|
@@ -23,6 +23,8 @@ DOCKER_TAG=${DOCKER_TAG:-kata-containers-latest}
|
|||||||
KATA_DEPLOY_WAIT_TIMEOUT=${KATA_DEPLOY_WAIT_TIMEOUT:-10m}
|
KATA_DEPLOY_WAIT_TIMEOUT=${KATA_DEPLOY_WAIT_TIMEOUT:-10m}
|
||||||
SNAPSHOTTER_DEPLOY_WAIT_TIMEOUT=${SNAPSHOTTER_DEPLOY_WAIT_TIMEOUT:-8m}
|
SNAPSHOTTER_DEPLOY_WAIT_TIMEOUT=${SNAPSHOTTER_DEPLOY_WAIT_TIMEOUT:-8m}
|
||||||
KATA_HYPERVISOR=${KATA_HYPERVISOR:-qemu}
|
KATA_HYPERVISOR=${KATA_HYPERVISOR:-qemu}
|
||||||
|
KBS=${KBS:-false}
|
||||||
|
KBS_INGRESS=${KBS_INGRESS:-}
|
||||||
KUBERNETES="${KUBERNETES:-}"
|
KUBERNETES="${KUBERNETES:-}"
|
||||||
SNAPSHOTTER="${SNAPSHOTTER:-}"
|
SNAPSHOTTER="${SNAPSHOTTER:-}"
|
||||||
export AUTO_GENERATE_POLICY="${AUTO_GENERATE_POLICY:-no}"
|
export AUTO_GENERATE_POLICY="${AUTO_GENERATE_POLICY:-no}"
|
||||||
@@ -103,6 +105,10 @@ function configure_snapshotter() {
|
|||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function deploy_coco_kbs() {
|
||||||
|
echo "TODO: deploy https://github.com/confidential-containers/kbs"
|
||||||
|
}
|
||||||
|
|
||||||
function deploy_kata() {
|
function deploy_kata() {
|
||||||
platform="${1}"
|
platform="${1}"
|
||||||
ensure_yq
|
ensure_yq
|
||||||
@@ -170,6 +176,10 @@ function deploy_kata() {
|
|||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function install_kbs_client() {
|
||||||
|
echo "TODO: install kbs-client - https://github.com/kata-containers/kata-containers/pull/9114"
|
||||||
|
}
|
||||||
|
|
||||||
function run_tests() {
|
function run_tests() {
|
||||||
platform="${1:-}"
|
platform="${1:-}"
|
||||||
|
|
||||||
@@ -354,9 +364,11 @@ function main() {
|
|||||||
create-cluster-kcli) create_cluster_kcli ;;
|
create-cluster-kcli) create_cluster_kcli ;;
|
||||||
configure-snapshotter) configure_snapshotter ;;
|
configure-snapshotter) configure_snapshotter ;;
|
||||||
setup-crio) setup_crio ;;
|
setup-crio) setup_crio ;;
|
||||||
|
deploy-coco-kbs) deploy_coco_kbs ;;
|
||||||
deploy-k8s) deploy_k8s ;;
|
deploy-k8s) deploy_k8s ;;
|
||||||
install-bats) install_bats ;;
|
install-bats) install_bats ;;
|
||||||
install-kata-tools) install_kata_tools ;;
|
install-kata-tools) install_kata_tools ;;
|
||||||
|
install-kbs-client) install_kbs_client ;;
|
||||||
install-kubectl) install_kubectl ;;
|
install-kubectl) install_kubectl ;;
|
||||||
get-cluster-credentials) get_cluster_credentials ;;
|
get-cluster-credentials) get_cluster_credentials ;;
|
||||||
deploy-kata-aks) deploy_kata "aks" ;;
|
deploy-kata-aks) deploy_kata "aks" ;;
|
||||||
|
Reference in New Issue
Block a user