Commit Graph

41 Commits

Author SHA1 Message Date
Robert Krawitz
bc091be66a Issue 71614: Protect log message maps 2018-11-30 18:04:08 -05:00
Robert Krawitz
3373fcf0fc Reduce logspam for crash looping containers 2018-11-28 10:48:52 -05:00
Davanum Srinivas
954996e231
Move from glog to klog
- Move from the old github.com/golang/glog to k8s.io/klog
- klog as explicit InitFlags() so we add them as necessary
- we update the other repositories that we vendor that made a similar
change from glog to klog
  * github.com/kubernetes/repo-infra
  * k8s.io/gengo/
  * k8s.io/kube-openapi/
  * github.com/google/cadvisor
- Entirely remove all references to glog
- Fix some tests by explicit InitFlags in their init() methods

Change-Id: I92db545ff36fcec83afe98f550c9e630098b3135
2018-11-10 07:50:31 -05:00
fisherxu
89f3fa3d62 use dailcontext 2018-09-08 16:07:38 +08:00
Tim Allclair
63f3bc1b7e
Implement RuntimeClass support for the Kubelet & CRI 2018-09-04 13:45:11 -07:00
Antonio Murdaca
57a2eec677
pkg: kubelet: remote: increase grpc client default size
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2018-05-17 17:32:33 +02:00
Lantao Liu
a321646e74 Add level to remote client glog.
Signed-off-by: Lantao Liu <lantaol@google.com>
2018-04-26 01:21:20 -07:00
hzxuzhonghu
70e45eccf2 Replace "golang.org/x/net/context" with "context" 2018-03-22 20:57:14 +08:00
Lee Verberne
e10042d22f Increment CRI version from v1alpha1 to v1alpha2
This also incorporates the version string into the package name so
that incompatibile versions will fail to connect.

Arbitrary choices:
- The proto3 package name is runtime.v1alpha2. The proto compiler
  normally translates this to a go package of "runtime_v1alpha2", but
  I renamed it to "v1alpha2" for consistency with existing packages.
- kubelet/apis/cri is used as "internalapi". I left it alone and put the
  public "runtimeapi" in kubelet/apis/cri/runtime.
2018-02-07 09:06:26 +01:00
Yu-Ju Hong
57d8b64dbd CRI: Add a call to reopen log file for a container
This allows a daemon external to the container runtime to rotate the log
file, and then ask the runtime to reopen the files.
2018-01-29 14:05:38 -08:00
Lantao Liu
d387eab817 Fix CRI container/imagefs stats. 2017-09-18 07:48:20 +00:00
Kubernetes Submit Queue
d490e2cf83 Merge pull request #50176 from Random-Liu/set-exec-timeout
Automatic merge from submit-queue (batch tested with PRs 50536, 50809, 50220, 50399, 50176)

Set ExecSync timeout in liveness prober.

Although Dockershim doesn't actually support `ExecSync` timeout (see [here](https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/dockershim/exec.go#L137)), we should set the timeout, so that the other runtime which supports the timeout could work properly.

Fixes #50389.

/cc @yujuhong @timstclair @feiskyer
2017-08-17 18:12:22 -07:00
Lantao Liu
ef29b836c0 Set ExecSync timeout in liveness prober. 2017-08-17 21:09:45 +00:00
Kubernetes Submit Queue
b9b875f0d7 Merge pull request #46105 from sjenning/update-conatiner-resource-cri
Automatic merge from submit-queue (batch tested with PRs 49488, 50407, 46105, 50456, 50258)

Add UpdateContainerResources method to CRI

This is first step toward support for opinionated cpu pinning for certain guaranteed pods.

In order to do this, the kubelet needs to be able to dynamically update the cpuset at the container level, which is managed by the container runtime.  Thus the kubelet needs a method to communicate over the CRI so the runtime can then modify the container cgroup.

This is used in the situation where a core is added or removed from the shared pool to become a exclusive core for a new G pod.  The cpuset for all containers in the shared pool will need to be updated to add or remove that core.

Opening this up now so we can start discussion.  The need for a change to the CRI might be unexpected.

@derekwaynecarr @vishh @ConnorDoyle 

```release-note
NONE
```
2017-08-11 14:14:00 -07:00
Malepati Bala Siva Sai Akhil
0c548ea482 Fix typo in variable of remote
Fix typo in variable of remote_runtime.go
2017-08-06 01:05:34 +05:30
Seth Jennings
9fbf8f57dd add UpdateContainerResources function to CRI 2017-07-31 20:47:56 -05:00
ymqytw
3dfc8bf7f3 update import 2017-07-20 11:03:49 -07: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
Kubernetes Submit Queue
5e853709a7 Merge pull request #46089 from karataliu/wincri1
Automatic merge from submit-queue (batch tested with PRs 46124, 46434, 46089, 45589, 46045)

Support TCP type runtime endpoint for kubelet

**What this PR does / why we need it**:
Currently the grpc server for kubelet and dockershim has a hardcoded endpoint: unix socket '/var/run/dockershim.sock', which is not applicable on non-unix OS.

This PR is to support TCP endpoint type besides unix socket.

**Which issue this PR fixes** 
This is a first attempt to address issue https://github.com/kubernetes/kubernetes/issues/45927

**Special notes for your reviewer**:
Before this change, running on Windows node results in:
```
Container Manager is unsupported in this build
```

After adding the cm stub, error becomes:
```
listen unix /var/run/dockershim.sock: socket: An address incompatible with the requested protocol was used.
```

This PR is to fix those two issues.

After this change, still meets 'seccomp' related issue when running on Windows node, needs more updates later.

**Release note**:
2017-05-25 21:40:02 -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
Random-Liu
5f0288e022 Double StopContainer request timeout. 2017-05-23 09:35:48 -07:00
Michael Taufen
cbad320205 Reorganize kubelet tree so apis can be independently versioned 2017-05-12 10:02:33 -07:00
Random-Liu
cfd0efff11 Fix StopContainer timeout 2017-04-26 15:48:12 -07:00
Pengfei Ni
81b9064ca4 Fix typo of defualt 2017-02-11 22:28:24 +08: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
f584ed4398 Fix package aliases to follow golang convention 2016-11-30 15:40:50 +08:00
Random-Liu
55c5232810 Add Status implementation. 2016-11-05 00:02:05 -07:00
bprashanth
48db726342 Split network.Host into LegacyHost and NamespaceGetter 2016-10-31 13:05:19 -07:00
bprashanth
9c585baf1f Teach cri about podCIDR 2016-10-31 13:05:18 -07:00
Tim St. Clair
c60db99536
Implement streaming CRI methods in dockershim 2016-10-28 11:15:53 -07:00
Random-Liu
3d549b9e25 Add dockershim grpc server. 2016-10-25 10:31:16 -07:00
Minhan Xia
480bcb9760 add UpdateRuntimeConfig interface 2016-10-12 22:33:58 -07:00
Pengfei Ni
58a9da3310 Kubelet: rename CreatePodSandbox to RunPodSandbox in CRI 2016-09-07 21:38:56 +08:00
Yu-Ju Hong
93f0c5a8e5 Repalce rawContainerID with containerID 2016-08-05 16:26:47 -07:00
Yu-Ju Hong
5c06d7e620 CRI: rename DeletePodSandbox to RemovePodSandbox
This makes it consistent with other calls (e.g., RemoveContainer, RemoveImage).
2016-08-03 15:46:34 -07: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