Commit Graph

13566 Commits

Author SHA1 Message Date
Amulyam24
8255ed248a gha: tag k8s tests on ppc64le to ppc64le-runner-01
This PR aims at running the k8s tests to one runner on ppc64le.

Fixes: #9520

Signed-off-by: Amulyam24 <amulmek1@in.ibm.com>
2024-04-19 12:04:25 +05:30
Hyounggyu Choi
304dc1e4da doc: Update how-to-run-kata-containers-with-SE-VMs.md
This is to update a document `how-to-run-kata-containers-with-SE-VMs`
on using confidential artifacts to build a secure image.

Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
2024-04-19 08:31:12 +02:00
Hyounggyu Choi
8fbed9f6a4 local-build: Use confidential kernel and initrd for boot-image-se
This is to make `boot-image-se-tarball` use confidential kernel and
initrd instead of vanilla version of artifacts.

Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
2024-04-19 07:09:04 +02:00
Dan Mihai
4242801b1c agent: update cargo.lock
Update Kata Agent's Cargo.lock after the recent changes to Cargo.toml.

Signed-off-by: Dan Mihai <dmihai@microsoft.com>
2024-04-18 17:12:48 +00:00
Aurélien Bombo
95971e4a42 release: bump version for 3.4.0 release
Release v3.4.0.

Signed-off-by: Aurélien Bombo <abombo@microsoft.com>
2024-04-18 17:08:06 +00:00
Steve Horsman
6dd038fd58
Merge pull request #9501 from zvonkok/check-fixes
kata: Remove check for "Fixes" in PR
2024-04-18 17:48:50 +01:00
Hyounggyu Choi
2b9c439fcf
Merge pull request #9508 from BbolroC/gha-s390x-k8s-label
gha: Make integration tests for s390x run on s390x-large runners
2024-04-18 18:05:01 +02:00
Adil Sadik
1c5ca0c915 runtime: update golang.org/x/net
updates golang.org/x/net to newer version that closes some reported
vulnerabilities and security issues

Fixes #9486

Signed-off-by: Adil Sadik <sparky.005@gmail.com>
2024-04-18 10:55:02 -04:00
Tim Zhang
221c5b51fe dragonball: fix EPOLLHUP/EPOLLERR events handling in vsock
1. EPOLLHUP events also need to be read and will be got len 0.
2. We should kill the connection when EPOLLERR events are received.

Signed-off-by: Tim Zhang <tim@hyper.sh>
Signed-off-by: Fupan Li <fupan.lfp@antgroup.com>
2024-04-18 20:47:02 +08:00
Hyounggyu Choi
49a0d57f66 gha: Make integration tests for s390x run on s390x-large runners
This is to make a workflow `run-k8s-tests` and `run-cri-containerd`
(s390x and zvsi) run only on the runners labeled by `s390x-large`.

Fixes: #9507

Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
2024-04-18 14:35:24 +02:00
stevenhorsman
cf5c3dc155 gha: stale: Bump stalebot version
- Bump the stalebot action version to v9 as that fixes the
```
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/stale@v8.
```
warning.

Fixes: #9512
Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2024-04-18 11:41:09 +01:00
Steve Horsman
bf16b18180
Merge pull request #9503 from stevenhorsman/stale-pr-remove-date
gha: stale: Remove the start-date
2024-04-18 09:36:27 +01:00
Hyounggyu Choi
566a6de594
Merge pull request #9505 from BbolroC/remove-crio-nightly-test-s390x
gha: Remove k8s-cri-containerd-rhel9-e2e-tests for s390x
2024-04-18 09:31:07 +02:00
Hyounggyu Choi
cc22dc33f2
Merge pull request #9489 from BbolroC/install-opa-in-docker
rootfs: Make OPA build working in docker for s390x and pp…
2024-04-18 00:26:11 +02:00
Dan Mihai
5ceed689eb
Merge pull request #9492 from microsoft/danmihai1/pod-tests
tests: k8s: inject agent policy failures (part 3)
2024-04-17 14:01:11 -07:00
Hyounggyu Choi
e046f5e652 gha: Remove k8s-cri-containerd-rhel9-e2e-tests for s390x
This commit is simply to remove a CI workflow `k8s-cri-containerd-rhel9-e2e-tests`.

Fixes: #9504

Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
2024-04-17 15:36:42 +02:00
Zvonko Kaiser
eda3bfe2ef config: Add NVIDIA GPU SNP, TDX configuration files
Fixes: #9475

For TDX and SNP add NVIDIA specific configuration files

Signed-off-by: Zvonko Kaiser <zkaiser@nvidia.com>
2024-04-17 12:49:13 +00:00
Wainer Moschetta
2d8e7933c5
Merge pull request #9461 from GabyCT/topic/uninstallkbs
tests/k8s: Add uninstall kbs client command function
2024-04-17 09:36:37 -03:00
Zvonko Kaiser
d7b24c04e5
Merge pull request #9473 from zvonkok/gpu-image-initrd-versions
version: add initrd, image NVIDIA sections
2024-04-17 13:22:05 +02:00
stevenhorsman
7235988605 gha: stale: Remove the start-date
As documented in https://github.com/actions/stale?tab=readme-ov-file#start-date
> The start date is used to ignore the issues and pull requests created before the start date.
> Particularly useful when you wish to add this stale workflow on an existing repository
> and only wish to stale the new issues and pull requests.

As we don't want need to treat PRs older than May 2023 as a special case, then remove this option.

Fixes: #9502
Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2024-04-17 11:19:56 +01:00
Zvonko Kaiser
395e93acd5 kata: Remove Issue - PR dependency
We've discussed this over and over. Let's try to get to an agreement here.
I will use this issue to remove the mandatory Issue - PR dependency.

Fixes: #9500

Signed-off-by: Zvonko Kaiser <zkaiser@nvidia.com>
2024-04-17 09:53:08 +00:00
Archana Shinde
af3b19ed18
Merge pull request #9084 from amshinde/document-intel-gpu-vfio
docs: Document Intel Discrete GPUs usage with Kata
2024-04-16 16:17:03 -07:00
Archana Shinde
973a15332a spell-check: Add missing words to spell-check
Add missing words to spell-check dictionaries

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2024-04-16 11:50:02 -07:00
Archana Shinde
6f97dc1f60 static-checks: Rename file in doc to make static checks happy
Configuration file for qemu with runtime-rs was recently renamed.
Doc contains name for old file. This was somehow not caught in the CI
earlier.

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2024-04-16 11:50:02 -07:00
Archana Shinde
87f0097b18 docs: Document Intel Discrete GPUs usage with Kata
Document describes the steps needed to pass an entire Intel Discrete GPU
as well a GPU SR-IOV interface to a Kata Container.

Fixes: #9083

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2024-04-16 11:50:02 -07:00
Dan Mihai
2c4d1ef76b tests: k8s: inject agent policy failures (part 3)
Auto-generate the policy and then simulate attacks from the K8s
control plane by modifying the test yaml files. The policy then
detects and blocks those changes.

These test cases are using K8s Pods. Additional policy failures
are injected during CI using other types of K8s resources - e.g.,
using Jobs and Replication Controllers - from separate PRs.

Fixes: #9491

Signed-off-by: Dan Mihai <dmihai@microsoft.com>
2024-04-16 18:15:12 +00:00
Dan Mihai
c26dad8fe5
Merge pull request #9294 from burgerdev/burgerdev/genpolicy-configurable-pause
genpolicy: support insecure registries and custom pause containers
2024-04-16 09:39:33 -07:00
GabyCT
9238daf729
Merge pull request #9464 from microsoft/danmihai1/rc-tests
tests: k8s: inject agent policy failures (part2)
2024-04-16 10:01:39 -06:00
Hyounggyu Choi
d523e865c0 rootfs: Make OPA build working in docker for s390x and ppc64le
The commit is to make the OPA build from source working in `ubuntu-rootfs-osbuilder`.
To achieve the goal, the configuration is changed as follows:

- Switch the make target to `ci-build-linux-static` not triggering docker-in-docker build
- Install go in the builder image for s390x and ppc64le

Fixes: #9466

Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
2024-04-16 16:49:12 +02:00
Greg Kurz
aca6a1bcb5
Merge pull request #9353 from pmores/pr-8866-follow-up
runtime-rs: refactor qemu driver
2024-04-16 16:07:36 +02:00
Fabiano Fidêncio
7bb5490676
Merge pull request #9479 from wainersm/fix_coco_nontee_jobs
gha: make run-kata-coco-tests inherit secrets
2024-04-16 13:46:52 +02:00
Hyounggyu Choi
7b11fd2546
Merge pull request #9471 from BbolroC/coco-kernel-version-s390x
version: Add coco name and version for {image,initrd} for s390x
2024-04-15 16:03:20 +02:00
Wainer dos Santos Moschetta
77541008fc gha: make run-kata-coco-tests inherit secrets
The new CoCo non-tee job introduced on commit 0d5399ba92 need to read secrets
like AZ_TENANT_ID, so run-kata-coco-tests workflow should inherit the secrets from
the caller workflow.

Fixes #9477
Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
2024-04-15 10:53:44 -03:00
Zvonko Kaiser
78e3ebb011 version: add initrd, image NVIDIA sections
Fixes: #9472

For initrd and image, the related NVIDIA will not use the default targets and we will pin them to a specific release.

Signed-off-by: Zvonko Kaiser <zkaiser@nvidia.com>
2024-04-15 13:31:35 +00:00
Wainer Moschetta
c85e1ca674
Merge pull request #9404 from ldoktor/ci-mcp-timeout
ci.ocp: Increase the MCP update time
2024-04-15 09:42:14 -03:00
Hyounggyu Choi
3ec209dcf1
Merge pull request #9469 from BbolroC/coco-kernel-config-s390x
kernel: Adjust s390x config for confidential containers
2024-04-15 13:55:28 +02:00
Hyounggyu Choi
8fce600493 version: Add coco name and version for {image,initrd} for s390x
In order to build a coco {image,initrd}, it is required to
specify its name and version in versions.yaml. This commit
is to add the configuration for them, respectively.

Fixes: #9470

Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
2024-04-15 12:53:00 +02:00
Hyounggyu Choi
a792dc3e2b kernel: Adjust s390x config for confidential containers
`CONFIG_TN3270_TTY` and `CONFIG_S390_AP_IOMMU` are dropped for s390x
in 6.7.x which is used for a confidential kernel.
But they are still used for a vanilla kernel. So we need to add them
to the whitelist.

Fixes: #9465

Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
2024-04-15 10:28:59 +02:00
Hyounggyu Choi
32f58abfde
Merge pull request #9403 from BbolroC/runtime-rs-ci-qemu
CI: Enable GHA cri-containerd workflow for runtime-rs with QEMU
2024-04-15 09:31:25 +02:00
Xuewei Niu
402d8a968e
Merge pull request #9430 from UiPath/fix-agent-shutdown
agent: shutdown vm on exit when agent is used as init process
2024-04-15 10:47:07 +08:00
Wainer Moschetta
0a04f54a8e
Merge pull request #9454 from GabyCT/topic/pulltype
gha: Define unbound PULL TYPE variable
2024-04-12 14:48:56 -03:00
Wainer Moschetta
a0b21d0e14
Merge pull request #9424 from wainersm/cc_guest_pull-encrypted
CC: run guest-pull tests on non-TEE jobs
2024-04-12 09:34:35 -03:00
Hyounggyu Choi
cf20a6a4ae gha: Add qemu-runtime-rs to VMM matrix for run-cri-containerd
This commit expands the VMM matrix for run-cri-containerd,
adding a new item `qemu-runtime-rs` for a test scenario where
the VMM is QEMU and runtime-rs is employed.
This expansion affects the workflows for both x86_64 and s390x platforms.

Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
2024-04-12 12:25:53 +02:00
Hyounggyu Choi
606f8e1ab2 runtime-rs: Adjust configuration for qemu-runtime-rs
To make `qemu-runtime-rs` working for CI, we have to rename a configuration
template file and `CONFIG_FILE_QEMU` in Makefile.

Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
2024-04-12 12:25:53 +02:00
Hyounggyu Choi
3c217c6c15 ci|cri-containerd: Introduce qemu-runtime-rs for KATA_HYPERVISOR
`qemu-runtime-rs` will be utilized to handle a test scenario where
the VMM is QEMU and runtime-rs is employed.

Note: Some of the tests are skipped. They are going to be reintegrated in
the follow-up PR (Check out #9375).

Fixes: #9371

Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
2024-04-12 12:25:53 +02:00
Alexandru Matei
9e01732f7a agent: shutdown vm on exit when agent is used as init process
Linux kernel generates a panic when the init process exits.
The kernel is booted with panic=1, hence this leads to a
vm reboot.
When used as a service the kata-agent service has an ExecStop
option which does a full sync and shuts down the vm.
This patch mimicks this behavior when kata-agent is used as
the init process.

Fixes: #9429

Signed-off-by: Alexandru Matei <alexandru.matei@uipath.com>
2024-04-12 11:32:31 +03:00
Alexandru Matei
54923164b5 clh: isClhRunning waits for full timeout when clh exits
isClhRunning uses signal 0 to test whether the process is
still alive or not. This doesn't work because the process is a
direct child of the shim. Once it is dead the process becomes
zombie.
Since no one waits for it the process lingers until
its parent dies and init reaps it. Hence sending signal 0 in
isClhRunning will always return success whether the process is
dead or not.
This patch calls wait to reap the process, if it succeeds that
means it is our child process, if not we send the signal.

Fixes: #9431

Signed-off-by: Alexandru Matei <alexandru.matei@uipath.com>
2024-04-12 11:31:53 +03:00
Dan Mihai
e51cbdcff9 tests: k8s: inject agent policy failures (part2)
Auto-generate the policy and then simulate attacks from the K8s
control plane by modifying the test yaml files. The policy then
detects and blocks those changes.

These test cases are using K8s Replication Controllers. Additional
policy failures will be injected using other types of K8s resources
- e.g., using Pods and/or Jobs - in separate PRs.

Fixes: #9463

Signed-off-by: Dan Mihai <dmihai@microsoft.com>
2024-04-11 21:08:53 +00:00
Markus Rudy
77540503f9 genpolicy: add support for insecure registries
genpolicy is a handy tool to use in CI systems, to prepare workloads
before applying them to the Kubernetes API server. However, many modern
build systems like Bazel or Nix restrict network access, and rightfully
so, so any registry interaction must take place on localhost.
Configuring certificates for localhost is tricky at best, and since
there are no privacy concerns for localhost traffic, genpolicy should
allow to contact some registries insecurely. As this is a runtime
environment detail, not a target environment detail, configuring
insecure registries does not belong into the JSON settings, so it's
implemented as command line flags.

Fixes: #9008

Signed-off-by: Markus Rudy <webmaster@burgerdev.de>
2024-04-11 22:29:03 +02:00
Wainer dos Santos Moschetta
4f74617897 tests: pass --overwrite-existing to aks get-credentials
By passing --overwrite-existing to `aks get-credentials` it will stop
asking if I want to overwrite the existing credentials. This is handy
for running the scripts locally.

Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
2024-04-11 15:31:40 -03:00