Commit Graph

16374 Commits

Author SHA1 Message Date
Hyounggyu Choi
09297b7955
Merge pull request #11537 from BbolroC/set-sharedfs-to-none-for-ibm-sel
runtime/runtime-rs: Set shared_fs to none for IBM SEL in config file
2025-07-09 18:30:08 +02:00
Hyounggyu Choi
bca31d5a4d runtime/runtime-rs: Set shared_fs to none for IBM SEL in config file
In line with configuration for other TEEs, shared_fs should
be set to none for IBM SEL. This commit updates the value for
runtime/runtime-rs.

Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
2025-07-09 14:22:28 +02:00
Steve Horsman
7bc25b0259
Merge pull request #11494 from katexochen/p/opa-1.6
versions: bump opa 1.5.1 -> 1.6.0
2025-07-09 11:45:54 +01:00
Steve Horsman
967f66f677
Merge pull request #11380 from arvindskumar99/sev-deprecation
Sev deprecation
2025-07-09 11:38:13 +01:00
Xuewei Niu
b8838140d0
Merge pull request #11527 from StevenFryto/fix-runtime-rootless-bugs
runtime: Fix rootlessDir not correctly set in rootless VMM mode
2025-07-09 16:40:11 +08:00
Steve Horsman
990c4e68ee
Merge pull request #11523 from wainersm/ci_setup_kubectl
workflows: adopting azure/setup-kubectl
2025-07-09 09:09:38 +01:00
stevenfryto
3c7a670129 runtime: Fix rootlessDir not correctly set in rootless VMM mode
Previously, the rootlessDir variable in `src/runtime/virtcontainers/pkg/rootless.go` was initialized at
package load time using `os.Getenv("XDG_RUNTIME_DIR")`. However, in rootless
VMM mode, the correct value of $XDG_RUNTIME_DIR is set later during runtime
using os.Setenv(), so rootlessDir remained empty.

This patch defers the initialization of rootlessDir until the first call
to `GetRootlessDir()`, ensuring it always reflects the current environment
value of $XDG_RUNTIME_DIR.

Fixes: #11526

Signed-off-by: stevenfryto <sunzitai_1832@bupt.edu.cn>
2025-07-09 09:51:48 +08:00
Wainer dos Santos Moschetta
e4da3b84a3 workflows: adopting azure/setup-kubectl
There are workflows that rely on `az aks install-cli` to get kubectl
installed. There is a well-known problem on install-cli, related with
API usage rate limit, that has recently caused the command to fail
quite often.

This is replacing install-cli with the azure/setup-kubectl github
action which has no such as rate limit problem.

While here, removed the install_cli() function from gha-run-k8s-common.sh
so avoid developers using it by mistake in the future.

Fixes #11463
Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
2025-07-08 15:15:54 -03:00
Alex Lyn
294b2c1c10
Merge pull request #11528 from Apokleos/remote-initdata
runtime-rs: add initdata annotation for remote hypervisor
2025-07-08 09:13:13 +08:00
Arvind Kumar
afedad0965 kernel: Removing SEV kernel packages
Removing kernel config files realting
to SEV as part of the SEV deprecation
efforts.

Co-authored-by: Adithya Krishnan Kannan <AdithyaKrishnan.Kannan@amd.com>
Signed-off-by: Arvind Kumar <arvinkum@amd.com>
2025-07-07 11:21:11 -05:00
Arvind Kumar
ecac3d2d28 runtime: Removing runtime logic for SEV
Removing runtime SEV functionality,
such as the kbs, ovmf, VMSA handling,
and SEV configs as part of deprecating
SEV from kata.

Co-authored-by: Adithya Krishnan Kannan <AdithyaKrishnan.Kannan@amd.com>
Signed-off-by: Arvind Kumar <arvinkum@amd.com>
2025-07-07 11:17:32 -05:00
Arvind Kumar
8eebcef8fb tests: Removing testing framework for SEV
Removing files pertaining to SEV from
the CI framework.

Co-authored-by: Adithya Krishnan Kannan <AdithyaKrishnan.Kannan@amd.com>
Signed-off-by: Arvind Kumar <arvinkum@amd.com>
2025-07-07 11:17:32 -05:00
Arvind Kumar
675ea86aba kata-deploy: Removing SEV from kata-deploy
Removing files related to SEV, responsible for
installing and configuring Kata containers.

Co-authored-by: Adithya Krishnan Kannan <AdithyaKrishnan.Kannan@amd.com>
Signed-off-by: Arvind Kumar <arvinkum@amd.com>
2025-07-07 11:17:32 -05:00
Paul Meyer
ff7ac58579 versions: bump opa 1.5.1 -> 1.6.0
Bumping opa to latest release.

Signed-off-by: Paul Meyer <katexochen0@gmail.com>
2025-07-07 14:19:08 +02:00
alex.lyn
fcaade24f4 runtime-rs: add initdata annotation for remote hypervisor
Add init data annotation within preparing remote hypervisor annotations
when prepare vm, so that it can be passed within CreateVMRequest.

Signed-off-by: alex.lyn <alex.lyn@antgroup.com>
2025-07-07 12:46:05 +01:00
Fabiano Fidêncio
110f68a0f1
Merge pull request #11530 from fidencio/topic/tests-fix-runtime-class-check
tests: runtimeclasses: Adjust gpu runtimeclasses
2025-07-07 13:42:46 +02:00
Fabiano Fidêncio
2c2995b7b0 tests: runtimeclasses: Adjust gpu runtimeclasses
679cc9d47c was merged and bumped the
podoverhead for the gpu related runtimeclasses. However, the bump on the
`kata-runtimeClasses.yaml` as overlooked, making our tests fail due to
that discrepancy.

Let's just adjust the values here and move on.

Signed-off-by: Fabiano Fidêncio <fidencio@northflank.com>
2025-07-07 11:43:40 +02:00
Fabiano Fidêncio
ef545eed86
Merge pull request #11513 from lifupan/dragonball_6.12.x
tools: port the dragonball kernel patch to 6.12.x
2025-07-07 10:31:49 +02:00
Steve Horsman
d291e9bda0
Merge pull request #11336 from zvonkok/fix-podoverhead
gpu: Update runtimeClasses for correct podoverhead
2025-07-07 09:20:07 +01:00
Fabiano Fidêncio
a2faf93211 kernel: Bump to v6.12.36
As that's the latest releasesd LTS.

Signed-off-by: Fabiano Fidêncio <fidencio@northflank.com>
2025-07-06 23:48:20 +02:00
Fupan Li
fd21c9df59 tools: port the dragonball kernel patch to 6.12.x
Backport the dragonball's kernel patches to
6.12.x kernel version.

Signed-off-by: Fupan Li <fupan.lfp@antgroup.com>
2025-07-06 23:48:20 +02:00
Zvonko Kaiser
679cc9d47c gpu: Update runtimeClasses for correct podoverhead
We cannot only rely only on default_cpu and default_memory in the
config, default is 1 and 2Gi but we need some overhead for QEMU and
the other related binaries running as the pod overhead. Especially
when QEMU is hot-plugging GPUs, CPUs, and memory it can consume more
memory.

Signed-off-by: Zvonko Kaiser <zkaiser@nvidia.com>
2025-07-04 12:20:15 -04:00
Steve Horsman
1c718dbcdd
Merge pull request #11506 from stevenhorsman/remove-atty-dependency
Remove atty dependency
2025-07-04 10:46:28 +01:00
Alex Lyn
362ea54763
Merge pull request #11517 from zvonkok/fix-nvrc-build
gpu: NVRC static build
2025-07-04 13:51:03 +08:00
Alex Lyn
2e35a8067d
Merge pull request #11482 from Apokleos/fix-force-guestpull
runtime-rs:  refactor and fix the implementation of guest-pull
2025-07-04 11:29:33 +08:00
stevenhorsman
6f23608e96 ci: Remove atty group
atty is unmaintained, with the last release almost 3 years
ago, so we don't need to check for updates, but instead will
remove it from out dependency tree.

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2025-07-04 09:43:34 +08:00
stevenhorsman
7ffbdf7b3a mem-agent: Remove structopts crate
structopt features were integrated into clap v3 and so is not
actively updated and pulls in the atty crate which has a security
advisory, so update clap, remove structopts, update the code that
used it to remove the outdated dependencies.

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2025-07-04 09:43:34 +08:00
stevenhorsman
7845129bdc versions: Bump slog-term to 2.9.1
slog-term 2.9.0 included atty, which is unmaintained
as has a security advisory GHSA-g98v-hv3f-hcfr,
so bump the version across our components to remove
this dependency.

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2025-07-04 09:43:34 +08:00
Aurélien Bombo
fe532f9d04
Merge pull request #11475 from kata-containers/sprt/zizmor-fixes
security: ci: Fixes for Zizmor GHA security scanning
2025-07-03 13:29:47 -05:00
Zvonko Kaiser
c3b2d69452 gpu: NVRC static build
We had the proper config.toml configuration for static builds
but were building the glibc  target and not the musl target.

Signed-off-by: Zvonko Kaiser <zkaiser@nvidia.com>
2025-07-03 15:31:00 +00:00
Aurélien Bombo
8723eedad2 gha: Remove path restriction for Zizmor workflow
The way GH works, we can only require Zizmor results on ALL PR runs, or
none, so remove the path filter.

Signed-off-by: Aurélien Bombo <abombo@microsoft.com>
2025-07-03 08:18:34 -05:00
Alex Lyn
c857f59a1a
Merge pull request #11510 from lifupan/sync_resize_vcpu
runtime-rs: make the resize_vcpu api support sync
2025-07-03 17:35:08 +08:00
alex.lyn
2b95facc6f kata-type: Relax Mandatory source Field Check in Guest-Pull Mode
Previously, the source field was subject to mandatory checks. However,
in guest-pull mode, this field doesn't consistently provide useful
information. Our practical experience has shown that relying on this
field for critical data isn't always necessary.

In other aspect, not all cases need mandatory check for KataVirtualVolume.
based on this fact, we'd better to make from_base64 do only one thing and
remove the validate(). Of course, We also keep the previous capability to
make it easy for possible cases which use such method and we rename it
clearly with from_base64_and_validate.

This commit relaxes the mandatory checks on the KataVirtualVolume specifically
for guest-pull mode, acknowledging its diminished utility in this context.

Signed-off-by: alex.lyn <alex.lyn@antgroup.com>
2025-07-03 17:07:20 +08:00
alex.lyn
8f8b196705 runtime-rs: refactor merging metadata within image_pull
refactor implementation for merging metadata.

Signed-off-by: alex.lyn <alex.lyn@antgroup.com>
2025-07-03 17:07:08 +08:00
Fupan Li
fb1c35335a runtime-rs: make the resize_vcpu sync
When hot plugging vcpu in dragonball hypervisor, use the synchronization
interface and wait until the hot plug cpu is executed in the guest
before returning. This ensures that the subsequent device hot plug will
not conflict with the previous call.

Signed-off-by: Fupan Li <fupan.lfp@antgroup.com>
2025-07-03 15:11:36 +08:00
Fupan Li
72a38457f0 dragonball: make the resize_vcpu api support sync
Let dragonball's resize_vcpu api support synchronization, and only
return after the hot-plug of the CPU is successfully executed in the
guest kernel. This ensures that the subsequent device hot-plug operation
can also proceed smoothly.

Signed-off-by: Fupan Li <fupan.lfp@antgroup.com>
2025-07-03 15:11:36 +08:00
Alex Lyn
210844ce6b
Merge pull request #11509 from teawater/agent_test
kata-agent: mount.rs: Fix warning of test
2025-07-03 15:05:04 +08:00
Alex Lyn
95d513b379
Merge pull request #11423 from zhaodiaoer/test
test: fix broken testing code in libs
2025-07-03 11:15:39 +08:00
teawater
0347698c59 kata-agent: mount.rs: Fix warning of test
Got follow warning with make test of kata-agent:
   Compiling rustjail v0.1.0 (/data/teawater/kata-containers/src/agent/rustjail)
   Compiling kata-agent v0.1.0 (/data/teawater/kata-containers/src/agent)
warning: unused import: `std::os::unix::fs`
    --> rustjail/src/mount.rs:1147:9
     |
1147 |     use std::os::unix::fs;
     |         ^^^^^^^^^^^^^^^^^
     |
     = note: `#[warn(unused_imports)]` on by default

This commit fixes it.

Fixes: #11508

Signed-off-by: teawater <zhuhui@kylinos.cn>
2025-07-03 10:01:19 +08:00
alex.lyn
7a59d7f937 runtime-rs: Import the public const value from libs
Introduce a const value `KATA_VIRTUAL_VOLUME_PREFIX` defined in the libs/kata-types,
and it'll be better import such const value from there.

Signed-off-by: alex.lyn <alex.lyn@antgroup.com>
2025-07-03 09:42:17 +08:00
Aurélien Bombo
8d86bcea4b
Merge pull request #11499 from kata-containers/sprt/fix-commit-check
gha: Eliminate use of force-skip-ci label
2025-07-02 10:53:55 -05:00
Aurélien Bombo
8d7d859e30 gha: Eliminate use of force-skip-ci label
This was originally implemented as a Jenkins skip and is only used in a few
workflows.  Nowadays this would be better implemented via the gatekeeper.

Signed-off-by: Aurélien Bombo <abombo@microsoft.com>
2025-07-02 10:29:50 -05:00
Saul Paredes
e7b9eddced
Merge pull request #11248 from microsoft/archana1/storages
genpolicy: add validation for storages
2025-07-01 10:02:10 -07:00
Fabiano Fidêncio
07b41c88de
Merge pull request #11490 from Apokleos/fix-noise
runtime-rs: Fix noise with frequently appearing in unstaged changes
2025-07-01 17:43:41 +02:00
Archana Choudhary
6932beb01f policy: fix parse errors in rules.rego
This patch fixes the rules.rego file to ensure that the
policy is correctly parsed and applied by opa.

Signed-off-by: Archana Choudhary <archana1@microsoft.com>
2025-07-01 12:43:41 +00:00
Archana Choudhary
abbe1be69f tests: enable confidential_guest setting for coco
This commit updates the `tests_common.sh` script
to enable the `confidential_guest`
setting for the coco tests in the Kubernetes
integration tests.

Signed-off-by: Archana Choudhary <archana1@microsoft.com>
2025-07-01 10:35:20 +00:00
Archana Choudhary
9dd365fdb5 genpolicy: fix mount source check in rules.rego
This commit fixes the mount source check in rules.rego.

Signed-off-by: Archana Choudhary <archana1@microsoft.com>
2025-07-01 10:35:20 +00:00
Archana Choudhary
1cbea890f1 genpolicy: tests: update testcases for execprocess
This patch removes storages from the testcases.json file for execprocess.
This is because input storage objects are invalid for two reasons:
1. "io.katacontainers.fs-opt.layer=" is missing option in annotations.
2. by default, we don't have host-tarfs-dm-verity enabled, so the storage
objects are not created in policy.

Signed-off-by: Archana Choudhary <archana1@microsoft.com>
---
2025-07-01 10:35:20 +00:00
Archana Choudhary
6adec0737c genpolicy: add rules for image_guest_pull storage
This patch introduces some basic checks for the
`image_guest_pull` storage type in the genpolicy tool.

Signed-off-by: Archana Choudhary <archana1@microsoft.com>
2025-07-01 10:35:20 +00:00
Archana Choudhary
bd2dc1422e genpolicy: add test for container images having volumes
This patch adds a test case to genpolicy for container images that have volumes.
Examples of such container images include:
 - quay.io/opstree/redis
 - https://github.com/kubernetes/examples/blob/master/cassandra/image/Dockerfile

Signed-off-by: Archana Choudhary <archana1@microsoft.com>
2025-07-01 10:35:20 +00:00