Commit Graph

17 Commits (f34a24e98e7c837b567b78be3af958ac1156cd80)

Author SHA1 Message Date
Lantao Liu d387eab817 Fix CRI container/imagefs stats. 2017-09-18 07:48:20 +00:00
Pengfei Ni 22e99504d7 Update CRI references 2017-06-09 10:16:40 +08:00
Kubernetes Submit Queue e903c58c9e Merge pull request #45614 from yujuhong/container-metrics
Automatic merge from submit-queue (batch tested with PRs 45809, 46515, 46484, 46516, 45614)

CRI: add methods for container stats

**What this PR does / why we need it**:
Define methods in CRI to get container stats.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: 
Part of  https://github.com/kubernetes/features/issues/290; addresses #27097

**Special notes for your reviewer**:
This PR defines the *minimum required* container metrics for the existing components to function, loosely based on the previous discussion on [core metrics](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/core-metrics-pipeline.md) as well as the existing cadvisor/summary APIs.
 
Two new RPC calls are added to the RuntimeService: `ContainerStats` and `ListContainerStats`. The former retrieves stats for a given container, while the latter gets stats for all containers in one call.
 
The stats gathering time of each subsystem can vary substantially (e.g., cpu vs. disk), so even though the on-demand model preferred due to its simplicity, we’d rather give the container runtime more flexibility to determine the collection frequency for each subsystem*. As a trade-off, each piece of stats for the subsystem must contain a timestamp to let kubelet know how fresh/recent the stats are. In the future, we should also recommend a guideline for how recent the stats should be in order to ensure the reliability (e.g., eviction) and the responsiveness (e.g., autoscaling) of the kubernetes cluster.
 
The next step is to plumb this through kubelet so that kubelet can choose consume container stats from CRI or cadvisor. 
 
**Alternatively, we can add calls to get stats of individual subsystems. However, kubelet does not have the complete knowledge of the runtime environment, so this would only lead to unnecessary complexity in kubelet.*


**Release note**:

```release-note
Augment CRI to support retrieving container stats from the runtime.
```
2017-05-26 16:59:08 -07:00
Dong Liu fb26c9100a Support TCP type runtime endpoint for kubelet. 2017-05-25 09:16:11 +08:00
Yu-Ju Hong 417e9c8cea Update all relevant interfaces and create stubs 2017-05-24 15:21:16 -07:00
Michael Taufen cbad320205 Reorganize kubelet tree so apis can be independently versioned 2017-05-12 10:02:33 -07:00
Pengfei Ni 5f7de0ab97 Add ImageFsInfo API for ImageManagerService 2017-05-03 15:17:45 +08:00
Antonio Murdaca caa6dd2599
pkg/kubelet/remote: fix typo
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-03-20 10:12:03 +01:00
Random-Liu 8177030957 Change timeout for ExecSync, RunPodSandbox and PullImage. 2017-02-10 16:09:19 -08:00
Pengfei Ni e2fa0ea87d CRI: verify responses from remote runtime 2017-01-24 10:16:17 +08:00
Pengfei Ni 76afc7300d kubelet/remote: update cri to protobuf v3 2017-01-20 09:55:07 +08:00
Pengfei Ni 9d52b761cc kuberuntime/dockershim: add image ref to ImageService interfaces 2016-12-29 16:53:01 +08:00
Pengfei Ni f584ed4398 Fix package aliases to follow golang convention 2016-11-30 15:40:50 +08:00
Random-Liu 3d549b9e25 Add dockershim grpc server. 2016-10-25 10:31:16 -07:00
Jedrzej Nowak 9e51eea6a3 Fix various typos in pkg/kubelet 2016-08-30 22:57:47 +02:00
Pengfei Ni f8c51adbe1 Log id in error message 2016-08-03 07:22:06 +08:00
Pengfei Ni b581e23c93 Kubelet: add gRPC implementation of new runtime interface 2016-08-02 16:43:02 +08:00