Go to file
Eric Ernst 8cde54131a runtime: introduce static sandbox resource management
There are software and hardware architectures which do not support
dynamically adjusting the CPU and memory resources associated with a
sandbox. For these, today, they rely on "default CPU" and "default
memory" configuration options for the runtime, either set by annotation
or by the configuration toml on disk.

In the case of a single container (launched by ctr, or something like
"docker run"), we could allow for sizing the VM correctly, since all of
the information is already available to us at creation time.

In the sandbox / pod container case, it is possible for the upper layer
container runtime (ie, containerd or crio) could send a specific
annotation indicating the total workload resource requirements
associated with the sandbox creation request.

In the case of sizing information not being provided, we will follow
same behavior as today: start the VM with (just) the default CPU/memory.

If this information is provided, we'll track this as Workload specific
resources, and track default sizing information as Base resources. We
will update the hypervisor configuration to utilize Base+Workload
resources, thus starting the VM with the appropriate amount of CPU and
memory.

In this scenario (we start the VM with the "right" amount of
CPU/Memory), we do not want to update the VM resources when containers
are added, or adjusted in size.

This functionality is introduced behind a configuration flag,
`static_sandbox_resource_mgmt`. This is defaulted to false for all
configurations except Firecracker, which is set to true.

This'll greatly improve UX for folks who are utilizing
Kata with a VMM or hardware architecture that doesn't support hotplug.

Note, users will still be unable to do in place vertical pod autoscaling
or other dynamic container/pod sizing with this enabled.

Fixes: #3264

Signed-off-by: Eric Ernst <eric_ernst@apple.com>
2022-01-26 09:04:38 -08:00
.github/workflows workflows: Use base instead of head ref for kata-deploy-test 2022-01-20 11:04:14 +01:00
ci scripts: Use shebang /usr/bin/env bash 2022-01-13 22:53:28 +01:00
docs docs: describe vCPU handling when hotplug is unavailable 2022-01-26 09:52:42 -08:00
snap docs: Move arch doc to separate directory 2021-12-16 12:26:17 +00:00
src runtime: introduce static sandbox resource management 2022-01-26 09:04:38 -08:00
tools docs: Remove kata-pkgsync reference 2022-01-20 18:00:58 +00:00
utils scripts: Use shebang /usr/bin/env bash 2022-01-13 22:53:28 +01:00
.gitignore gitignore: Ignore *~ editor backup files 2021-02-19 09:54:53 +11:00
CODE_OF_CONDUCT.md docs: Add contributing and code of conduct docs 2018-02-06 10:41:09 +00:00
CODEOWNERS docs: fix static check errors 2020-09-28 11:01:03 +08:00
CONTRIBUTING.md docs: Add contributing and code of conduct docs 2018-02-06 10:41:09 +00:00
Glossary.md docs: Redirect glossary to the wiki 2022-01-20 14:01:24 +00:00
LICENSE Initial commit 2017-12-06 23:01:13 -06:00
Makefile src: reorg source directories 2021-12-14 10:30:08 +08:00
README.md src: reorg source directories 2021-12-14 10:30:08 +08:00
utils.mk src: reorg source directories 2021-12-14 10:30:08 +08:00
VERSION release: Kata Containers 2.4.0-alpha1 2022-01-06 08:37:28 +02:00
versions.yaml version: bump to kubernetes 1.23 2022-01-18 21:34:24 -08:00

Kata Containers

Welcome to Kata Containers!

This repository is the home of the Kata Containers code for the 2.0 and newer releases.

If you want to learn about Kata Containers, visit the main Kata Containers website.

Introduction

Kata Containers is an open source project and community working to build a standard implementation of lightweight Virtual Machines (VMs) that feel and perform like containers, but provide the workload isolation and security advantages of VMs.

Getting started

See the installation documentation.

Documentation

See the official documentation (including installation guides, the developer guide, design documents and more).

Community

To learn more about the project, its community and governance, see the community repository. This is the first place to go if you wish to contribute to the project.

Getting help

See the community section for ways to contact us.

Raising issues

Please raise an issue in this repository.

Note: If you are reporting a security issue, please follow the vulnerability reporting process

Developers

Components

Main components

The table below lists the core parts of the project:

Component Type Description
runtime core Main component run by a container manager and providing a containerd shimv2 runtime implementation.
agent core Management process running inside the virtual machine / POD that sets up the container environment.
documentation documentation Documentation common to all components (such as design and install documentation).
tests tests Excludes unit tests which live with the main code.

Additional components

The table below lists the remaining parts of the project:

Component Type Description
packaging infrastructure Scripts and metadata for producing packaged binaries
(components, hypervisors, kernel and rootfs).
kernel kernel Linux kernel used by the hypervisor to boot the guest image. Patches are stored here.
osbuilder infrastructure Tool to create "mini O/S" rootfs and initrd images and kernel for the hypervisor.
agent-ctl utility Tool that provides low-level access for testing the agent.
trace-forwarder utility Agent tracing helper.
ci CI Continuous Integration configuration files and scripts.
katacontainers.io Source for the katacontainers.io site.

Packaging and releases

Kata Containers is now available natively for most distributions. However, packaging scripts and metadata are still used to generate snap and GitHub releases. See the components section for further details.

Glossary of Terms