- runtime: Register defer function at early stage - Ensure the go vendored code is up-to-date and that we actually can call `cargo vendor` on every pull-request - ci: add golang 1.16 to the CI - Update outdated comments and do some minor reworks - snap: Build initrd on ppc64le & s390x - ci: static checks: use defined target_branch - trace-forwarder: Add option rustflags, target, build-type for the make - CI: Honour force-skip-ci label - qemu: stop the virtiofsd specifically - tracing: Consolidate tracing into a new katatrace package - runtime: return error if clh's binary doesn't have a normal stat - osbuilder: Fix the order of checking the distro config directory - agent: Fix to parsing of /proc/self/mountinfo - runtime: Fix lint issues - snap: Miscellaneous s390x fixes - runtime: Use CC=gcc on all RPM-based s390x - s390x: Enable virtio-blk-ccw - forwarder: Add dump only option - shimv2: fix the issue of leaking the hypervisor processes - runtime: Remove the version check for cloud hypervisor - agent: fix wrong regular exp to fetch guest-cid - runtime: refact virtcontainers/pkg/oci - agent: enhance tests of execute_hook - agent: Cleanup config - Pass span context from runtime to agent to get a full trace #1968 - agent: update netlink libraries - shimv2: update containerd vendor - runtime: Format golang proto code - agent: delete some lint attributes - docs: Fix url in virtiofs documentation - tools: agent-ctl: Fix build failure - cargo: Use latest nix crate for all Rust code bases - virtcontainers: Don't fail memory hotplug - Add "watchable-mounts" concept to allow for inotify support of specific types of mounts. - tracing: Make runHooks() span creation return context - kernel: Add Secure Execution guest - packaging: Support Podman in QEMU build - Update qat version - docs: Set LIBC=gnu for s390x too - shimv2: fix the issue of leaking wait goroutines - runtime: report finish time in containers stats - docs: Fix typos in Developer Guide - docs: Update urls for Documentation Requirements document - runtime: update default machine type to q35 - docs: fix brackets usage error for developer guide - Remove the pc machine - runtime: do not hot-remove PMEM devices - docs: Update kata-deploy urls for installation document - docs: Update url for installation guides - agent: Add some mount options and sort the options alphabetically - runtime: using detail propertites instead of function name in log field - qemu: Add nvdimm read-only file support - ci: snap: Fetch history to all branches and tags - memory_offset must be larger than 32 bit - containerd-shim-v2: Skip TestIoCopy unit test - ppc64le: Adding test for appendProtectionDevice - agent: Update rust version for tokio - Upgrade mio to v0.7.13 to fix epoll_fd leak problem - osbuilder: fix log message that is not error but seems like an error - docs: Update url for breaking compatibility - docs: Remove docker support with kata 2.x and sysctls - docs: Update README for runtime documentation - Support SEV - test: Add a unit test for ioCopy() - versions: Upgrade to cloud-hypervisor v16.0e3860691static-checks: Restrict static checks to go 1.15 and 1.16f4fbf723runtime: Update vendored codea20074d4static-checks: Check the vendored codeac8f972ebuild: Add `make vendor`f9643d83agent-ctl: Add `make vendor`5e69b498trace-forwarder: Add `make vendor`a104f132agent: Add `make vendor`579b3f34runtime: Add `make vendor`930ca55druntime: Add `make handle_vendor`39546a10runtime: delete not used functionsd0bc148fruntime: Register defer function at early stage350acb2dvirtcontainers: refactoring code for error handling in sandbox858f39efvirtcontainers: update wrong comments for codee0a19f6avirtcontainers: update API documentation8d6dd2adsnap: support golang 1.16.xa48dc93fversions: update newest golang version37996791ci: add 1.16 to the list of golang versions to test6999dccatrace-forwarder: Add option rustflags, target, build-type for the make7db8a85aCI: Honour force-skip-ci label007a6561snap: Build initrd on ppc64le & s390x9b8cc458ci: static checks: use defined target_branch9081bee2runtime: return error if clh's binary has not a normal statb10e3e22tracing: Consolidate tracing into a new katatrace package88e70759osbuilder: Fix the order of checking the distro config directory1ab72518agent: Fix to parsing of /proc/self/mountinfo8f76626fqemu: stop the virtiofsd specificallyda3de3c2shim-v2: Fix `gosimple` issue on utils_test.go305fb054virtcontainers: Fix `gosimple` issue on client.go89cf168cvirtcontainers: Ignore a staticcheck error on cpuset.go2cc9006csnap: Miscellaneous s390x fixes28b2c629runtime: Use CC=gcc on SUSE s390x toocfd690b6virtcontainers: Use virtio-blk-ccw on s390x8758ce26agent: Enable virtio-blk-ccwa33d6baeforwarder: Add dump only option4c809a53shimv2: fix the issue of leaking the hypervisor processesd08603beruntime: Remove the version check for cloud hypervisor2c943012agent: fix wrong regular exp to fetch guest-cide6b1766fagent: Cleanup config55c5c871agent: enhance tests of execute_hookbd595124runtime: add spans and attributes for agent/mount65d2fb5dagent: remove instrument attribute for some simple functionscfb8139fagent: add more instruments for RPC callsae46e7bfruntime: pass span context to agent in ttRPC client66dd8719runtime: refact virtcontainers/pkg/ocid671f789agent: fix the issue of convert OCI spec to RPC specf607641ashimv2: fix the issue bring by updating containerd vendor79e632bcversion: update the cri-containerd to v1.5.232c9ae13shimv2: update containerd vendoraa264f91agent: update netlink libraries34bdddbedocs: Fix url in virtiofs documentation3e8a07c4tools: agent-ctl: Fix build failuref6294226cargo: Use latest nix crate for all Rust code bases064dfb16runtime: Add "watchable-mounts" concept for inotify support3f0f1cebdocs: inotify: add initial documentation6a93e5d5agent: Initial watchable-bind implementation57c0cee0runtime: Cleanup mountSharedDirMounts, shareFile parameters772c117dkernel: Add Secure Execution guestf35ba94dpackaging: Support Podman in QEMU build8310a3d7virtcontainers: Don't fail memory hotplugecd13ec4docs: Update QAT docs with newer driver versiona822cdf6osbuilder: Update QAT driver version6a1a051cruntime: report finish time in containers statsfe0085cadocs: Set LIBC=gnu for s390x too08984b6edocs: Update urls for Documentation Requirements documentb3623a2cshimv2: fix the issue of leaking wait goroutines2322f935runtime: update default machine type to q3511f9a914docs: fix brackets usage error for developer guide1316fa53docs: Fix typos in Developer Guideac6b9c53runtime: Hot-plug virtio-mem device on PCI bridge789a5954virtcontainers: Remove the pc machinecaf5760cruntime: Update golang proto codebd20701fdocs: Update kata-deploy urls for installation documenta9aa36cedocs: Update url for installation guidesecdd137cruntime: do not hot-remove PMEM devices000049b6agent: delete some lint attributes3f39df0dqemu: Add nvdimm read-only file support23d31d5aci: snap: Fetch history to all branches and tags2022c64fruntime: using detail propertites instead of function name in log field361bee91runtime/virtcontrainers: fix alignment structures6be8bf5cdocs: update annotations documentation7834f412virtcontainers: change memory_offset to uint64bd27f7baagent: Sort PROPAGATION and OPTIONS alphabetically to scan easilyad06eb90containerd-shim-v2: Skip TestIoCopy unit testea9bb8e9ppc64le: Adding test for appendProtectionDevice799cb272agent: Upgrade mio to v0.7.13 to fix epoll_fd leak problem45fd58d1osbuilder: fix log message that is not error but seems like an error2fb176dddocs: Update url for breaking compatibility601e2b65docs: Remove docker support with kata 2.x and sysctlsbe316945virtcontainers: Fix TestQemuAmd64AppendProtectionDevice()240aae96docs: Update README for runtime documentation8825bb29agent: Update rust version for tokiocabddcc7tracing: Make runHooks() span creation return contexte544779cagent: Add some mount options85c40001versions: Upgrade to cloud-hypervisor v16.0b26d5b1dvirtcontainers: Support SEV81c6e4caruntime/vendor: add github.com/intel-go/cpuida918c46ftest: Add a unit test for ioCopy() Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
kata-deploy
kata-deploy provides a Dockerfile, which contains all of the binaries
and artifacts required to run Kata Containers, as well as reference DaemonSets, which can
be utilized to install Kata Containers on a running Kubernetes cluster.
Note, installation through DaemonSets successfully installs katacontainers.io/kata-runtime on
a node only if it uses either containerd or CRI-O CRI-shims.
Kubernetes quick start
Install Kata on a running Kubernetes cluster
$ cd $GOPATH/src/github.com/kata-containers/kata-containers/tools/packaging/kata-deploy
$ kubectl apply -f kata-rbac/base/kata-rbac.yaml
$ kubectl apply -f kata-deploy/base/kata-deploy.yaml
or on a k3s cluster:
$ cd $GOPATH/src/github.com/kata-containers/kata-containers/tools/packaging/kata-deploy
$ kubectl apply -k kata-deploy/overlays/k3s
Run a sample workload
Workloads specify the runtime they'd like to utilize by setting the appropriate runtimeClass object within
the Pod specification. The runtimeClass examples provided define a node selector to match node label katacontainers.io/kata-runtime:"true",
which will ensure the workload is only scheduled on a node that has Kata Containers installed
runtimeClass is a built-in type in Kubernetes. To apply each Kata Containers runtimeClass:
$ cd $GOPATH/src/github.com/kata-containers/kata-containers/tools/packaging/kata-deploy/runtimeclasses
$ kubectl apply -f kata-runtimeClasses.yaml
The following YAML snippet shows how to specify a workload should use Kata with Cloud Hypervisor:
spec:
template:
spec:
runtimeClassName: kata-clh
The following YAML snippet shows how to specify a workload should use Kata with Firecracker:
spec:
template:
spec:
runtimeClassName: kata-fc
The following YAML snippet shows how to specify a workload should use Kata with QEMU:
spec:
template:
spec:
runtimeClassName: kata-qemu
To run an example with kata-qemu:
$ cd $GOPATH/src/github.com/kata-containers/kata-containers/tools/packaging/kata-deploy/examples
$ kubectl apply -f test-deploy-kata-qemu.yaml
To run an example with kata-fc:
$ cd $GOPATH/src/github.com/kata-containers/kata-containers/tools/packaging/kata-deploy/examples
$ kubectl apply -f test-deploy-kata-fc.yaml
The following removes the test pods:
$ cd $GOPATH/src/github.com/kata-containers/kata-containers/tools/packaging/kata-deploy/examples
$ kubectl delete -f test-deploy-kata-qemu.yaml
$ kubectl delete -f test-deploy-kata-fc.yaml
Remove Kata from the Kubernetes cluster
$ cd $GOPATH/src/github.com/kata-containers/kata-containers/tools/packaging/kata-deploy
$ kubectl delete -f kata-deploy/base/kata-deploy.yaml
$ kubectl apply -f kata-cleanup/base/kata-cleanup.yaml
$ kubectl delete -f kata-cleanup/base/kata-cleanup.yaml
$ kubectl delete -f kata-rbac/base/kata-rbac.yaml
$ kubectl delete -f runtimeclasses/kata-runtimeClasses.yaml
kata-deploy details
Dockerfile
The Dockerfile used to create the container image deployed in the DaemonSet is provided here. This image contains all the necessary artifacts for running Kata Containers, all of which are pulled from the Kata Containers release page.
Host artifacts:
cloud-hypervisor,firecracker,qemu-system-x86_64, and supporting binariescontainerd-shim-kata-v2kata-collect-data.shkata-runtime
Virtual Machine artifacts:
kata-containers.imgandkata-containers-initrd.img: pulled from Kata GitHub releases pagevmlinuz.containerandvmlinuz-virtiofs.container: pulled from Kata GitHub releases page
DaemonSets and RBAC
Two DaemonSets are introduced for kata-deploy, as well as an RBAC to facilitate
applying labels to the nodes.
Kata deploy
This DaemonSet installs the necessary Kata binaries, configuration files, and virtual machine artifacts on
the node. Once installed, the DaemonSet adds a node label katacontainers.io/kata-runtime=true and reconfigures
either CRI-O or containerd to register three runtimeClasses: kata-clh (for Cloud Hypervisor isolation), kata-qemu (for QEMU isolation),
and kata-fc (for Firecracker isolation). As a final step the DaemonSet restarts either CRI-O or containerd. Upon deletion,
the DaemonSet removes the Kata binaries and VM artifacts and updates the node label to katacontainers.io/kata-runtime=cleanup.
Kata cleanup
This DaemonSet runs of the node has the label katacontainers.io/kata-runtime=cleanup. These DaemonSets removes
the katacontainers.io/kata-runtime label as well as restarts either CRI-O or containerd systemctl
daemon. You cannot execute these resets during the preStopHook of the Kata installer DaemonSet,
which necessitated this final cleanup DaemonSet.