cri-api: add rpc for querying runtime configuration

This patch adds a new rpc to the runtime service to query CRI runtime
configuration options. For now, it only contains one field for getting
the cgroup driver (systemd or cgroupfs) to be used.
This commit is contained in:
Markus Lehtonen 2023-06-16 11:08:59 +03:00 committed by Peter Hunt
parent 4f60a8d493
commit 0f05a92ce6
2 changed files with 994 additions and 413 deletions

File diff suppressed because it is too large Load Diff

View File

@ -131,6 +131,9 @@ service RuntimeService {
// ListPodSandboxMetrics gets pod sandbox metrics from CRI Runtime
rpc ListPodSandboxMetrics(ListPodSandboxMetricsRequest) returns (ListPodSandboxMetricsResponse) {}
// RuntimeConfig returns configuration information of the runtime.
rpc RuntimeConfig(RuntimeConfigRequest) returns (RuntimeConfigResponse) {}
}
// ImageService defines the public APIs for managing images.
@ -1804,3 +1807,23 @@ enum MetricType {
COUNTER = 0;
GAUGE = 1;
}
message RuntimeConfigRequest {}
message RuntimeConfigResponse {
// Configuration information for Linux-based runtimes. This field contains
// global runtime configuration options that are not specific to runtime
// handlers.
LinuxRuntimeConfiguration linux = 1;
}
message LinuxRuntimeConfiguration {
// Cgroup driver to use
CgroupDriver cgroup_driver = 1;
}
enum CgroupDriver {
SYSTEMD = 0;
CGROUPFS = 1;
}