Commit Graph

15715 Commits

Author SHA1 Message Date
stevenhorsman
d1d60cfe89 ci: Update gatekeeper tests for md files
Update the required-tests.yaml so that .md files only
trigger the static tests, not the build, or CI

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2025-04-09 17:55:27 +01:00
Steve Horsman
9b401cd250
Merge pull request #11090 from stevenhorsman/required-test-updates
ci: required-tests fixes/updates
2025-04-09 14:41:57 +01:00
stevenhorsman
576747b060 ci: Skip tests if we only update the required list
When making new tests required, or removing existing tests
from required, this doesn't impact the CI jobs, so we don't need
to run all the tests.

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2025-04-09 14:22:47 +01:00
stevenhorsman
9a7c5b914e ci: required-tests fixes/updates
- Remove metrics setup job
- Update some truncation typos of job names
- Add shellcheck-required
- Remove the ok-to-test as a required label on the build test
as it isn't needed as a trigger

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2025-04-09 14:22:37 +01:00
Xuewei Niu
5774f131ec
Merge pull request #10938 from Apokleos/fix-iommugrp-symlink
runtime-rs: Simplify iommu group base name extraction from symlink
2025-04-09 19:23:48 +08:00
Xuewei Niu
fd9a4548ab
Merge pull request #11129 from RuoqingHe/entend-runtime-rs-workspace
runtime-rs: Extend runtime-rs workspace and centralize local dependencies
2025-04-09 19:23:15 +08:00
Ruoqing He
28c09ae645 runtime-rs: Put local dependencies into workspace
Put local dependencies into workspace to avoid complex path dependencies all
over the workspace. This gives an overview of local dependencies this workspace
uses, where those crates are located, and simplifies the local dependencies
referencing process.

Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
2025-04-09 07:30:29 +00:00
Ruoqing He
3769ad9c0d runtime-rs: Group local dependencies
Judging by the layout of the `Cargo.toml` files, local dependencies are
intentionally separated from other dependencies, let's enforce it
workspace-wise.

Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
2025-04-09 03:52:16 +00:00
Ruoqing He
abb5fb127b runtime-rs: Extend workspace to cover all crates
Only `shim` and `shim-ctl` are incorporated in `runtime-rs`'s workspace, let's
extend it to cover all crates in `runtime-rs/crates`.

Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
2025-04-09 03:51:48 +00:00
alex.lyn
58bebe332a runtime-rs: Simplify iommu group base name extraction from symlink
Just get base name from iommu group symlink is enough. As the
validation will be handled in subsequent steps when constructing
the full path /sys/kernel/iommu_groups/$iommu_group.

In this PR, it will remove dupicalted validation of iommu_group.

Signed-off-by: alex.lyn <alex.lyn@antgroup.com>
2025-04-09 09:28:00 +08:00
Steve Horsman
8df271358e
Merge pull request #11128 from stevenhorsman/disable-metrics-jobs
ci: Remove metric jobs
2025-04-08 18:16:35 +01:00
stevenhorsman
e6cca9da6d ci: Remove metric jobs
The metrics runner is broken, so skip the metrics
jobs to stop the CI being stuck waiting.

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2025-04-08 17:55:07 +01:00
RuoqingHe
713cbb0c62
Merge pull request #11121 from fidencio/topic/bump-kernel-lts
versions: Bump LTS kernel
2025-04-08 17:28:31 +08:00
Xuewei Niu
d3c9cc4e36
Merge pull request #11014 from teawater/mem-agent-doc
docs: Add how-to-use-memory-agent.md to howto
2025-04-08 17:20:25 +08:00
Fabiano Fidêncio
a40b919afe
Merge pull request #10724 from likebreath/0109/upgrade_clh_v43.0
versions: Upgrade to Cloud Hypervisor v45.0
2025-04-08 08:11:30 +02:00
Fabiano Fidêncio
bc04c390bd versions: Bump LTS kernel
6.12.22 has been released Yesterday, let's bump to it.

Signed-off-by: Fabiano Fidêncio <fabiano@fidencio.org>
2025-04-07 21:46:29 +02:00
Bo Chen
ee84068aed versions: Upgrade to Cloud Hypervisor v45.0
Details of this release can be found in our roadmap project as iteration
v45.0: https://github.com/orgs/cloud-hypervisor/projects/6.

Fixes: #10723

Signed-off-by: Bo Chen <bchen@crusoe.ai>
Signed-off-by: Fabiano Fidêncio <fidencio@northflank.com>
2025-04-07 20:33:34 +02:00
Dan Mihai
8779abd0a1
Merge pull request #11057 from mythi/tdx-qgs-uds
runtime: qemu: add support to use TDX QGS via Unix Domain Sockets
2025-04-07 07:27:48 -07:00
Dan Mihai
e606a8deb5
Merge pull request #11103 from Ankita13-code/ankitapareek/policy-input-validation
policy: Add missing input validations for ExecProcessRequest
2025-04-07 07:26:24 -07:00
Steve Horsman
ba92639481
Merge pull request #11094 from RuoqingHe/2025-03-28-enable-riscv-assets-build
ci: Enable `build-kata-static-tarball-riscv64.yaml`
2025-04-07 11:26:15 +01:00
Fabiano Fidêncio
c75ea2582e
Merge pull request #11114 from fidencio/topic/allow-building-the-agent-without-enabling-guest-pull
agent: Allow users to build without guest-pull
2025-04-06 12:17:27 +01:00
Fabiano Fidêncio
e3c98a5ac7 agent: Allow users to build without guest-pull
For those not interested in CoCo, let's at least allow them to easily
build the agent without the guest-pull feature.

This reduces the binary size (already stripped) from 25M to 18M.

Signed-off-by: Fabiano Fidêncio <fabiano@fidencio.org>
2025-04-04 22:58:43 +01:00
Ankita Pareek
7e450bc1c2 policy: Add missing input validations for ExecProcessRequest
This commit introduces missing validations for input fields in ExecProcessRequest to
harden the security policy.

The changes include:
- Update rules.rego to add null/empty field enforcements for String_user, SelinuxLabel and ApparmorProfile
- Add unit test cases for ExecProcessRequest for each of the validations

Signed-off-by: Ankita Pareek <ankitapareek@microsoft.com>
2025-04-03 12:53:59 +00:00
Hui Zhu
17af28acad docs: Add how-to-use-memory-agent.md to howto
Add how-to-use-memory-agent.md (How to use mem-agent to decrease the
memory usage of Kata container) to docs to show how to use mem-agent.

Fixes: #11013

Signed-off-by: Hui Zhu <teawater@gmail.com>
2025-04-02 17:45:59 +08:00
RuoqingHe
2f134514b0
Merge pull request #11097 from kimullaa/robust-user-input
kata-deploy: add INSTALLATION_PREFIX validation
2025-04-02 10:05:03 +08:00
Ruoqing He
96e43fbee5 ci: Enable build-kata-static-tarball-riscv64.yaml
Previously we introduced `build-kata-static-tarball-riscv64.yaml`,
enable that workflow in `ci.yaml`.

Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
2025-04-01 16:35:14 +08:00
RuoqingHe
10ceeb0930
Merge pull request #11104 from fidencio/topic/kata-deploy-create-runtimeclasses-by-default
kata-deploy: Create runtimeclasses by default
2025-04-01 10:55:44 +08:00
RuoqingHe
b19a8c7b1c
Merge pull request #11066 from kimullaa/update-command-sample
kernel: Update the usage in readme
2025-04-01 09:12:43 +08:00
RuoqingHe
b046f79d06
Merge pull request #11100 from kimullaa/remove-double-slash
kata-deploy: remove the double "/"
2025-04-01 08:17:00 +08:00
Shunsuke Kimura
a05f5f1827 kata-deploy: add INSTALLATION_PREFIX validation
INSTALLATION_PREFIX must begin with a "/"
because it is being concatenated with /host.

If there is no /, displays a message and makes an error.

Fixes: #11096

Signed-off-by: Shunsuke Kimura <pbrehpuum@gmail.com>
2025-04-01 06:47:30 +09:00
Shunsuke Kimura
a49b6f8634 kata-deploy: Moves the function to the top
Move functions that may be used in validation to the top.

Fixes: #11097

Signed-off-by: Shunsuke Kimura <pbrehpuum@gmail.com>
2025-04-01 06:47:30 +09:00
Zvonko Kaiser
d81a1747bd
Merge pull request #11085 from kevinzs2048/fix-virtiomem
runtime-go: qemu: Fix sandbox start failing with virtio-mem enable on arm64
2025-03-31 17:09:43 -04:00
Zvonko Kaiser
e5c4cfb8a1
Merge pull request #11081 from BbolroC/unsealed-secret-fix
tests: Enable sealed secrets for all TEEs
2025-03-31 11:19:52 -04:00
Shunsuke Kimura
c0af0b43e0 kernel: Update the outdated usage in the readme
Since it is difficult to update the README when modifying the options of ./build-kernel.sh,
instead of update the README, we encourage users to run the -h command.

Fixes: #11065

Signed-off-by: Shunsuke Kimura <pbrehpuum@gmail.com>
2025-03-31 23:29:58 +09:00
Shunsuke Kimura
902cb5f205 kata-deploy: remove the double "/"
Currently, ConfigPath in containerd.toml is a double "/" as follows.

```
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.kata-clh.options]
ConfigPath = "/opt/kata/share/defaults/kata-containers//configuration-clh.toml"
...
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.kata-cloud-hypervisor.options]
ConfigPath = "/opt/kata/share/defaults/kata-containers//runtime-rs/configuration-cloud-hypervisor.toml"
...
```

So, removed the double "/".

Fixes: #11099

Signed-off-by: Shunsuke Kimura <pbrehpuum@gmail.com>
2025-03-31 22:31:36 +09:00
Fabiano Fidêncio
28be53ac92 kata-deploy: Create runtimeclasses by default
Let's make the life of the users easier and create the runtimeclasses
for them by default.

Signed-off-by: Fabiano Fidêncio <fabiano@fidencio.org>
2025-03-31 11:29:44 +01:00
Xuewei Niu
abbc9c6b50
Merge pull request #11101 from RuoqingHe/runtime-rs-fix-fmt-check
runtime-rs: Remove redundant empty line
2025-03-31 16:28:55 +08:00
Ruoqing He
3c78c42ea5 runtime-rs: Remove redundant empty line
While running `cargo fmt -- --check` in `src/runtime-rs` directory, it
errors out and suggesting these is an redundant empty line, which
prevents `make check` of `runtime-rs` component from passing.

Remove redundant empty line to fix this.

Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
2025-03-31 00:39:04 +08:00
Steve Horsman
44bab5afc4
Merge pull request #11091 from fidencio/topic/ci-add-kata-deploy-tests-as-required
gatekeeper: Add kata-deploy tests as required
2025-03-28 11:05:03 +00:00
Fabiano Fidêncio
5a08d748b9
Merge pull request #11088 from kimullaa/fix-cleanup-failure
kata-deploy: Fix kata-cleanup's CrashLoopBackOff
2025-03-27 20:33:52 +01:00
Fabiano Fidêncio
700944c420 gatekeeper: Add kata-deploy tests as required
kata-deploy tests have been quite stable, working for more than 10 days
without any nightly failure (or any failure reported at all), and I'll
be the one maintaining those.

Signed-off-by: Fabiano Fidêncio <fabiano@fidencio.org>
2025-03-27 19:47:38 +01:00
Steve Horsman
97bd311a66
Merge pull request #11058 from stevenhorsman/required-static-checks-rename
ci: Update static-checks strings
2025-03-27 12:56:28 +00:00
Xuewei Niu
54dcf0d342
Merge pull request #11056 from RuoqingHe/runtime-qemu-riscv
runtime: Support and enable build on riscv64
2025-03-27 17:02:21 +08:00
Fabiano Fidêncio
047b7e1fb7
Merge pull request #11063 from lifupan/fix_compile
runtime-rs: update the protobuf to 3.7.1
2025-03-27 09:52:20 +01:00
Fabiano Fidêncio
41b536d487
Merge pull request #11059 from microsoft/danmihai1/tests-common
tests: k8s: clean-up shellcheck warnings in tests_common.sh
2025-03-27 09:51:49 +01:00
Shunsuke Kimura
9ab6ab9897 kata-deploy: Fix kata-cleanup's CrashLoopBackOff
Since kata-deploy.sh references an undefined variable,
kata-cleanup.yaml enters a CrashLoopBackOff state.

```
$ kubectl apply -f https://raw.githubusercontent.com/kata-containers/kata-containers/main/tools/packaging/kata-deploy/kata-cleanup/base/kata-cleanup.yaml
daemonset.apps/kubelet-kata-cleanup created

$ kubectl get pods -n kube-system
kubelet-kata-cleanup-zzbd2        0/1     CrashLoopBackOff   3 (33s ago)     80s

$ kubectl logs -n kube-system daemonsets/kubelet-kata-cleanup
/opt/kata-artifacts/scripts/kata-deploy.sh: line 19: SHIMS: unbound variable
```

Therefore, set an initial value for the environment variables.

Fixes: #11083

Signed-off-by: Shunsuke Kimura <pbrehpuum@gmail.com>
2025-03-27 15:00:19 +09:00
Hyounggyu Choi
0432d2fcdf
Merge pull request #11086 from BbolroC/fix-overwrite-containerd-config
tests: Make sure /etc/containerd before writing config
2025-03-27 05:57:31 +01:00
Ruoqing He
46caa986bb ci: Skip tests depend on virtualization on riscv64
`VMContainerCapable` requires a present `kvm` device, which is not yet
available in our RISC-V runners. Skipped related tests if it is running
on `riscv-builder`.

Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
2025-03-27 10:47:49 +08:00
Ruoqing He
7f0b1946c5 ci: Enable build-check for runtime on riscv64
`runtime` support for riscv64 is now ready, let enable building and
testing on that component.

Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
2025-03-27 10:38:30 +08:00
Yuting Nie
1f52f83309 runtime: Enable kata-check test on riscv64
Provide according tests to cover `kata-runtime` package, test
`kata-runtime`'s `check` functionality on riscv64 platforms.

Signed-off-by: Yuting Nie <nieyuting@iscas.ac.cn>
2025-03-27 10:36:55 +08:00