Commit Graph

354 Commits (e1a1aa211224fcd9b213420b80b2ae680669683d)

Author SHA1 Message Date
Clayton Coleman 5df8cc39c9
refactor: generated 2016-12-03 19:10:46 -05:00
Tim St. Clair cc801e97e8
[CRI] Manage attach TTY in Kubelet 2016-12-01 18:27:55 -08:00
Pengfei Ni f584ed4398 Fix package aliases to follow golang convention 2016-11-30 15:40:50 +08:00
Chao Xu bcc783c594 run hack/update-all.sh 2016-11-23 15:53:09 -08:00
Chao Xu 5e1adf91df cmd/kubelet 2016-11-23 15:53:09 -08:00
Random-Liu 2ce5deb6fd Add separate username field in CRI and use it. 2016-11-15 16:50:02 -08:00
Kubernetes Submit Queue 9bdff48d5e Merge pull request #36253 from timstclair/klet-stream-config-pr
Automatic merge from submit-queue

Use indirect streaming path for remote CRI shim

Last step for https://github.com/kubernetes/kubernetes/issues/29579

- Wire through the remote indirect streaming methods in the docker remote shim
- Add the docker streaming server as a handler at `<node>:10250/cri/{exec,attach,portforward}`
- Disable legacy streaming for dockershim

Note: This requires PR https://github.com/kubernetes/kubernetes/pull/34987 to work.

Tested manually on an E2E cluster.

/cc @euank @feiskyer @kubernetes/sig-node
2016-11-09 23:29:18 -08:00
Kubernetes Submit Queue b600533794 Merge pull request #36423 from Random-Liu/support-root-nobody
Automatic merge from submit-queue

CRI: Support string user name.

https://github.com/kubernetes/kubernetes/pull/33239 and https://github.com/kubernetes/kubernetes/pull/34811 combined together broke the cri e2e test. https://k8s-testgrid.appspot.com/google-gce#gci-gce-cri

The reason is that:
1) In dockershim and dockertools, we assume that `Image.Config.User` should be an integer. However, sometimes when user build the image with `USER nobody:nobody` or `USER root:root`, the field will become `nobody:nobody` and `root:root`. This makes dockershim to always return error.
2) The new kube-dns-autoscaler image is using `USER nobody:nobody`. (See https://github.com/kubernetes-incubator/cluster-proportional-autoscaler/blob/master/Dockerfile.in#L21)

This doesn't break the normal e2e test, because in dockertools [we only inspect image uid if `RunAsNonRoot` is set](https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/dockertools/docker_manager.go#L2333-L2338), which is just a coincidence. However, in kuberuntime, [we always inspect image uid first](https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/kuberuntime/kuberuntime_container.go#L141).

This PR adds literal `root` and `nobody` support. One problem is that `nobody` is not quite the same in different OS distros. Usually it should be `65534`, but some os distro doesn't follow that. For example, Fedora is using `99`. (See https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/Q5GCKZ7Q7PAUQW66EV7IBJGSRJWYXBBH/?sort=date)

Possible solution:
* Option 1: ~~Just use `65534`. This is fine because currently we only need to know whether the user is root or not.~~ Actually, we need to pass the user id to runtime when creating a container.
* Option 2: Return the uid as string in CRI, and let kuberuntime handle the string directly.

This PR is using option 1.

@yujuhong @feiskyer 
/cc @kubernetes/sig-node
/cc @MrHohn
2016-11-08 20:24:31 -08:00
Random-Liu 99ee3f4b76 Add non-numeric user name support. 2016-11-08 16:07:29 -08:00
Tim St. Clair 7badc1d226
Use indirect streaming path for dockershim & remote CRI runtime 2016-11-08 10:58:38 -08:00
Tim St. Clair 0f028ff660
Remove legacy dockershim streaming 2016-11-08 10:58:38 -08:00
Kubernetes Submit Queue 866293b704 Merge pull request #33366 from rhcarvalho/execincontainer-timeout-argument
Automatic merge from submit-queue

Add timeout argument to ExecInContainer

<!--  Thanks for sending a pull request!  Here are some tips for you:
1. If this is your first time, read our contributor guidelines https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md and developer guide https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md
2. If you want *faster* PR reviews, read how: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md
3. Follow the instructions for writing a release note: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes
-->

**What this PR does / why we need it**: This is related to https://github.com/kubernetes/kubernetes/issues/26895. It brings a timeout to the signature of `ExecInContainer` so that we can take timeouts into account in the future. Unlike my first attempt in https://github.com/kubernetes/kubernetes/pull/27956, it doesn't immediately observe the timeout, because it is impossible to do it with the current state of the Docker Remote API (the default exec handler implementation).

**Special notes for your reviewer**: This shares commits with https://github.com/kubernetes/kubernetes/pull/27956, but without some of them that have more controversial implications (actually supporting the timeouts). The original PR shall be closed in the current state to preserve the history (instead of dropping commits in that PR).

Pinging the original people working on this change: @ncdc @sttts @vishh @dims 

**Release note**:

<!--  Steps to write your release note:
1. Use the release-note-* labels to set the release note state (if you have access) 
2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`. 
-->

``` release-note
NONE
```
2016-11-08 01:41:19 -08:00
Kubernetes Submit Queue 8558768650 Merge pull request #36380 from yujuhong/rm_getns
Automatic merge from submit-queue

kuberuntime: remove unused GetNs code
2016-11-07 19:31:40 -08:00
Yu-Ju Hong bbda01179c kuberuntime: remove unused GetNs code 2016-11-07 11:45:39 -08:00
Rodolfo Carvalho 506129ba4e Add timeout argument to ExecInContainer
This allows us to interrupt/kill the executed command if it exceeds the
timeout (not implemented by this commit).

Set timeout in Exec probes. HTTPGet and TCPSocket probes respect the
timeout, while Exec probes used to ignore it.

Add e2e test for exec probe with timeout. However, the test is skipped
while the default exec handler doesn't support timeouts.
2016-11-07 13:00:59 +01:00
Pengfei Ni f8e5f81fed cleanup TODOs in dockershim 2016-11-07 11:41:06 +08:00
Pengfei Ni 3df60eb163 Implement security context in kuberuntime 2016-11-07 11:07:56 +08:00
Pengfei Ni 476cd96098 run hack/update-bazel.sh 2016-11-07 11:07:56 +08:00
Kubernetes Submit Queue 8371a778f6 Merge pull request #35839 from Random-Liu/add-cri-runtime-status
Automatic merge from submit-queue

CRI: Add Status into CRI.

For https://github.com/kubernetes/kubernetes/issues/35701.
Fixes https://github.com/kubernetes/kubernetes/issues/35701.

This PR added a `Status` call in CRI, and the `RuntimeStatus` is defined as following:

``` protobuf
message RuntimeCondition {
    // Type of runtime condition.
    optional string type = 1;
    // Status of the condition, one of true/false.
    optional bool status = 2;
    // Brief reason for the condition's last transition.
    optional string reason = 3;
    // Human readable message indicating details about last transition.
    optional string message = 4;
}

message RuntimeStatus {
    // Conditions is an array of current observed runtime conditions.
    repeated RuntimeCondition conditions = 1;
}
```

Currently, only `conditions` is included in `RuntimeStatus`, and the definition is almost the same with `NodeCondition` and `PodCondition` in K8s api.

@yujuhong @feiskyer @bprashanth If this makes sense, I'll send a follow up PR to let dockershim return `RuntimeStatus` and let kubelet make use of it.
@yifan-gu @euank Does this make sense to rkt?
/cc @kubernetes/sig-node
2016-11-06 04:16:29 -08:00
Kubernetes Submit Queue 6f053ec4bc Merge pull request #36112 from yujuhong/stop_sandbox
Automatic merge from submit-queue

CRI: stop sandbox before removing it

Stopping a sandbox includes reclaiming the network resources.  By always
stopping the sandbox before removing it, we reduce the possibility of leaking
resources in some corner cases.
2016-11-06 02:22:40 -08:00
Random-Liu 4bd9dbf6ad Add RuntimeStatus in container/runtime.go 2016-11-05 00:02:05 -07:00
Random-Liu 55c5232810 Add Status implementation. 2016-11-05 00:02:05 -07:00
Kubernetes Submit Queue f787cea237 Merge pull request #36020 from timstclair/klet-stream
Automatic merge from submit-queue

Separate Direct and Indirect streaming paths, implement indirect path for CRI

This PR refactors the `pkg/kubelet/container.Runtime` interface to remove the `ExecInContainer`, `PortForward` and `AttachContainer` methods. Instead, those methods are part of the `DirectStreamingRuntime` interface which all "legacy" runtimes implement. I also added an `IndirectStreamingRuntime` which handles the redirect path and is implemented by CRI runtimes. To control the size of this PR, I did not fully setup the indirect streaming path for the dockershim, so I left legacy path behind.

Most of this PR is moving & renaming associated with the refactoring. To understand the functional changes, I suggest tracing the code from `getExec` in `pkg/kubelet/server/server.go`, which calls `GetExec` in `pkg/kubelet/kubelet_pods.go` to determine whether to follow the direct or indirect path.

For https://github.com/kubernetes/kubernetes/issues/29579

/cc @kubernetes/sig-node
2016-11-04 11:52:06 -07:00
Yu-Ju Hong faae51a14a CRI: stop sandbox before removing it
Stopping a sandbox includes reclaiming the network resources.  By always
stopping the sandbox before removing it, we reduce the possibility of leaking
resources in some corner cases.
2016-11-03 14:11:19 -07:00
Tim St. Clair 86d849e374
Separate Direct and Indirect streaming paths, implement indirect path with CRI 2016-11-03 13:26:33 -07:00
Pengfei Ni e0f89a322b CRI: Add devices implementation and moves GPU to devices 2016-11-02 15:24:45 +08:00
Kubernetes Submit Queue 479ff417b8 Merge pull request #35348 from Random-Liu/kuberuntime-container-logs
Automatic merge from submit-queue

CRI: Add kuberuntime container logs

Based on https://github.com/kubernetes/kubernetes/pull/34858.

The first 2 commits are from #34858. And the last 2 commits are new.

This PR added kuberuntime container logs support and add unit test for it.

I've tested all the functions manually, and I'll send another PR to write a node e2e test for container log.

**_Notice: current implementation doesn't support log rotation**_, which means that:
- It will not retrieve logs in rotated log file.
- If log rotation happens when following the log:
  - If the rotation is using create mode, we'll still follow the old file.
  - If the rotation is using copytruncate, we'll be reading at the original position and get nothing.

To solve these issues, kubelet needs to rotate the log itself, or at least kubelet should be able to control the the behavior of log rotator. These are doable but out of the scope of 1.5 and will be addressed in future release.

@yujuhong @feiskyer @yifan-gu 
/cc @kubernetes/sig-node
2016-11-01 20:47:20 -07:00
Yu-Ju Hong 8a6285d844 CRI: Rename container/sandbox states
The enum constants are not namespaced. The shorter, unspecifc names are likely
to cause naming conflicts in the future.

Also replace "SandBox" with "Sandbox" in the API.
2016-11-01 13:18:21 -07:00
bprashanth 7c2aeecdd2 SetUp/TearDown II: remove code from kuberuntime 2016-10-31 13:05:19 -07:00
bprashanth 9c585baf1f Teach cri about podCIDR 2016-10-31 13:05:18 -07:00
Kubernetes Submit Queue 9f9962714e Merge pull request #35611 from feiskyer/os-interface
Automatic merge from submit-queue

Use osInterface for Create

A small fix of using osInterface instead of os for `Create()`.

cc/ @Random-Liu
2016-10-29 20:59:55 -07:00
Tim St. Clair c60db99536
Implement streaming CRI methods in dockershim 2016-10-28 11:15:53 -07:00
Random-Liu e403ccef75 Generate bazel. 2016-10-26 17:37:37 -07:00
Random-Liu 35195ef50e Add unit test for kuberuntime container logs. 2016-10-26 17:37:09 -07:00
Random-Liu 8e376dc843 Add kuberuntime container logs support. 2016-10-26 17:37:09 -07:00
Random-Liu 54feed4e41 Enable remote dockershim by default. Once the grpc integration
is stablized, I'll remove the temporary knob and configure container
runtime endpoint in all test suite.
2016-10-26 11:00:31 -07:00
Pengfei Ni 375660b931 Use osInterface for Create 2016-10-26 17:51:20 +08:00
Random-Liu ced5a848f5 Add instrumented CRI service which is enabled for both grpc and non-grpc
integration.
2016-10-25 10:59:27 -07:00
Mike Danese 763c4987f2 autogenerated 2016-10-24 14:47:27 -07:00
Random-Liu 0655ae56bb Add pod log garbage collection unit test. 2016-10-24 00:03:34 -07:00
Random Liu e87fa5e0ff * Refactor kuberuntime unit test
* Add gc unit test
* Fix init container unit test
2016-10-24 00:03:34 -07:00
Random Liu fad4672e72 Add legacy container log location support. 2016-10-23 19:08:47 -07:00
Random-Liu 121a91eb12 Symlink docker logs to CRI defined log path. 2016-10-23 19:08:47 -07:00
Mike Danese 3b6a067afc autogenerated 2016-10-21 17:32:32 -07:00
Yu-Ju Hong 32f05cda4a CRI: Handle container/sandbox restarts for pod with RestartPolicy == Never
If all sandbox and containers are dead in a pod, and the restart policy is
"Never", kubelet should not try to recreate all of them.
2016-10-21 10:10:09 -07:00
Kubernetes Submit Queue afa709b8dc Merge pull request #34662 from yujuhong/sandbox_logs
Automatic merge from submit-queue

Add more log messages for sandbox restarts
2016-10-13 07:05:08 -07:00
Kubernetes Submit Queue a0624835ac Merge pull request #34669 from yujuhong/get_netns
Automatic merge from submit-queue

Allow kuberuntime to get network namespace for not ready sandboxes

Kubelet calls TearDownPod to clean up the network resources for a pod sandbox.
TearDownPod relies on GetNetNS to retrieve network namespace, and the current
implementation makes this impossible for not-ready sandboxes. This change
removes the unnecessary filter to fix this issue.
2016-10-12 23:09:08 -07:00
Yu-Ju Hong 43368ff7b9 Allow kuberuntime to get network namespace for not ready sandboxes
Kubelet calls TearDownPod to clean up the network resources for a pod sandbox.
TearDownPod relies on GetNetNS to retrieve network namespace, and the current
implementation makes this impossible for not-ready sandboxes. This change
removes the unnecessary filter to fix this issue.
2016-10-12 18:05:40 -07:00
Yu-Ju Hong 2202688eef Add more log messages for sandbox restarts 2016-10-12 17:16:55 -07:00
Random-Liu afa3414779 * Add docker pullable support.
* Fix inspect image bug.
* Fix remove image bug.
2016-10-12 09:21:10 -07:00
Kubernetes Submit Queue 8179f4d1a3 Merge pull request #34332 from resouer/cri-versioncache
Automatic merge from submit-queue

Add version cache for cri APIVersion

ref https://github.com/kubernetes/kubernetes/issues/29478

1. Added a version cache for `APIVersion()` by using object cache., with ttl=1 min
2. Leaving `Version()` as it is today
2016-10-11 03:54:52 -07:00
Random-Liu 08aedca12e Add MinAge for sandbox GC. 2016-10-07 14:10:19 -07:00
Random-Liu 76056a47f9 Change the timestamp unit to nanosecond. 2016-10-07 14:10:19 -07:00
Random-Liu a6aad1591b Make sure GetPodStatus can get statuses of all containers in a pod. 2016-10-07 14:10:18 -07:00
Harry Zhang 411b906d4d Add version cache for cri 2016-10-07 15:50:46 +01:00
Kubernetes Submit Queue 3f4a66f3d6 Merge pull request #33970 from yifan-gu/remove_names
Automatic merge from submit-queue

CRI: Remove the mount name and port name.

Per discussion on https://github.com/kubernetes/kubernetes/issues/33873.

Currently the mount name is not being used and also involves some
incorrect usage (sometimes it's referencing a mount name, sometimes
it's referecing a volume name), so we decide to remove it from CRI.

The port name is also not used, so remove it as well.

Fix #33873
Fix #33526 

/cc @kubernetes/sig-node @kubernetes/sig-rktnetes
2016-10-04 17:08:20 -07:00
Kubernetes Submit Queue 9d270ad5ed Merge pull request #33870 from Random-Liu/summary-api-cri
Automatic merge from submit-queue

CRI: Implement temporary ImageStats in kuberuntime_manager

For #33048 and #33189.

This PR:
1) Implement a temporary `ImageStats` in kuberuntime_manager.go
2) Add container name label on infra container to make the current summary api logic work with dockershim.

I run the summary api test locally and it passed for me. Notice that the original summary api test is not showing up on CRI testgrid because it was removed yesterday. It will be added back in https://github.com/kubernetes/kubernetes/pull/33779.

@yujuhong @feiskyer
2016-10-04 14:15:55 -07:00
Yifan Gu be4e825ac3 CRI: Remove the mount name and port name.
Per discussion on https://github.com/kubernetes/kubernetes/issues/33873.

Currently the mount name is not being used and also involves some
incorrect usage (sometimes it's referencing a mount name, sometimes
it's referecing a volume name), so we decide to remove it from CRI.

The port name is also not used, so remove it as well.
2016-10-04 13:10:59 -07:00
Kubernetes Submit Queue bec41120d9 Merge pull request #33363 from feiskyer/initcontainer
Automatic merge from submit-queue

CRI: Add init containers

This PR adds init containers support in CRI.

CC @yujuhong @Random-Liu @yifan-gu 

Also CC @kubernetes/sig-node @kubernetes/sig-rktnetes
2016-10-04 10:26:33 -07:00
Kubernetes Submit Queue 3be5706830 Merge pull request #33836 from feiskyer/portforward
Automatic merge from submit-queue

Kubelet: fix port forward for dockershim

This PR fixes port forward for dockershim and also adds a `kubecontainer.FormatPod`.

Locally cluster has passed `--ginkgo.focus=Port\sforwarding'` tests.

cc/ @Random-Liu @yujuhong
2016-10-04 00:55:12 -07:00
Random-Liu c3ce58b934 Implement temporary ImageStats in kuberuntime_manager, and
fix a bug in dockershim which causes summary api not working
properly.
2016-10-03 22:56:25 -07:00
Pengfei Ni 8e25f938a7 Kubelet: fix port forward for dockershim
Signed-off-by: Pengfei Ni <feiskyer@gmail.com>
2016-10-01 08:06:23 +08:00
Kubernetes Submit Queue 918e99e298 Merge pull request #33815 from Random-Liu/add-cri-fake-attach
Automatic merge from submit-queue

CRI: Add fake attach support in CRI.

For #31459.

I've tested in my cluster, it works.

@feiskyer @yujuhong
2016-09-30 10:46:17 -07:00
Kubernetes Submit Queue e05d568b40 Merge pull request #33810 from feiskyer/portforward
Automatic merge from submit-queue

Fake docker portfoward for in-process docker CRI integration

This is necessary to pass e2e tests for in-process docker CRI integration.

This is part of #31459.

cc/ @Random-Liu @kubernetes/sig-node
2016-09-30 00:52:34 -07:00
Random-Liu e2a994a4d1 Add fake attach support in CRI. 2016-09-29 21:29:07 -07:00
Pengfei Ni dd14f6368a Fake docker portfoward for in-process docker CRI integration 2016-09-30 11:30:45 +08:00
Pengfei Ni 9d42d450f8 CRI: Add init containers 2016-09-30 10:48:57 +08:00
Yifan Gu 44ca3ea5e0 CRI: Add dns option, rename DNSOption to DNSConfig. 2016-09-29 13:46:32 -07:00
Kubernetes Submit Queue b7c5156c6b Merge pull request #33443 from Random-Liu/cri-oom-score-adj
Automatic merge from submit-queue

CRI: Add oom score adj in new CRI implementation.

Part of #29478.

This PR adds oom score adj in new CRI implementation and dockershim.

I run [oom score node e2e test](https://github.com/kubernetes/kubernetes/blob/master/test/e2e_node/container_manager_test.go#L77) with new CRI implementation myself, and all tests passed.

@yujuhong @feiskyer
2016-09-27 04:24:48 -07:00
Random-Liu 2141e230a6 Add oom score adj in new CRI implementation. 2016-09-26 11:39:02 -07:00
Kubernetes Submit Queue 19a2a10354 Merge pull request #33389 from Random-Liu/lifecycle-hook
Automatic merge from submit-queue

CRI: Fix lifecycle hook and add container lifecycle node e2e test

This PR:
1) Adds pod spec missing handling in kuberuntime. (1st commit)
2) Adds container lifecycle hook node e2e test. (2nd commit)

@yujuhong @feiskyer
2016-09-26 10:48:35 -07:00
Kubernetes Submit Queue 437b55bfd5 Merge pull request #33417 from yifan-gu/fix_cap_panic
Automatic merge from submit-queue

Fix an 'index out of range' panic when setting capabilities.

cc @yujuhong @feiskyer
2016-09-25 20:12:41 -07:00
Yifan Gu d5ead764f8 Fix an 'index out of range' panic when setting capabilities. 2016-09-23 19:49:29 -07:00
Kubernetes Submit Queue 1751e47e0f Merge pull request #33386 from yujuhong/message
Automatic merge from submit-queue

CRI: add Message in ContainerStatus

Kubernetes expects a brief CamelCase string as "Reason" and a human-readable
string as "Message" in the conatiner status. It is difficult for kubelet to
derive the other one if the runtime only provides one of the two fields.
Augment the API by adding the "Message" field.

/cc @kubernetes/sig-node
2016-09-23 18:30:20 -07:00
Random-Liu 72524e45b5 Handle pod spec missing case in kuberuntime. 2016-09-23 17:13:19 -07:00
Yu-Ju Hong cb57dc4cb5 kuberuntime: include container hash in backoff keys
We should reset the backoff if the content of the container has been updated.
2016-09-23 14:52:30 -07:00
Yu-Ju Hong 737769954a CRI: add Message in ContainerStatus
Kubernetes expects a brief CamelCase string as "Reason" and a human-readable
string as "Message" in the conatiner status. It is difficult for kubelet to
derive the other one if the runtime only provides one of the two fields.
Augment the API by adding the "Message" field.
2016-09-23 14:32:54 -07:00
Yu-Ju Hong 2fc2e71438 Fake container exec/logs support for in-process docker CRI integration
This is a temporary hack to bypass CRI when getting container logs or
running exec in a container. This is necessary to unblock testing and adding
other features in the integration.
2016-09-22 16:03:37 -07:00
Yu-Ju Hong c43a106b26 Move ConvertPodStatusToRunningPod back to the kubelet/container package
This avoids unnecessary imports between of kuberuntime from dockertools/rkt,
which implements the same kubecontainer.Runtime interface.
2016-09-22 12:13:44 -07:00
Yu-Ju Hong ee5b6a2550 Move image pull throttling logic to kubelet/images
This allows runtimes in different packages (dockertools, rkt, kuberuntime) to
share the same logic. Before this change, only dockertools support this
feature. Now all three packages support image pull throttling.
2016-09-21 18:31:04 -07:00
Kubernetes Submit Queue 650715d231 Merge pull request #32903 from yujuhong/enable_docker_shim
Automatic merge from submit-queue

kubelet: Add a hidden flag to enable docker CRI integration for testing
2016-09-20 11:19:26 -07:00
Yu-Ju Hong bd357e9761 Various fixes to enable kubelet to switch to kuberuntime/dockershim 2016-09-19 13:09:00 -07:00
Yifan Gu 27d4866c4e CRI: Add missing sandbox in runningPod.
Append containers that represent pod sandboxes when converting the
pod status to runningPod.
2016-09-19 11:52:00 -07:00
Yu-Ju Hong 18f230c524 kuberuntime: fix nil pointer dereference in killPodWithSyncResult 2016-09-16 08:38:11 -07:00
Pengfei Ni d65309399a Kubelet: add SyncPod for new runtime API 2016-09-15 23:32:36 +08:00
Pengfei Ni f774a68d52 Kubelet: add garbage collection for new runtime API 2016-09-14 09:09:45 +08:00
Kubernetes Submit Queue 6538912013 Merge pull request #31322 from feiskyer/killpod
Automatic merge from submit-queue

Kubelet: add KillPod for new runtime API

This PR adds implements of KillPod for new runtime API.

CC @yujuhong @Random-Liu @kubernetes/sig-node @kubernetes/sig-rktnetes
2016-09-10 03:10:32 -07:00
Pengfei Ni 277070e267 Kubelet: add KillPod for new runtime API 2016-09-08 20:56:50 +08:00
Pengfei Ni 0cc4686d85 Kubelet: implement GetPodContainerID for new runtime API 2016-09-08 20:53:52 +08:00
Kubernetes Submit Queue b2d02bd1ab Merge pull request #31395 from yujuhong/getpods
Automatic merge from submit-queue

Instruct PLEG to detect pod sandbox state changes

This PR adds a Sandboxes list in `kubecontainer.Pod`, so that PLEG can check
sandbox changes using `GetPods()` . The sandboxes are treated as regular
containers (type `kubecontainer.Container`) for now to avoid additional
changes in PLEG.

/cc @feiskyer @yifan-gu @euank
2016-09-08 05:41:16 -07:00
Kubernetes Submit Queue 4300055405 Merge pull request #30267 from feiskyer/kuberuntime-podstatus
Automatic merge from submit-queue

Kubelet: implement GetPodStatus for new runtime API

Implement `GetPodStatus()` for new runtime API.  Part of #28789 .

CC @yujuhong @Random-Liu @dchen1107
2016-09-07 10:14:26 -07:00
Jedrzej Nowak 9e51eea6a3 Fix various typos in pkg/kubelet 2016-08-30 22:57:47 +02:00
Yu-Ju Hong a49d28710a Extend PLEG to handle pod sandboxes
PLEG will treat them as if they are regular containers and detect changes the
same manner. Note that this makes an assumption that container IDs will not
collide with the podsandbox IDs.
2016-08-30 09:54:24 -07:00
Pengfei Ni 1c62d2c368 Kubelet: implement PodStatus for new runtime API 2016-08-25 09:36:00 +08:00
Yu-Ju Hong 0fd2385e0b Add "Sandboxes" to the kubecontainer.Pod
This field will only be used by the kuberuntime package and should be ignored
by other type of runtimes.
2016-08-24 14:45:43 -07:00
Kubernetes Submit Queue f488d118ad Merge pull request #31091 from feiskyer/kuberuntime-getnetns
Automatic merge from submit-queue

Kubelet: implement GetNetNS for new runtime api

Kubelet: implement GetNetNS for new runtime api. 

CC @yujuhong @thockin @kubernetes/sig-node @kubernetes/sig-rktnetes
2016-08-24 13:40:40 -07:00
Justin Santa Barbara 902ba4e249 Add network-plugin-mtu option for MTU selection
MTU selection is difficult, and if there is a transport such as IPSEC in
use may be impossible.  So we allow specification of the MTU with the
network-plugin-mtu flag, and we pass this down into the network
provider.

Currently implemented by kubenet.
2016-08-23 01:50:58 -04:00
Pengfei Ni df00ec0c79 Kubelet: implement GetNetNS for new runtime api 2016-08-23 07:44:15 +08:00
Pengfei Ni 9bfa37f2ae Kubelet: pass pod name/namespace/uid to runtimes 2016-08-23 07:33:15 +08:00
Pengfei Ni e3e10ddf8a Kubelet: implement GetPods for kuberuntime 2016-08-22 10:59:05 +08:00
Pengfei Ni b36ace9a57 Kubelet: add --container-runtime-endpoint and --image-service-endpoint
New flag --container-runtime-endpoint (overrides --container-runtime)
is introduced to kubelet which identifies the unix socket file of
the remote runtime service. And new flag --image-service-endpoint is
introduced to kubelet which identifies the unix socket file of the
image service.
2016-08-19 10:22:44 +08:00
Pengfei Ni 3512975c31 Kubelet: generate sandbox/container config for new runtime API 2016-08-12 12:20:56 +08:00
Pengfei Ni e8fcafc925 Kubelet: implement labels for kuberuntime 2016-08-09 10:01:45 +08:00
Pengfei Ni 81a79cd4c0 Kubelet: add kubeGenericRuntimeManager for new runtime API 2016-08-03 08:26:53 +08:00