Commit Graph

12783 Commits

Author SHA1 Message Date
Alex Lyn
1ab9a21492
Merge pull request #8552 from deagon/fix/missing-port-type
runtime: missing port type in the DeviceInfo
2024-02-06 10:56:46 +08:00
Fabiano Fidêncio
ffa190831d
Merge pull request #9022 from fidencio/topic/add-guest-components-to-the-confidential-image-and-initrd
rootfs: confidential: Install coco-guest-components
2024-02-05 18:56:48 +01:00
Fabiano Fidêncio
27e7974048
rootfs: confidential: Install coco-guest-components
Let's install the coco-guest-components into the confidential rootfs
image and initrd.

Fixes: #9021

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2024-02-05 14:41:29 +01:00
Fabiano Fidêncio
f80dbcee0e
rootfs: Add logging about the coco guest components
This will make our lives easier to figure out whether the components are
being installed or not.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2024-02-05 14:41:29 +01:00
Fabiano Fidêncio
68b8186ec4
osbuilder: Expose COCOGUEST_COMPONENTS_TARBALL
We need to pass this to the container where the rootfs is built, so it
can actually be unpacked inside the rootfs.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2024-02-05 14:41:28 +01:00
Fabiano Fidêncio
64d09874c3
packaging: coco-guest-components: Pass DESTDIR to the build script
As DESTDIR was not being passed, we've been installing the final
binaries in a container path that was not exposed to the host, leading
to creating an empty tarball with the guest components.

Now, theoretically, guest-components should respect a PREFIX passed, but
that's not the case and we're manually adding "/usr/local/bin" to the
passed DESTDIR.

Here's the result of the tarball:
```bash
⋊> kata-containers ≡ tar tf build/kata-static-coco-guest-components.tar.xz
./
./usr/
./usr/local/
./usr/local/bin/
./usr/local/bin/confidential-data-hub
./usr/local/bin/attestation-agent
./usr/local/bin/api-server-rest
```

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2024-02-05 14:07:10 +01:00
Fabiano Fidêncio
1362918ff0
Merge pull request #9011 from fidencio/topic/switch-to-using-the-confidential-rootfs
runtime: Replace TEE specific initrd / image for the confidential one
2024-02-05 10:43:12 +01:00
Guoqiang Ding
6068faf40b runtime: failed to run in the case of ColdPlugVFIO
Add the missing port type in the DeviceInfo.

Fixes: #9014
Signed-off-by: Guoqiang Ding <dgq8211@gmail.com>
2024-02-05 17:30:11 +08:00
Fabiano Fidêncio
65013205ed
Merge pull request #9005 from ChengyuZhu6/clang
static-checks: Install clang in the ci environments
2024-02-05 09:24:51 +01:00
Alex Lyn
cf74166d75
Merge pull request #9015 from Apokleos/bugfix-exec-uds
runtime: display accurate error msg to avoid misleading users.
2024-02-05 13:50:43 +08:00
Alex Lyn
51a82bec3c
Merge pull request #9012 from deagon/fix/monitor-agent-url
kata-monitor: fix agentUrl from containerd shim
2024-02-05 10:41:56 +08:00
ChengyuZhu6
f354beb253 static-checks: Install clang in the ci environments
To test PR #8484, the compilation process for the kata-agent relies on clang.
There have been encountered failures on ARM, s390x, and ppc64le architectures:
ppc64le: https://github.com/kata-containers/kata-containers/actions/runs/7754082828/job/21146689026?pr=8484
s390x: https://github.com/kata-containers/kata-containers/actions/runs/7754082828/job/21146689401?pr=8484
arm: https://github.com/kata-containers/kata-containers/actions/runs/7754082828/job/21146689026?pr=8484

Fixes: #9004

Signed-off-by: ChengyuZhu6 <chengyu.zhu@intel.com>
2024-02-04 17:00:19 +08:00
Alex Lyn
c6830ceb89 runtime: display accurate error msg to avoid misleading users.
The original handling method does not reach user expectations.
When the ClientSocketAddress method stats the corresponding
path of runtime-rs and has not found it yet, we should return
an error message here that includes the reason for the failure
(which should be an error display indicating that both runtime-go
and runtime-rs were not found). Instead of simply displaying the
corresponding path of runtime-rs as the final error message to
users.
It is also necessary to return the error promptly to the caller
for further error handling.

Fixes: #8999

Signed-off-by: Alex Lyn <alex.lyn@antgroup.com>
2024-02-04 16:45:59 +08:00
Xuewei Niu
fa01a86334
Merge pull request #9007 from wainersm/aks_delete_rg
gha: delete azure RG only if it exists
2024-02-04 16:34:17 +08:00
Guoqiang Ding
7bf1ebe16d kata-monitor: fix agentUrl from containerd shim
Fix the missing leading slash.

Fixes: #9013
Signed-off-by: Guoqiang Ding <dgq8211@gmail.com>
2024-02-04 16:24:13 +08:00
Fabiano Fidêncio
d4a9856a84
gha: Remove SEV / SNP / TDX images / initrds
We can remove this now that we're relying on the confidential one.

Fixes: #9010

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2024-02-03 13:22:07 +01:00
Fabiano Fidêncio
e4258d8694
runtime: Use confidential image / initrd instead of TEE specific ones
Now that we have a confidential image / initrd being built, instead of a
specific one for each TEE, let's use it everywhere possible.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2024-02-03 13:20:14 +01:00
Fabiano Fidêncio
e0bb632053
Merge pull request #8983 from fidencio/topic/add-confidential-image
packaging: Add confidential image / initrd
2024-02-03 12:30:16 +01:00
Fabiano Fidêncio
a9f8888c15
packaging: Add confidential image / initrd
Let's use a single rootfs image / initrd for confidential workloads,
instead of having those split for different TEEs.

We can easily do this now as the soon-to-be-added guest-components can
be built in a generic way.

Fixes: #8982

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2024-02-03 00:58:52 +01:00
Fabiano Fidêncio
7ddb2e5999
Merge pull request #8978 from fidencio/topic/use-the-kernel-confidential-when-possible
runtime: packaging: Use confidential kernel instead of the TDX one
2024-02-03 00:29:43 +01:00
Fabiano Fidêncio
e9de0ef6b3
packaging: rootfs: Depend on kernel-confidential tarball
Now that we're using the kernel-confidential, let the rootfs depending
on it, instead of depending on the TEE specific ones.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2024-02-02 21:13:41 +01:00
Fabiano Fidêncio
b58cfc765c
packaging: Ensure rootfs is rebuilt in case kernel changes
We need to do this in order to ensure that the measure boot will be
taking the latest kernel bits, as needed.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2024-02-02 21:13:06 +01:00
Fabiano Fidêncio
4394dacb88
packaging: Build the confidential kernel with MEASURED_ROOTFS support
This is already done for the TDX kernel, and should have been done also
for the confidential one.

This action requires us to bump the kernel version as the resulting
kernel will be different from the cached one.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2024-02-02 21:13:06 +01:00
Fabiano Fidêncio
c7680839f9
packaging: Fix modules tarball for nvidia-gpu-confidential
The modules dir has an extra "-nvidia-gpu-confidential" string in its
name.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2024-02-02 21:13:06 +01:00
Fabiano Fidêncio
dc027e39d6
gha: Remove TEE specific kernel build targets
We're using the confidential kernel instead from now on.

Fixes: #8981 -- part I

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2024-02-02 21:12:41 +01:00
Fabiano Fidêncio
3755c69165
runtime: makefile: remove SNP specific kernel references
As this is not used anymore, we can go ahead and just remove it

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2024-02-02 21:12:21 +01:00
Fabiano Fidêncio
57b132f94c
runtime: makefile: remove SEV specific kernel references
As this is not used anymore, we can go ahead and just remove it

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2024-02-02 21:12:21 +01:00
Fabiano Fidêncio
2562d23242
runtime: makefile: remove TDX specific kernel references
As this is not used anymore, we can go ahead and just remove it.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2024-02-02 21:11:43 +01:00
Fabiano Fidêncio
f4e3c936d8
runtime: snp: config: Use the confidential kernel
As we're building a single confidential kernel, we should rely on it
rather than keep using the specific ones for TDX / SEV / SNP.

However, for debugability-sake, let's do this change TEE by TEE.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2024-02-02 21:11:36 +01:00
Fabiano Fidêncio
8731366d7b
runtime: sev: config: Use the confidential kernel
As we're building a single confidential kernel, we should rely on it
rather than keep using the specific ones for TDX / SEV / SNP.

However, for debugability-sake, let's do this change TEE by TEE.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2024-02-02 21:11:36 +01:00
Wainer dos Santos Moschetta
a04b215bcc gha: delete azure RG only if it exists
delete_cluster() has tried to delete the az resources group regardless
if it exists. In some cases the result of that operation is ignored,
i.e., fail to resource group not found, but the log messages get a
little dirty. Let's delete the RG only if it exists then.

Fixes #8989
Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
2024-02-02 16:57:20 -03:00
Fabiano Fidêncio
6cbdba7268
runtime: tdx: config: Use the confidential kernel
As we're building a single confidential kernel, we should rely on it
rather than keep using the specific ones for TDX / SEV / SNP.

However, for debugability-sake, let's do this change TEE by TEE.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2024-02-02 17:13:06 +01:00
Fabiano Fidêncio
a618461d3a
runtime: Add confidential kernel to the makefile
With this we can properly generate and the the `-confidential` kernel,
which supports SEV / SNP / TDX as part of our configuration files.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2024-02-02 17:13:05 +01:00
GabyCT
40d9a65601
Merge pull request #8996 from GabyCT/topic/addclhr
gha: k8s: Add cloud-hypervisor (runtime-rs) support
2024-02-02 09:48:35 -06:00
Fabiano Fidêncio
741ed1c8bd
Merge pull request #9001 from fidencio/topic/fix-cache-for-confidential-kernel-part-III
packaging: Don't build the confidential / sev kernel twice -- part III
2024-02-02 15:19:41 +01:00
Wainer Moschetta
424fbfe58f
Merge pull request #8654 from ldoktor/openshift-tests
ci/openshift-ci: Move openshift-ci from the tests repo here
2024-02-02 10:40:30 -03:00
Fabiano Fidêncio
2ff3f0afc6
packaging: Remove trailing whitespace from extra_tarballs arg
This was overlooked during the reviews.

Fixes: #6415 -- part III

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2024-02-02 12:42:02 +01:00
Fabiano Fidêncio
228bc48c73
packaging: Fix kernel confidential name
It should be "kernel-confidential" instead of "kernel".

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2024-02-02 12:42:02 +01:00
Fabiano Fidêncio
31b21093b0
packaging: Pass the kernel flavour to get_kernel_modules_dir
I made this a required argument during the series and ended up
forgetting to add that while calling the function.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2024-02-02 12:42:02 +01:00
Fabiano Fidêncio
51b1df2333
packaging: Fix typo to get the extra_tarballs path
It should've been  "${m#*:}" instead of "${m#&:}".

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2024-02-02 12:41:54 +01:00
Fabiano Fidêncio
53e8461db2
Merge pull request #9000 from fidencio/topic/fix-pushing-artefacts-to-registry
packaging: Fix pushing artefacts to the registry
2024-02-02 10:21:40 +01:00
Fabiano Fidêncio
0b221b5618
packaging: Fix pushing artefacts to the registry
This issues was introduced due to a typo not caught during reviews on
e5bca90274.

Fixes: #6415 -- part II

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2024-02-02 10:13:11 +01:00
Wenyuan Liu
cb888516c1
Merge pull request #8760 from fadecoder/reduce_go_runtime_mounts
runtime: Reduce the mount points with namespace isolation
2024-02-02 16:54:44 +08:00
Greg Kurz
d1a26ead94
Merge pull request #8454 from BbolroC/compile-with-qemu-s390x
runtime-rs: make compilation for QEMU on s390x
2024-02-02 09:29:32 +01:00
Fabiano Fidêncio
0520b272a3
Merge pull request #8987 from fidencio/topic/fix-cache-for-confidential-kernel
packaging: cache: Fix caching kernels which rely on extra modules
2024-02-02 09:10:52 +01:00
Amulya Meka
e4252a3fe2
Merge pull request #8957 from Amulyam24/add-k8s-test-ppc64le
gha: add kubernetes tests workflow for ppc64le
2024-02-02 10:22:00 +05:30
Fabiano Fidêncio
b2f1235e3c
Merge pull request #8994 from sprt/sprt/switch-aks-eastus
ci: aks: switch from eastus2 to eastus region
2024-02-02 00:09:40 +01:00
Hyounggyu Choi
bb6f5073aa runtime-rs: Allow compilation for s390x
Until now, runtime-rs couldn't be compiled on s390x.
We need to lift those restrictions in Makefile first.

Fixes: #8446

Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
2024-02-01 23:48:15 +01:00
Dan Mihai
6f1062b5d6
Merge pull request #8966 from microsoft/danmihai1/k8s-sandbox-vcpus-allocation
genpolicy: ignore empty YAML as input
2024-02-01 13:51:02 -08:00
Dan Mihai
8f9c92c0ee
Merge pull request #8977 from microsoft/danmihai1/default-namespace
genpolicy: support non-default namespace name
2024-02-01 13:50:33 -08:00