Commit Graph

1257 Commits (85b67f2f00de5d71340bf0c06f4dbbd032699039)

Author SHA1 Message Date
Łukasz Oleś 2b46aea495 Custom sort function for InitContainersStatuses
Order in init container statuses should be the same as defined in pod.
Statues shoudln't be sorted by name.
2016-06-07 23:57:23 +02:00
Saad Ali 9dbe943491 Attach/Detach Controller Kubelet Changes
This PR contains Kubelet changes to enable attach/detach controller control.
* It introduces a new "enable-controller-attach-detach" kubelet flag to
  enable control by controller. Default enabled.
* It removes all references "SafeToDetach" annoation from controller.
* It adds the new VolumesInUse field to the Node Status API object.
* It modifies the controller to use VolumesInUse instead of SafeToDetach
  annotation to gate detachment.
* There is a bug in node-problem-detector that causes VolumesInUse to
  get reset every 30 seconds. Issue https://github.com/kubernetes/node-problem-detector/issues/9
  opened to fix that.
2016-06-02 16:47:11 -07:00
k8s-merge-robot 32da727ca1 Merge pull request #26264 from luxas/remove_flannel_default
Automatic merge from submit-queue

Do not call NewFlannelServer() unless flannel overlay is enabled

Ref: #26093 

This makes so kubelet does not warn the user that iptables isn't in PATH, although the user didn't enable the flannel overlay.

@vishh @freehan @bprashanth
2016-05-29 15:49:00 -07:00
k8s-merge-robot 577cdf937d Merge pull request #26415 from wojtek-t/network_not_ready
Automatic merge from submit-queue

Add a NodeCondition "NetworkUnavaiable" to prevent scheduling onto a node until the routes have been created 

This is new version of #26267 (based on top of that one).

The new workflow is:
- we have an "NetworkNotReady" condition
- Kubelet when it creates a node, it sets it to "true"
- RouteController will set it to "false" when the route is created
- Scheduler is scheduling only on nodes that doesn't have "NetworkNotReady ==true" condition

@gmarek @bgrant0607 @zmerlynn @cjcullen @derekwaynecarr @danwinship @dcbw @lavalamp @vishh
2016-05-29 03:06:59 -07:00
k8s-merge-robot e7a13ac2ad Merge pull request #25902 from euank/changeVolumeMounts
Automatic merge from submit-queue

rkt: Use volumes from RunContainerOptions

This replaces the previous creation of mounts from the `volumeGetter`
with mounts provided via RunContainerOptions.

This is motivated by the fact that the latter has a more complete set of
mounts (e.g. the `/etc/hosts` one created in kubelet.go in the case an IP is available).

This does not induce further e2e failures as far as I can tell.

cc @yifan-gu
2016-05-28 03:58:14 -07:00
k8s-merge-robot 74b20cccc6 Merge pull request #25813 from rrati/kubelet-pods-per-core
Automatic merge from submit-queue

Added pods-per-core to kubelet. #25762

Added --pods-per-core to kubelet

#25762
2016-05-28 03:08:28 -07:00
Alex Robinson 91f8c784a0 Merge pull request #21373 from enoodle/read_cadvisor_cloudinfo_in_kubelet
kubelet: reading cloudinfo from cadvisor
2016-05-27 16:14:24 -07:00
Euan Kemp abbd0321b2 rkt: Use volumes from RunContainerOptions
This replaces the previous creation of mounts from the `volumeGetter`
with mounts provided via RunContainerOptions.

This is motivated by the fact that the latter has a more complete set of
mounts (e.g. the `/etc/hosts` one created in kubelet.go).
2016-05-27 13:11:47 -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
Wojciech Tyczynski be1b57100d Change to NotReadyNetworking and use in scheduler 2016-05-27 19:32:49 +02:00
gmarek 7bdf480340 Node is NotReady until the Route is created 2016-05-27 19:29:51 +02:00
Robert Rati 2d487f7c06 Added pods-per-core to kubelet. #25762 2016-05-27 07:10:13 -04:00
Alex Mohr 4357b8a0a6 Merge pull request #25324 from jfrazelle/add-seccomp
Add Seccomp to Annotations
2016-05-26 10:50:06 -07:00
Lucas Käldström fdff659ced Do not call NewFlannelServer() unless flannel overlay is enabled 2016-05-25 16:09:39 +03:00
Jess Frazelle aa8c72adaa
seccomp: add annotations and test for docker runtime
Signed-off-by: Jess Frazelle <me@jessfraz.com>
2016-05-24 12:25:21 -07:00
Avesh Agarwal 1931931494 Downward API implementation for resources limits and requests 2016-05-24 12:22:35 -04:00
Erez Freiberger 7fb82d543f kubelet: reading cloudinfo from cadvisor
When no --cloud-provider flag is given, try to use data from cadvisor to
determine the current cloud provider.
2016-05-22 18:41:39 +03:00
k8s-merge-robot 6224f44717 Merge pull request #25771 from sjpotter/fs-info
Automatic merge from submit-queue

kubelet/cadvisor: Refactor cadvisor disk stat/usage interfaces.

basically

1) cadvisor struct will know what runtime the kubelet is, passed in via additional argument to New()

2) rename cadvisor wrapper function to DockerImagesFsInfo() to ImagesFsInfo() and have linux implementation choose a label based on the runtime inside the cadvisor struct

2a) mock/fake/unsupported modified to take the same additional argument in New()

3) kubelet's wrapper for the cadvisor wrapper is renamed in parallel

4) make all tests use new interface
2016-05-22 03:08:59 -07:00
Lucas Käldström 2022c44409 kubelet: Use MkdirAll instead of Mkdir 2016-05-22 00:23:18 +03:00
k8s-merge-robot 68ab865e75 Merge pull request #25328 from resouer/sort-images
Automatic merge from submit-queue

Only expose top N images in `NodeStatus`

Fix #25209

Sorted the image and only pick set top 50 sized images in node status.

cc @vishh
2016-05-21 04:43:30 -07: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 63b7c05bc4 Merge pull request #24743 from pmorie/kill-pod-errs
Clearly identify errors killing pods in events and logs
2016-05-20 16:38:51 -07:00
Random-Liu 38b188aa94 Properly handle init containers in convertToAPIContainerStatuses 2016-05-19 17:03:25 -07:00
Daniel Smith 5448400b1c Merge pull request #25243 from smarterclayton/explore_quantity
Provide an int64 version of Quantity that is much faster
2016-05-19 16:56:48 -07:00
Shaya Potter ae08ef38d7 kubelet/cadvisor: Refactor cadvisor disk stat/usage interfaces 2016-05-19 11:13:47 -07:00
Tim Hockin 77eff06a53 Make IsDNS1123Label return error strings 2016-05-19 08:57:49 -07:00
Clayton Coleman 5e4308f91d
Update use of Quantity in other classes 2016-05-19 08:41:43 -04:00
Paul Morie 451c7f28b2 Clearly identify errors killing pods in events and logs 2016-05-19 03:21:39 -04:00
Dan Williams 62e4635cfb rkt: set up network namespace with plugins 2016-05-18 11:28:05 -05:00
k8s-merge-robot bf4f84167f Merge pull request #23567 from smarterclayton/init_containers
Automatic merge from submit-queue

Add init containers to pods

This implements #1589 as per proposal #23666

Incorporates feedback on #1589, creates parallel structure for InitContainers and Containers, adds validation for InitContainers that requires name uniqueness, and comments on a number of implications of init containers.

This is a complete alpha implementation.

<!-- Reviewable:start -->
---
This change is [<img src="http://reviewable.k8s.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](http://reviewable.k8s.io/reviews/kubernetes/kubernetes/23567)
<!-- Reviewable:end -->
2016-05-18 00:53:30 -07:00
k8s-merge-robot 7b4851b9ae Merge pull request #21274 from derekwaynecarr/kubelet_eviction
Automatic merge from submit-queue

out of resource killing (memory)

Adds the core framework for low-resource killing in the kubelet.

Implements support for out of memory killing.

Related:
https://github.com/kubernetes/kubernetes/pull/18724

<!-- Reviewable:start -->
---
This change is [<img src="http://reviewable.k8s.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](http://reviewable.k8s.io/reviews/kubernetes/kubernetes/21274)
<!-- Reviewable:end -->
2016-05-17 10:15:32 -07:00
Clayton Coleman 205a8b4574
Add init container loading to the kubelet 2016-05-17 00:29:53 -04:00
Harry Zhang d917ed2638 Add test for image in node status 2016-05-16 15:58:12 -04:00
Harry Zhang 032a886320 Only store top N images in status 2016-05-16 15:58:11 -04:00
Random-Liu 10b0e0f3de Fix downward api for pod using host network. 2016-05-15 23:59:39 -07: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
derekwaynecarr edc76f6d4f out of resource killing (memory) 2016-05-14 11:34:45 -04:00
Yifan Gu 06b1955c4a rkt: Refactor GarbageCollect() to enforce GCPolicy.MaxContainers. 2016-05-13 15:12:36 -07:00
k8s-merge-robot 399b086620 Merge pull request #23684 from luxas/auto_label_arch
Automatic merge from submit-queue

Automatically add node labels beta.kubernetes.io/{os,arch}

Proposal: #17981
As discussed in #22623:
> @davidopp: #9044 says cloud provider but can also cover platform stuff.

Adds a label `beta.kubernetes.io/platform` to `kubelet` that informs about the os/arch it's running on.
Makes it easy to specify `nodeSelectors` for different arches in multi-arch clusters.

```console
$ kubectl get no --show-labels
NAME        STATUS    AGE       LABELS
127.0.0.1   Ready     1m        beta.kubernetes.io/platform=linux-amd64,kubernetes.io/hostname=127.0.0.1
$ kubectl describe no
Name:			127.0.0.1
Labels:			beta.kubernetes.io/platform=linux-amd64,kubernetes.io/hostname=127.0.0.1
CreationTimestamp:	Thu, 31 Mar 2016 20:39:15 +0300
```
@davidopp @vishh @fgrzadkowski @thockin @wojtek-t @ixdy @bgrant0607 @dchen1107 @preillyme
2016-05-13 13:25:34 -07:00
k8s-merge-robot 17345bf857 Merge pull request #25372 from derekwaynecarr/more-eviction-flags
Automatic merge from submit-queue

Add eviction-pressure-transitition-period flag to kubelet

This PR does the following:
* add the new flag to control how often a node will go out of memory pressure or disk pressure conditions see: https://github.com/kubernetes/kubernetes/pull/25282
* pass an `eviction.Config` into `kubelet` so we can group config

/cc @vishh
2016-05-13 05:46:15 -07:00
derekwaynecarr 6fefb428c1 Add killPodNow to kubelet 2016-05-12 19:17:08 -04:00
Saad Ali 4aa332e8f2 Merge pull request #25523 from saad-ali/modifyDetachToUseSpec
Modify Detach method to take disk name
2016-05-12 15:53:18 -07:00
derekwaynecarr 2c01edf9ea Add eviction-pressure-transition-period flag to kubelet 2016-05-12 17:33:00 -04: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
saadali bce708c22f Modify Detach method to take disk name 2016-05-12 12:19:24 -07:00
k8s-merge-robot fd3ef234de Merge pull request #23711 from dcbw/kubenet-promiscuous
Automatic merge from submit-queue

kubenet: set bridge promiscuous mode based on hairpinMode

Closes: https://github.com/kubernetes/kubernetes/issues/23657
Closes: https://github.com/kubernetes/kubernetes/issues/20475

<!-- Reviewable:start -->
---
This change is [<img src="http://reviewable.k8s.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](http://reviewable.k8s.io/reviews/kubernetes/kubernetes/23711)
<!-- Reviewable:end -->
2016-05-12 10:33:18 -07:00
Dan Williams b749902b42 kubenet: set bridge promiscuous mode based on hairpinMode
Closes: https://github.com/kubernetes/kubernetes/issues/23657
Closes: https://github.com/kubernetes/kubernetes/issues/20475
2016-05-12 10:02:33 -05:00
k8s-merge-robot 132ebb091a Merge pull request #24459 from fgrzadkowski/unschedulable_pod
Automatic merge from submit-queue

Add pod condition PodScheduled to detect situation when scheduler tried to schedule a Pod, but failed

Set `PodSchedule` condition to `ConditionFalse` in `scheduleOne()` if scheduling failed and to `ConditionTrue` in `/bind` subresource.

Ref #24404

@mml (as it seems to be related to "why pending" effort)

<!-- Reviewable:start -->
---
This change is [<img src="http://reviewable.k8s.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](http://reviewable.k8s.io/reviews/kubernetes/kubernetes/24459)
<!-- Reviewable:end -->
2016-05-12 05:54:06 -07:00
Filip Grzadkowski a80b1798c4 Add pod condition PodScheduled to detect situation
when scheduler tried to schedule a Pod, but failed.

Ref #24404
2016-05-12 10:21:21 +02:00
Saad Ali 4b564c95d7 Merge pull request #25325 from swagiaal/attacher-interface-update
Update Attacher/Detacher interfaces.
2016-05-11 11:36:19 -07:00