Merge pull request #34276 from freehan/cri-runtime-config

Automatic merge from submit-queue

add UpdateRuntimeConfig interface

Expose UpdateRuntimeConfig interface in RuntimeService for kubelet to pass a set of configurations to runtime. Currently it only takes PodCIDR.

The use case is for kubelet to pass configs to runtime. Kubelet holds some config/information which runtime does not have, such as PodCIDR. I expect some of kubelet configurations will gradually move to runtime, but I believe cases like PodCIDR, which dynamically assigned by k8s master, need to stay for a while.
This commit is contained in:
Kubernetes Submit Queue
2016-10-13 23:10:42 -07:00
committed by GitHub
8 changed files with 329 additions and 183 deletions

View File

@@ -40,6 +40,9 @@ service RuntimeService {
// Exec executes the command in the container.
rpc Exec(stream ExecRequest) returns (stream ExecResponse) {}
// UpdateRuntimeConfig updates the runtime configuration based on request
rpc UpdateRuntimeConfig(UpdateRuntimeConfigRequest) returns (UpdateRuntimeConfigResponse) {}
}
// Image service defines the public APIs for managing images
@@ -677,3 +680,18 @@ message RemoveImageRequest {
}
message RemoveImageResponse {}
message NetworkConfig {
// The CIDR to use for pod IP addresses
optional string pod_cidr = 1;
}
message RuntimeConfig {
optional NetworkConfig network_config = 1;
}
message UpdateRuntimeConfigRequest {
optional RuntimeConfig runtime_config = 1;
}
message UpdateRuntimeConfigResponse {}