Commit Graph

401 Commits (c72a5b2c107f2578e98249d1d55682671544ab9b)

Author SHA1 Message Date
Yu-Ju Hong 9fa1ad29fd kubelet: handle containers in the "created" state 2017-02-14 07:51:35 -08:00
Kubernetes Submit Queue 0477100f98 Merge pull request #33684 from fraenkel/port_forward_ws
Automatic merge from submit-queue

Add websocket support for port forwarding

#32880

**Release note**:
```release-note
Port forwarding can forward over websockets or SPDY.
```
2017-02-01 23:19:02 -08:00
Michael Fraenkel 93c11422e4 CRI Portforward needs to forward websocket ports
- adjust ports to int32
- CRI flows the websocket ports as query params

- Do not validate ports since the protocol is unknown
  SPDY flows the ports as headers and websockets uses query params
- Only flow query params if there is at least one port query param
2017-02-01 18:03:42 -07:00
Kubernetes Submit Queue 4bffae39cb Merge pull request #40574 from yujuhong/mv_securitycontext
Automatic merge from submit-queue

securitycontext: move docker-specific logic into kubelet/dockertools

This change moves the code specific to docker to kubelet/dockertools,
while leaving the common utility functions at its current package
(pkg/securitycontext).

When we deprecate dockertools in the future, the code will be moved to
pkg/kubelet/dockershim instead.
2017-02-01 15:31:49 -08:00
Kubernetes Submit Queue 7165fe6e9e Merge pull request #39145 from NickrenREN/podpair
Automatic merge from submit-queue (batch tested with PRs 40758, 39145, 40776)

remove duplicate function notes
2017-02-01 13:30:39 -08:00
deads2k a106d9f848 switch kubelet to use external (client-go) object references for events 2017-01-31 19:15:33 -05:00
deads2k 8a12000402 move client/record 2017-01-31 19:14:13 -05:00
Yu-Ju Hong 4506f4c2d0 securitycontext: move docker-specific logic into kubelet/dockertools
This change moves the code specific to docker to kubelet/dockertools,
while leaving the common utility functions at its current package
(pkg/securitycontext).

When we deprecate dockertools in the future, the code will be moved to
pkg/kubelet/dockershim instead.
2017-01-27 12:25:46 -08:00
Yu-Ju Hong 87f1291c19 Use fnv hash in the CRI implementation
Leave the old implementation (dockertools/rkt) untouched so that
containers will not be restarted during kubelet upgrade. For CRI
implementation (kuberuntime), container restart is required for kubelet
upgrade.
2017-01-25 15:01:41 -08:00
deads2k 5a8f075197 move authoritative client-go utils out of pkg 2017-01-24 08:59:18 -05:00
Clayton Coleman 2bb2604f0b
Limit the size of the termination log and allow log input
Enforce the following limits:

12kb for total message length in container status
4kb for the termination message path file
2kb or 80 lines (whichever is shorter) from the log on error

Fallback to log output if the user requests it.
2017-01-23 12:26:38 -05:00
Clayton Coleman eff134cd5f
Use chmod to bypass umask on termination log file
os.Create() will obey the umask which results in the file being 0644
when injected in the container.
2017-01-23 12:26:37 -05:00
Kubernetes Submit Queue 0e1a166c4d Merge pull request #39158 from feiskyer/cri-proto3
Automatic merge from submit-queue (batch tested with PRs 40168, 40165, 39158, 39966, 40190)

CRI: upgrade protobuf to v3

For #38854, this PR upgrades CRI protobuf version to v3, and also updated related packages for confirming to new api.  

**Release note**:

```
CRI: upgrade protobuf version to v3.
```
2017-01-20 08:28:49 -08:00
Pengfei Ni 53c20e3630 kubelet/kuberuntime: update cri to protobuf v3 2017-01-20 09:55:56 +08:00
deads2k c47717134b move utils used in restclient to client-go 2017-01-19 07:55:14 -05:00
Clayton Coleman 9a2a50cda7
refactor: use metav1.ObjectMeta in other types 2017-01-17 16:17:19 -05:00
deads2k f1176d9c5c mechanical repercussions 2017-01-13 08:27:14 -05:00
deads2k 6a4d5cd7cc start the apimachinery repo 2017-01-11 09:09:48 -05:00
Jeff Grafton 20d221f75c Enable auto-generating sources rules 2017-01-05 14:14:13 -08:00
NickrenREN 350c8dbbba remove duplicate function notes 2017-01-03 14:00:01 +08:00
Kubernetes Submit Queue f5d9c430e9 Merge pull request #39298 from feiskyer/images
Automatic merge from submit-queue

Kubelet: add image ref to ImageService interfaces

This PR adds image ref (digest or ID, depending on runtime) to PullImage result, and pass image ref in CreateContainer instead of image name. It also

* Adds image ref to CRI's PullImageResponse
* Updates related image puller
* Updates related testing utilities

~~One remaining issue is: it breaks some e2e tests because they [checks image repoTags](https://github.com/kubernetes/kubernetes/blob/master/test/e2e/framework/util.go#L1941) while docker always returns digest in this PR. Should we update e2e test or continue to return repoTags in `containerStatuses.image`?~~

Fixes #38833.
2016-12-30 22:51:18 -08:00
Pengfei Ni 67a5bf8454 Rename imageservice.IsImagePresent to GetImageRef 2016-12-31 08:36:55 +08:00
Mike Danese 161c391f44 autogenerated 2016-12-29 13:04:10 -08:00
Pengfei Ni cac38615ac kubecontainer: add image ref to ImageService interfaces 2016-12-29 16:31:14 +08:00
Kubernetes Submit Queue 1d3c7ca758 Merge pull request #38348 from euank/doc-our-privilege
Automatic merge from submit-queue (batch tested with PRs 38727, 38726, 38347, 38348)

Add 'privileged' to sandbox to indicate if any container might be privileged in it, document privileged

Right now, the privileged flag is this magic thing which does "whatever Docker does". This documents it to make it a little less magic.

In addition, due to how rkt uses `systemd-nspawn` as an outer layer of isolation in creating the sandbox, it's helpful to know beforehand whether the pod will be privileged so additional security options can be applied earlier / applied at all.

I suspect the same indication will be useful for userns since userns should also occur at the pod layer, but it's possible that will be a separate/additional field.


cc @lucab @jonboulle @yujuhong @feiskyer @kubernetes/sig-node 


```release-note
NONE
```
2016-12-13 17:31:53 -08:00
Mike Danese c87de85347 autoupdate BUILD files 2016-12-12 13:30:07 -08:00
Euan Kemp bcd939cb08 kuberuntime: set privileged for sandboxes 2016-12-08 13:11:16 -08:00
Clayton Coleman 3454a8d52c
refactor: update bazel, codec, and gofmt 2016-12-03 19:10:53 -05:00
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
Kubernetes Submit Queue e407a1fe6d Merge pull request #35417 from zdj6373/runtime
Automatic merge from submit-queue

RunnningContainerStatues spelling mistake

runtime.go:in the function GetRunningContainerStatuses, runnningContainerStatues spelling mistake,  modified into runningContainerStatus
2016-12-01 06:31:29 -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
zdj6373 07dea0ba56 RunnningContainerStatues spelling modified
runningContainerStatues spelling modified 2

Error modification
2016-11-17 10:54:54 +08:00
pweil- d0d78f478c experimental host user ns defaulting 2016-11-14 10:16:03 -05: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
Random-Liu 4bd9dbf6ad Add RuntimeStatus in container/runtime.go 2016-11-05 00:02:05 -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
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 11638e9ee1 Unittests 2016-10-31 13:05:20 -07:00
bprashanth 9c585baf1f Teach cri about podCIDR 2016-10-31 13:05:18 -07:00
Kubernetes Submit Queue d0214ee303 Merge pull request #29509 from Hui-Zhi/container-devices
Automatic merge from submit-queue

Fix devices information struct in container

So far nowhere use the ```Devices``` which in ```RunContainerOptions```. But when I want to use it, found that it could be better if change it, because Devices in container is like:
```json
"Devices": [
                {
                    "PathOnHost": "/dev/nvidiactl",
                    "PathInContainer": "/dev/nvidiactl",
                    "CgroupPermissions": "mrw"
                },
                {
                    "PathOnHost": "/dev/nvidia-uvm",
                    "PathInContainer": "/dev/nvidia-uvm",
                    "CgroupPermissions": "mrw"
                },
                {
                    "PathOnHost": "/dev/nvidia0",
                    "PathInContainer": "/dev/nvidia0",
                    "CgroupPermissions": "mrw"
                }
            ],
```
2016-10-25 23:12:11 -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 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
Hui-Zhi d977adbb0f Fix devices information struct in container 2016-10-10 13:42:10 +08:00
deads2k 518d5500c7 remove testapi.Default.GroupVersion 2016-10-07 10:10:54 -04: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
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
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
Pengfei Ni d65309399a Kubelet: add SyncPod for new runtime API 2016-09-15 23:32:36 +08:00
Kubernetes Submit Queue beb4789265 Merge pull request #32091 from ZTE-PaaS/zhangke-patch-038
Automatic merge from submit-queue

wrong word of comment in cache.go
2016-09-11 06:59:51 -07:00
Pengfei Ni 277070e267 Kubelet: add KillPod for new runtime API 2016-09-08 20:56:50 +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
Ke Zhang fb5ec438c4 wrong word of comment in cache.go 2016-09-06 09:57:21 +08: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
Yifan Gu ce15f0e831 rkt: Refactoring the construction of the mount points.
So that at most one volume object will be created for every unique
host path. Also the volume's name is random generated UUID to avoid
collision since the mount point's name passed by kubelet is not
guaranteed to be unique when 'subpath' is specified.
2016-08-19 13:09:27 -07:00
Kubernetes Submit Queue 69419a145a Merge pull request #29802 from jfrazelle/fix-go-vet-errors
Automatic merge from submit-queue

fix go vet errors

<!--
Checklist for submitting a Pull Request

Please remove this comment block before submitting.

1. Please read our [contributor guidelines](https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md).
2. See our [developer guide](https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md).
3. If you want this PR to automatically close an issue when it is merged,
   add `fixes #<issue number>` or `fixes #<issue number>, fixes #<issue number>`
   to close multiple issues (see: https://github.com/blog/1506-closing-issues-via-pull-requests).
4. Follow the instructions for [labeling and writing a release note for this PR](https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes) in the block below.
-->

```release-note
```

This fixes the `go vet` errors brought about by go 1.7 testing re (#28742).

The are all pretty trivial and mostly related to literal composites.

also related to #16086
2016-08-15 13:10:08 -07:00
Tamer Tas 2b055eb475 pkg/kubelet/container: deprecate outdated CRI API 2016-08-12 23:06:36 +03:00
Tamer Tas 14cc9919d0 pkg/kubelet/container: amend cgroup type documentation 2016-08-12 16:52:48 +03:00
Jess Frazelle 7e9d82129e
fix go vet errors
Signed-off-by: Jess Frazelle <jessfraz@google.com>

fix composites

Signed-off-by: Jess Frazelle <me@jessfraz.com>
2016-08-10 16:45:41 -07:00
Andrey Kurilin 9f1c3a4c56 Fix various typos in kubelet 2016-08-03 01:14:44 +03:00
Yu-Ju Hong 97e30e134e kubelet: move kuberuntime.go to api/services.go
Also add a testing package and add placeholders for fake services.
2016-08-01 15:31:55 -07:00
k8s-merge-robot 7aa592bfa3 Merge pull request #29553 from yujuhong/docker-shim
Automatic merge from submit-queue

Add a docker-shim package

Add a new docker integration with kubelet using the new runtime API.
This change adds the package with the skeleton and implements some of the basic operations.


This PR only implements a small sets of functions. The rest of the functions will be implemented
in the followup PRs to keep the changes readable, and the reviewers sane.

Note: The first commit is from #28396, only the second commit is for review. 

/cc @kubernetes/sig-node @feiskyer @Random-Liu
2016-07-28 17:58:56 -07:00
Yu-Ju Hong 03d11bcf4e Add a dockershim package
Add a new docker integration with kubelet using the new runtime API.
This change adds the package with some skeletons, and implements some
of the basic operations.
2016-07-27 18:30:25 -07:00
k8s-merge-robot ab7d039c81 Merge pull request #29388 from ronnielai/image-gc-check
Automatic merge from submit-queue

Avoiding trying to gc images with no tags which are still in use

#29325
2016-07-27 16:44:50 -07:00
Yu-Ju Hong 0ac247c6a7 Add kuberuntime.go 2016-07-27 14:34:30 -07:00
Ron Lai 64981aaf46 Avoiding trying to gc images with no tags which are still in use 2016-07-27 10:31:47 -07:00
k8s-merge-robot c186afd46e Merge pull request #29122 from ronnielai/image-gc-1-1
Automatic merge from submit-queue

Syncing imaging pulling backoff logic

- Syncing the backoff logic in the parallel image puller and the sequential image puller to prepare for merging the two pullers into one.
- Moving image error definitions under kubelet/images
2016-07-25 11:43:22 -07:00
k8s-merge-robot d525d5345e Merge pull request #29119 from wongma7/pv-gid-squash2
Automatic merge from submit-queue

Allow PVs to specify supplemental GIDs

Retry of https://github.com/kubernetes/kubernetes/pull/28691 . Adds a Kubelet helper function for getting extra supplemental groups
2016-07-22 22:36:51 -07:00
Matthew Wong cbdd121d2d Remove pod mutation for PVs with supplemental GIDs 2016-07-22 17:41:44 -04:00
Ron Lai ee4822e476 Moving image pulling errors under kubelet/images 2016-07-20 14:20:53 -07:00
Ron Lai 56b9daf50f Moving image pullers to images directory 2016-07-20 09:47:11 -07:00
k8s-merge-robot 3786701280 Merge pull request #28865 from ronnielai/image-gc-0
Automatic merge from submit-queue

Moving event.go from kubelet/container to kubelet/events
2016-07-18 22:54:03 -07:00
k8s-merge-robot 50172148e4 Merge pull request #25273 from ncdc/exec-sigwinch
Automatic merge from submit-queue

Support terminal resizing for exec/attach/run

```release-note
Add support for terminal resizing for exec, attach, and run. Note that for Docker, exec sessions
inherit the environment from the primary process, so if the container was created with tty=false,
that means the exec session's TERM variable will default to "dumb". Users can override this by
setting TERM=xterm (or whatever is appropriate) to get the correct "smart" terminal behavior.
```

Fixes #13585
2016-07-14 07:26:49 -07:00
Andy Goldstein 3b21a9901b Support terminal resizing for exec/attach/run
Add support for terminal resizing for exec, attach, and run. Note that for Docker, exec sessions
inherit the environment from the primary process, so if the container was created with tty=false,
that means the exec session's TERM variable will default to "dumb". Users can override this by
setting TERM=xterm (or whatever is appropriate) to get the correct "smart" terminal behavior.
2016-07-13 17:06:16 -04:00
joe2far 5ead89b5bb Fixed several typos 2016-07-13 15:06:24 +01:00
Ron Lai e6b745122d Moving event.go from kubelet/container to kubelet/events 2016-07-12 17:42:29 -07:00
Ron Lai 0a651402f2 - Added a DeleteContainer method in Runtime interface
- Implemented DeleteContainer for docker
2016-07-08 10:40:30 -07:00
k8s-merge-robot 4da14c8a64 Merge pull request #28204 from thockin/cleanup-third_party
Automatic merge from submit-queue

Cleanup third party (pt 2)

Move forked-and-hacked golang code to the forked/ directory.  Remove ast/build/parse code that is now in stdlib.  Remove unused shell2junit
2016-07-07 12:13:14 -07:00
Yu-Ju Hong 08dc661133 Container runtime interface
This commit includes a proposal and a Go file to re-define the container
runtime interface.

Note that this is an experimental interface and is expected to go through
multiple revisions once developers start implementing against it. As stated in
the proposal, there are also individual issues to carry discussions of
specific features.
2016-07-01 15:42:11 -07:00
David McMahon ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
Tim Hockin 8c42c08363 move forked golang code to a common dir with LICENSE 2016-06-28 22:57:45 -07:00
Tim Hockin 37bda2dbf2 Move hacked golang os code to forked/ dir 2016-06-28 22:16:59 -07:00
Dan Williams a657d0587b kubelet/kubenet: Fix getRunningPods() to support rkt pods
Don't assume there's an infra container.
2016-06-22 13:45:13 -05:00
Dan Williams 9865ac325c kubelet/cni: make cni plugin runtime agnostic
Use the generic runtime method to get the netns path.  Also
move reading the container IP address into cni (based off kubenet)
instead of having it in the Docker manager code.  Both old and new
methods use nsenter and /sbin/ip and should be functionally
equivalent.
2016-06-22 11:36:10 -05:00
Yu-Ju Hong f279e36292 Don't remove all containers of deleted pods until sources are ready
Without this fix, kubelet may assume a pod from a not-ready source has already
been deleted, and GC all its dead containers.
2016-06-16 10:47:12 -07:00
Alex Robinson bd0b94efe2 Merge pull request #26029 from luxas/mkdir_all
kubelet: Use MkdirAll instead of Mkdir
2016-05-27 11:40:01 -07:00
Vishnu kannan e7721ea8cf Expose errors from libecycle hooks as events for the pod.
Signed-off-by: Vishnu kannan <vishnuk@google.com>
2016-05-24 11:12:53 -07:00
Lucas Käldström 2022c44409 kubelet: Use MkdirAll instead of Mkdir 2016-05-22 00:23:18 +03:00
k8s-merge-robot 423a4154be Merge pull request #25062 from dcbw/kubenet-rkt
Automatic merge from submit-queue

Hook rkt kubelet runtime up to network plugins
2016-05-21 00:45:19 -07:00
Mike Danese fbf6bbc49a Merge pull request #25596 from derekparker/inotify
kubelet: Optionally, have kubelet exit if lock file contention is observed, using --exit-on-lock-contention flag
2016-05-20 16:40:10 -07:00
Derek Parker f307e97f87 kubelet: Add --exit-on-lock-contention flag
This patch adds the --exit-on-lock-contention flag, which must be used
in conjunction with the --lock-file flag. When provided, it causes the
kubelet to wait for inotify events for that lock file. When an 'open'
event is received, the kubelet will exit.
2016-05-18 16:21:47 -07:00
Dan Williams 9b85d20c73 kubelet/runtime: add method to return pod network namespace path
Some runtimes (eg, Hypernetes) don't create network namespaces for pods,
so network plugins must correctly handle any error returned from the
runtime.
2016-05-18 09:26:01 -05:00
Clayton Coleman 205a8b4574
Add init container loading to the kubelet 2016-05-17 00:29:53 -04:00
k8s-merge-robot 59b7b1c550 Merge pull request #24921 from feiskyer/merge-exec
Automatic merge from submit-queue

Remove RunInContainer interface in Kubelet Runtime interface

According to #24689, we should merge RunInContainer and ExecInContainer in the container runtime interface. 

@yujuhong  @kubernetes/sig-node
2016-05-15 02:58:15 -07:00
Yifan Gu 9d5bcf4251 rkt: Add tests for GarbageCollect(). 2016-05-13 15:13:52 -07:00
k8s-merge-robot 08440b5dcc Merge pull request #24836 from Clarifai/gpu-impl
Automatic merge from submit-queue

WIP v0 NVIDIA GPU support

```release-note
* Alpha support for scheduling pods on machines with NVIDIA GPUs whose kubelets use the `--experimental-nvidia-gpus` flag, using the alpha.kubernetes.io/nvidia-gpu resource 
```

Implements part of #24071 for  #23587

I am not familiar with the scheduler enough to know what to do with the scores. Mostly punting for now.

Missing items from the implementation plan: limitranger, rkt support, kubectl
support and docs

cc @erictune @davidopp @dchen1107 @vishh @Hui-Zhi @gopinatht
2016-05-12 14:04:15 -07:00
Rudi Chiarito 362c763fca WIP v0 NVIDIA GPU support
Implements part of #24071

I am not familiar with the scheduler enough to know what to do with the scores. Punting for now.

Missing items from the implementation plan: limitranger, rkt support, kubectl
support and user docs
2016-05-09 19:20:05 -04:00
k8s-merge-robot fe135fc251 Merge pull request #24630 from euank/redundant-created
Automatic merge from submit-queue

kubelet: Remove redundant `Container.Created`

As far as I can tell, this has been supplanted by a) the `DockerJSON.CreatedAt` field and b) the
`ContainerStatus.CreatedAt`, where the first is used for creating the
second.

The `.Created` field was only written to as far as I can see.

cc @yifan-gu & @Random-Liu 

Is there any reason we might want to keep this around?
2016-05-08 16:21:05 -07:00
k8s-merge-robot 8217172cd4 Merge pull request #19025 from aveshagarwal/master-imagepull-messages
Automatic merge from submit-queue

Fix parallel image pullers event messages with reasons constants.
2016-05-08 07:31:49 -07:00
Andy Goldstein f091ea5eda Handle image digests in node status and image GC
Start including Docker image digests in the node status and consider image digests during image
garbage collection.
2016-05-07 06:50:51 -04:00
derekwaynecarr 7bab6999d4 Allow KillPod to take a gracePeriodOverride 2016-05-06 12:14:43 -04:00
feisky 831203c19b Remove RunInContainer interface in Kuberlete Runtime interface 2016-05-01 20:21:15 +08:00
Abhishek Shah 8a3ed48808 Added Hostname and Subdomain field to Pod.Spec 2016-04-28 10:56:56 -07:00
Vishnu kannan e566948a75 Track image storage usage for docker containers
add image fs info to summary stats API.
Adding node e2e test for image stats.

Signed-off-by: Vishnu kannan <vishnuk@google.com>
2016-04-25 16:00:34 -07:00
Euan Kemp 7d34b0b09d kubelet: Remove redundant `Container.Created`
This has been supplanted by a) the DockerJSON.CreatedAt field and b) the
ContainerStatus.CreatedAt, where the first is used for creating the
second.

The `.Created` field was only written to as far as I can see.
2016-04-25 12:19:24 -07:00
Euan Kemp a6718f5969 rkt: Implement pod `FinishedAt`
This is implemented via touching a file on stop as a hook in the systemd
unit. The ctime of this file is then used to get the `finishedAt` time
in the future.
In addition, this changes the `startedAt` and `createdAt` to use the api
server's results rather than the annotations it previously used.

It's possible we might want to move this into the api in the future.

Fixes #23887
2016-04-22 15:34:55 -07:00
Yifan Gu dfb6dd010f rkt: Fix hostnetwork.
Mount hosts' /etc/hosts, /etc/resolv.conf, set host's hostname
when running the pod in the host's network.

Besides, do not set the DNS flags when running in host's network.
2016-04-14 18:44:09 -07:00
harry f9e2f522b4 Add cache for api version
Expose runtime interface
2016-04-12 22:34:59 -04:00
k8s-merge-robot 6a87dba0b8 Merge pull request #22733 from resouer/flow-control
Automatic merge from submit-queue

Add flow control pkg

minor fix ref #15634
Refactor pkg names in back off related files
2016-04-11 06:18:51 -07:00
k8s-merge-robot a2145d7b1c Merge pull request #23613 from Random-Liu/remove-out-of-date-code
Automatic merge from submit-queue

Kubelet: Remove nsinit related code and bump up minimum docker apiversion

Docker has native exec support after 1.3.x. We never need this code now.

As for the apiversion, because Kubernetes supports 1.8.x - 1.10.x now, we should bump up the minimum docker apiversion.
@yujuhong I checked the [changes](https://github.com/docker/engine-api/blob/master/types/versions/v1p20/types.go), we are not relying on any of those changes. So #23506 should work with docker 1.8.x+
2016-04-03 07:34:26 -07:00
harry 5fe773d37c Add flow control pkg
Refactor pkg names in flow control related files
2016-04-03 11:28:03 +08:00
derekwaynecarr eeeccd0a67 A pod never terminated if a container image registry was unavailable 2016-04-01 13:42:23 -04:00
Random-Liu 1459a17dbe Remove nsinit related code and bump up minimum docker apiversion 2016-03-29 18:21:50 -07:00
Yifan Gu d4dc037bf7 rkt: Add '--hostname' support for rkt.
Add GeneratePodHostNameAndDomain() to RuntimeHelper to
get the hostname of the pod from kubelet.

Also update the logging flag to change the journal match from
_HOSTNAME to _MACHINE_ID.
2016-03-28 17:06:14 -07:00
saadali 79012f6d53 Rename volume.Builder to Mounter and volume.Cleaner to Unmounter 2016-03-25 11:29:58 -07:00
k8s-merge-robot 566d23e880 Merge pull request #23205 from yifan-gu/append_image_tag
Auto commit by PR queue bot
2016-03-22 07:30:52 -07:00
Jordan Liggitt 1d4c56c2f6 Move TestRuntimeCache into non-test file 2016-03-21 16:21:55 -04:00
Yifan Gu 89feb6fc53 rkt: Append tag to the returned image name. 2016-03-18 16:40:44 -07:00
Avesh Agarwal 40e5d292c1 Fix parallel image pullers event messages with reasons constants. 2016-03-12 00:41:02 -05:00
Brian Grant c6b4518aed Merge pull request #22666 from pmorie/pod-ip-flake-redux
Fix flake in pod IP as env var e2e
2016-03-11 09:42:40 -08:00
Paul Morie 5194c12d9e Fix flake in pod IP as env var e2e 2016-03-10 16:32:03 -05:00
k8s-merge-robot 8b186991e2 Merge pull request #22607 from Random-Liu/restart-unknown-state-container
Auto commit by PR queue bot
2016-03-08 05:02:35 -08:00
k8s-merge-robot fa0bf812d6 Merge pull request #22467 from Random-Liu/push-down-runtime-version-check
Auto commit by PR queue bot
2016-03-05 22:34:19 -08:00
k8s-merge-robot 357a9d1fdf Merge pull request #22033 from yifan-gu/rkt_get_status
Auto commit by PR queue bot
2016-03-05 10:46:47 -08:00
Lantao Liu 45064d7a1e Always restart container in unknown state. 2016-03-05 10:42:26 +00:00
Random-Liu 07b21c50fa Add Status in runtime interface and use it for runtime health check. 2016-03-04 21:26:41 -08:00
Abhishek Shah a3c00aadd5 Specify hostname, subdomain via annotation on podspec.
The hostname is a DNS A record, if the subdomain maps to a service name
in the same namespace
2016-03-04 13:28:33 -08:00
Tim St. Clair 7b6d843309 Move test-only files to test-only packages 2016-03-01 09:11:32 -08:00
k8s-merge-robot 6b8e0d45f0 Merge pull request #21349 from Random-Liu/cleanup-should-container-be-restarted
Auto commit by PR queue bot
2016-02-27 09:50:26 -08:00
Yifan Gu 168ec8b80f kubelet: Sort the container statuses in convertStatusToAPIStatus(). 2016-02-26 11:27:03 -08:00
Random-Liu 33280abf42 Cleanup and add unit test for ShouldContainerBeRestarted 2016-02-23 00:42:52 -08:00
Minhan Xia 973b01ee29 fix cascading backoff 2016-02-22 18:25:42 -08:00
laushinka 7ef585be22 Spelling fixes inspired by github.com/client9/misspell 2016-02-18 06:58:05 +07:00
Nick Schuch 5d511aeb54 Adds ReadOnlyRootFilesystem support for containers 2016-02-14 15:39:51 +10:00
Yifan Gu 8964469e4a rkt: Remove ShouldContainerBeRestartedOldVersion(). 2016-02-09 00:15:58 +08:00
James DeFelice 1aec798aa0 support optional envvars for pod-infra-container 2016-02-08 13:48:25 +00:00
Jan Chaloupka 4389b3f0d6 Rewritte util.* -> wait.* wherever reasonable 2016-02-07 12:02:20 +01:00
Random-Liu 2b7d0182ca Remove ConvertPodStatusToAPIPodStatus from runtime interface 2016-02-05 19:19:46 +00:00
k8s-merge-robot bd67b8a5db Merge pull request #20192 from Random-Liu/remove-get-api-podstatus
Auto commit by PR queue bot
2016-02-05 11:00:42 -08:00
Yifan Gu e9139bb0e5 kubelet: Rename RunContainerOptionsGenerator to RuntimeHelper.
Also add GetClusterDNS() to the interface to let rkt get the
DNS servers, DNS names.
2016-02-03 14:54:08 +01:00
Jeff Lowdermilk ae2aece9af Merge pull request #20202 from caesarxuchao/skip-update
skip update when deleting with grace-period=0
2016-02-02 18:24:57 -08:00
Jeff Lowdermilk caa9433234 Merge pull request #20433 from lavalamp/fix-bad-rv
Add timeout, fix potential startup hang
2016-02-02 17:27:23 -08:00
Random-Liu 7b4cdb6f8f Remove GetAPIPodStatus from runtime interface 2016-02-02 23:41:55 +00:00