Get desktop application:
View/edit binary Protocol Buffers messages
Runtime service defines the public APIs for talk between RuntimeHookServer and RuntimeManager
PreRunPodSandboxHook calls RuntimeHookServer before pod creating, and would merge RunPodSandboxHookResponse and Original RunPodSandboxRequest generating a new RunPodSandboxRequest to transfer to backend runtime engine. RuntimeHookServer should ensure the correct operations basing on RunPodSandboxHookRequest.
PostStopPodSandboxHook calls RuntimeHookServer after pod deleted. RuntimeHookServer could do resource setting garbage collection sanity check after PodSandBox stopped.
PreCreateContainerHook calls RuntimeHookServer before container creating. RuntimeHookServer could do some resource setting before container launching.
PreStartContainerHook calls RuntimeHookServer before container starting, RuntimeHookServer could do some resource adjustments before container launching.
PostStartContainerHook calls RuntimeHookServer after container starting. RuntimeHookServer could do resource set checking after container launch.
PostStopContainerHook calls RuntimeHookServer after container stop. RuntimeHookServer could do resource setting garbage collection.
PreUpdateContainerResourcesHook calls RuntimeHookServer before container resource update to keep resource policy consistent
Used in:
Name of the container. Same as the container name in the PodSpec.
Attempt number of creating the container. Default: 0.
Id of the container.
ContainerResourceHookRequest is sent to RuntimeHookServer before/after container related operations including pre-container-start, post-container-create, pre-container-resource-update, post-container-stop.
Used as request type in: RuntimeHookService.PostStartContainerHook, RuntimeHookService.PostStopContainerHook, RuntimeHookService.PreCreateContainerHook, RuntimeHookService.PreStartContainerHook, RuntimeHookService.PreUpdateContainerResourcesHook
container related annotations
pod related annotations and labels
TODO: add the error info from containerd/dockerd
ContainerResourceHookResponse is RuntimeHookServer's response to ContainerResourceHookRequest. RuntimeManager will merge ContainerResourceHookResponse and Pre hookType Request to generate a RunPodSandboxRequest to containerd(dockerd).
Used as response type in: RuntimeHookService.PostStartContainerHook, RuntimeHookService.PostStopContainerHook, RuntimeHookService.PreCreateContainerHook, RuntimeHookService.PreStartContainerHook, RuntimeHookService.PreUpdateContainerResourcesHook
HugepageLimit corresponds to the file`hugetlb.<hugepagesize>.limit_in_byte` in container level cgroup. For example, `PageSize=1GB`, `Limit=1073741824` means setting `1073741824` bytes to hugetlb.1GB.limit_in_bytes.
Used in:
The value of PageSize has the format <size><unit-prefix>B (2MB, 1GB), and must match the <hugepagesize> of the corresponding control file found in `hugetlb.<hugepagesize>.limit_in_bytes`. The values of <unit-prefix> are intended to be parsed using base 1024("1KB" = 1024, "1MB" = 1048576, etc).
limit in bytes of hugepagesize HugeTLB usage.
LinuxContainerResources specifies Linux specific configuration for resources.
Used in:
, , ,CPU CFS (Completely Fair Scheduler) period. Default: 0 (not specified).
CPU CFS (Completely Fair Scheduler) quota. Default: 0 (not specified).
CPU shares (relative weight vs. other containers). Default: 0 (not specified).
Memory limit in bytes. Default: 0 (not specified).
OOMScoreAdj adjusts the oom-killer score. Default: 0 (not specified).
CpusetCpus constrains the allowed set of logical CPUs. Default: "" (not specified).
CpusetMems constrains the allowed set of memory nodes. Default: "" (not specified).
List of HugepageLimits to limit the HugeTLB usage of container per page size. Default: nil (not specified).
Unified resources for cgroup v2. Default: nil (not specified). Each key/value in the map refers to the cgroup v2. e.g. "memory.max": "6937202688" or "io.weight": "default 100".
Memory swap limit in bytes. Default 0 (not specified).
RunPodSandboxHookRequest is sent to RuntimeHookServer before pod creating request transferred to backend containerd or dockerd. This Request is generated basing on CRI's RunPodSandboxRequest, including pod Meta, Resources, Annotations .e.g and RuntimeHookServer should ensure correct operations basing on this request.
Used as request type in: RuntimeHookService.PostStopPodSandboxHook, RuntimeHookService.PreRunPodSandboxHook
Metadata of the sandbox. This information will uniquely identify the sandbox.
Named runtime to use for podSandbox.
Labels/Annotations are key-value pairs that may be used.
Parent cgroup of the pod sandbox.
Optional overhead represents the overheads associated with this sandbox, same as LinuxPodSandboxConfig.overhead under CRI scenario
Optional resources represents the sum of container resources for this sandbox same as LinuxPodSandboxConfig.resources under CRI scenario
RunPodSandboxHookResponse is RuntimeHookServer's response to RunPodSandboxHookRequest. RuntimeManager will merge RunPodSandboxHookResponse and RunPodSandboxRequest to generate a RunPodSandboxRequest to containerd(dockerd).
Used as response type in: RuntimeHookService.PostStopPodSandboxHook, RuntimeHookService.PreRunPodSandboxHook
RuntimeHookServer may inject additional labels/annotations to PodSandboxRequest to be send to backend contaienrd/dockerd
RuntimeHookSever may modify cgroup_parent to construct customized cgroup topology.
RuntimeHookServer may modify the linux resource config. Optional resources represents the sum of container resources for this sandbox
PodSandboxMetadata holds all necessary information for sandbox.
Used in:
,Pod name of the sandbox. Same as the pod name in the Pod ObjectMeta.
Pod UID of the sandbox. Same as the pod UID in the Pod ObjectMeta.
Pod namespace of the sandbox. Same as the pod namespace in the Pod ObjectMeta.
Attempt number of creating the sandbox. Default: 0.