Merge pull request #10396 from fidencio/topic/ci-mariner-test-using-mariner-image-instead-of-initrd

ci: mariner: Use the image instead of the initrd
This commit is contained in:
Fabiano Fidêncio 2024-10-09 21:39:44 +02:00 committed by GitHub
commit 59e3ab07e4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 10 additions and 8 deletions

View File

@ -53,7 +53,6 @@ jobs:
- rootfs-image-mariner - rootfs-image-mariner
- rootfs-initrd - rootfs-initrd
- rootfs-initrd-confidential - rootfs-initrd-confidential
- rootfs-initrd-mariner
- runk - runk
- shim-v2 - shim-v2
- trace-forwarder - trace-forwarder

View File

@ -183,7 +183,7 @@ function deploy_kata() {
fi fi
if [ "${KATA_HOST_OS}" = "cbl-mariner" ]; then if [ "${KATA_HOST_OS}" = "cbl-mariner" ]; then
yq -i ".env.allowedHypervisorAnnotations = \"initrd kernel default_vcpus\"" "${values_yaml}" yq -i ".env.allowedHypervisorAnnotations = \"image kernel default_vcpus kernel_params\"" "${values_yaml}"
yq -i ".env.hostOS = \"${KATA_HOST_OS}\"" "${values_yaml}" yq -i ".env.hostOS = \"${KATA_HOST_OS}\"" "${values_yaml}"
fi fi

View File

@ -99,19 +99,22 @@ add_annotations_to_yaml() {
esac esac
} }
add_cbl_mariner_kernel_initrd_annotations() { add_cbl_mariner_specific_annotations() {
if [[ "${KATA_HOST_OS}" = "cbl-mariner" ]]; then if [[ "${KATA_HOST_OS}" = "cbl-mariner" ]]; then
info "Add kernel and initrd path and annotations for cbl-mariner" info "Add kernel and image path and annotations for cbl-mariner"
local mariner_annotation_kernel="io.katacontainers.config.hypervisor.kernel" local mariner_annotation_kernel="io.katacontainers.config.hypervisor.kernel"
local mariner_kernel_path="/usr/share/cloud-hypervisor/vmlinux.bin" local mariner_kernel_path="/usr/share/cloud-hypervisor/vmlinux.bin"
local mariner_annotation_initrd="io.katacontainers.config.hypervisor.initrd" local mariner_annotation_image="io.katacontainers.config.hypervisor.image"
local mariner_initrd_path="/opt/kata/share/kata-containers/kata-containers-initrd-mariner.img" local mariner_image_path="/opt/kata/share/kata-containers/kata-containers-mariner.img"
local mariner_annotation_kernel_params="io.katacontainers.config.hypervisor.kernel_params"
local mariner_kernel_params="SYSTEMD_CGROUP_ENABLE_LEGACY_FORCE=1 systemd.legacy_systemd_cgroup_controller=yes systemd.unified_cgroup_hierarchy=0"
for K8S_TEST_YAML in runtimeclass_workloads_work/*.yaml for K8S_TEST_YAML in runtimeclass_workloads_work/*.yaml
do do
add_annotations_to_yaml "${K8S_TEST_YAML}" "${mariner_annotation_kernel}" "${mariner_kernel_path}" add_annotations_to_yaml "${K8S_TEST_YAML}" "${mariner_annotation_kernel}" "${mariner_kernel_path}"
add_annotations_to_yaml "${K8S_TEST_YAML}" "${mariner_annotation_initrd}" "${mariner_initrd_path}" add_annotations_to_yaml "${K8S_TEST_YAML}" "${mariner_annotation_image}" "${mariner_image_path}"
add_annotations_to_yaml "${K8S_TEST_YAML}" "${mariner_annotation_kernel_params}" "${mariner_kernel_params}"
done done
fi fi
} }
@ -139,7 +142,7 @@ add_runtime_handler_annotations() {
main() { main() {
ensure_yq ensure_yq
reset_workloads_work_dir reset_workloads_work_dir
add_cbl_mariner_kernel_initrd_annotations add_cbl_mariner_specific_annotations
add_runtime_handler_annotations add_runtime_handler_annotations
} }