Commit Graph

3950 Commits (0c669fe6cc48208ebcdd43fa2ff425fce3c359a0)

Author SHA1 Message Date
Kubernetes Submit Queue 5b2823adb9 Merge pull request #38191 from sttts/sttts-move-master-options
Automatic merge from submit-queue

Move non-generic apiserver code out of the generic packages
2016-12-17 01:25:45 -08:00
Kubernetes Submit Queue 699964c972 Merge pull request #38836 from bprashanth/kubelet_critical
Automatic merge from submit-queue

Admit critical pods in the kubelet

Haven't verified in a live cluster yet, just unittested, so applying do-not-merge label.
2016-12-16 17:21:46 -08:00
Dr. Stefan Schimanski 3be6b3c045 pkg/apiserver: remove unused code 2016-12-16 17:47:47 +01:00
Robert Rati 91931c138e [scheduling] Moved node affinity from annotations to api fields. #35518 2016-12-16 11:42:43 -05:00
Kubernetes Submit Queue 87444522d0 Merge pull request #32088 from piosz/fluentd-daemon-set
Automatic merge from submit-queue

Migrated fluentd addon to daemon set

fix #23224
supersedes #23306 

``` release-note
Migrated fluentd addon to daemon set
```
2016-12-15 23:04:40 -08:00
bprashanth b7409e0038 Sort critical pods before admission 2016-12-15 18:58:13 -08:00
bprashanth afd676d94c Kubelet admits critical pods even under memory pressure 2016-12-15 18:58:09 -08:00
Mike Danese 8fdec87d19 bazel: fix some unit tests 2016-12-15 18:36:22 -08:00
Kubernetes Submit Queue 1981a654a4 Merge pull request #38711 from wojtek-t/get_with_options_in_kubelet
Automatic merge from submit-queue (batch tested with PRs 38803, 38711)

Use Get from cache in apiserver in kubelet

Ref #37473
2016-12-15 05:56:17 -08:00
Piotr Szczesniak c00e57789d Added upgrade story from manifest pod to ds 2016-12-15 13:48:32 +01:00
Kubernetes Submit Queue f49442d433 Merge pull request #38502 from resouer/fix-wrong-comment
Automatic merge from submit-queue (batch tested with PRs 38154, 38502)

Wrong comment to describe docker version

The original comment about minimal docker version fo `room_score_adj` is wrong (though the code is right).

Really sorry for misleading :/
2016-12-14 14:21:53 -08:00
Kubernetes Submit Queue d8efc779ed Merge pull request #38154 from caesarxuchao/rename-release_1_5
Automatic merge from submit-queue (batch tested with PRs 38154, 38502)

Rename "release_1_5" clientset to just "clientset"

We used to keep multiple releases in the main repo. Now that [client-go](https://github.com/kubernetes/client-go) does the versioning, there is no need to keep releases in the main repo. This PR renames the "release_1_5" clientset to just "clientset", clientset development will be done in this directory.

@kubernetes/sig-api-machinery @deads2k 

```release-note
The main repository does not keep multiple releases of clientsets anymore. Please find previous releases at https://github.com/kubernetes/client-go
```
2016-12-14 14:21:51 -08:00
Chao Xu 03d8820edc rename /release_1_5 to /clientset 2016-12-14 12:39:48 -08:00
Harry Zhang 07d1736077 Wrong comment to describe docker version 2016-12-14 08:52:51 +00:00
Kubernetes Submit Queue 6893017b39 Merge pull request #38430 from freehan/cri-docker-network
Automatic merge from submit-queue (batch tested with PRs 38689, 38743, 38734, 38430)

apply sandbox network mode based on network plugin

This allows CRI to use docker's network bridge. Can be combined with noop network plugin. This allows to use docker0 with no further configuration. Good for tools like minikube/hyperkube.
2016-12-13 21:25:36 -08:00
Kubernetes Submit Queue c40404ae9a Merge pull request #38435 from timstclair/remotecmd-refactor
Automatic merge from submit-queue

Refactor remotecommand options parsing

Prerequisite to https://github.com/kubernetes/kubernetes/issues/36187 - This separates the options from the request, so they can be pulled from elsewhere.

/cc @liggitt
2016-12-13 18:12:15 -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
Kubernetes Submit Queue 63cf217b92 Merge pull request #38347 from euank/remove-extra-hn-check
Automatic merge from submit-queue (batch tested with PRs 38727, 38726, 38347, 38348)

kubelet: remove redundant hostNetwork helper

Trivial cleanup.
2016-12-13 17:31:51 -08:00
Tim St. Clair bc3ade7454
Refactor remotecommand options parsing 2016-12-13 16:09:23 -08:00
Minhan Xia 04c3757a06 apply sandbox network mode based on network plugin 2016-12-13 16:00:23 -08:00
Wojciech Tyczynski 6e336bfab6 Use Get from cache in apiserver in kubelet 2016-12-13 17:14:56 +01:00
Dan Winship c788793868 Port remaining code to pkg/util/version 2016-12-13 08:53:24 -05:00
Kubernetes Submit Queue 8abbedae54 Merge pull request #38315 from mikedanese/pin-gazel
Automatic merge from submit-queue

Pin gazel to a version and support cgo

This fixes the bazel build.

@krousey who is buildcop
2016-12-12 19:32:29 -08:00
Kubernetes Submit Queue 22db6c99a7 Merge pull request #38589 from runcom/fix-ImageStatus-comment
Automatic merge from submit-queue

CRI: fix ImageStatus comment

**What this PR does / why we need it**:

GRPC cannot encode `nil` (CRI-O itself panic while trying to encode `nil` for `ImageStatus`). This PR fixes `ImageStatus` comment to say that when the image does not exist the call returns a response having `Image` set to `nil` (instead of saying implementors should return `nil` directly).

/cc @mrunalp @vishh @feiskyer 

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
```

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-12-12 17:30:11 -08:00
Mike Danese c87de85347 autoupdate BUILD files 2016-12-12 13:30:07 -08:00
Kubernetes Submit Queue f12eda8777 Merge pull request #38457 from resouer/fix-cgroup-cri
Automatic merge from submit-queue (batch tested with PRs 38419, 38457, 38607)

Fix pod level QoS does not works on CRI dockershim

Fixes: https://github.com/kubernetes/kubernetes/issues/38458

We did set `CgroupParent ` in `CreateContainer`, but the `HostConfig.Resources` which `CgroupParent` belongs to is override by the following code:

```
hc.CgroupParent = lc.GetCgroupParent()

...

hc.Resources = dockercontainer.Resources{
	Memory:     rOpts.GetMemoryLimitInBytes(),
...
}
```

That's why `HostConfig.CgroupParent` is always empty and pod level QoS does not work.
2016-12-12 12:48:07 -08:00
Kubernetes Submit Queue 12147a3cd6 Merge pull request #38630 from ncdc/fix-threshold-notifier-build-tags
Automatic merge from submit-queue (batch tested with PRs 38453, 36672, 38629, 34966, 38630)

Fix threshold notifier build tags

Fix threshold notifier build tags so the linux version is only built if cgo is
enabled, and the unsupported version is built if it's either not linux or not
cgo.
2016-12-12 11:41:12 -08:00
Andy Goldstein 89ea5ac9c1 Fix threshold notifier build tags
Fix threshold notifier build tags so the linux version is only built if cgo is
enabled, and the unsupported version is built if it's either not linux or not
cgo.
2016-12-12 11:56:07 -05:00
Seth Jennings a40b15d8bd error in setNodeStatus func should not abort node status update 2016-12-12 09:29:24 -06:00
Kubernetes Submit Queue 07312ee4b5 Merge pull request #38527 from derekwaynecarr/reduce-max-wait-time
Automatic merge from submit-queue

Fail kubelet is runtime is unresponsive for 30 seconds

Fixes https://github.com/kubernetes/kubernetes/issues/30534
2016-12-11 20:29:19 -08:00
Antonio Murdaca fba6e0a625
CRI: fix ImageStatus comment
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-12-11 18:43:41 +01:00
Kubernetes Submit Queue b72c006eb3 Merge pull request #34554 from derekwaynecarr/quota-storage-class
Automatic merge from submit-queue (batch tested with PRs 37270, 38309, 37568, 34554)

Ability to quota storage by storage class

Adds the ability to quota storage by storage class.
1. `<storage-class>.storageclass.storage.k8s.io/persistentvolumeclaims` - quota the number of claims with a specific storage class
2. `<storage-class>.storageclass.storage.k8s.io/requests.storage` - quota the cumulative request for storage in a particular storage class.

For example:

```
$ cat quota.yaml
apiVersion: v1
kind: ResourceQuota
metadata:
  name: storage-quota
spec:
  hard:
    requests.storage: 100Gi
    persistentvolumeclaims: 100
    gold.storageclass.storage.k8s.io/requests.storage: 50Gi
    gold.storageclass.storage.k8s.io/persistentvolumeclaims: 5
    silver.storageclass.storage.k8s.io/requests.storage: 75Gi
    silver.storageclass.storage.k8s.io/persistentvolumeclaims: 10
    bronze.storageclass.storage.k8s.io.kubernetes.io/requests.storage: 100Gi
    bronze.storageclass.storage.k8s.io/persistentvolumeclaims: 15
$ kubectl create -f quota.yaml
$ cat pvc-bronze.yaml
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  generateName: pvc-bronze-
  annotations:
    volume.beta.kubernetes.io/storage-class: "bronze"
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 8Gi
$ kubectl create -f pvc-bronze.yaml
$ kubectl get quota storage-quota -o yaml
apiVersion: v1
kind: ResourceQuota
...
status:
  hard:
    bronze.storageclass.storage.k8s.io/persistentvolumeclaims: "15"
    bronze.storageclass.storage.k8s.io/requests.storage: 100Gi
    gold.storageclass.storage.k8s.io/persistentvolumeclaims: "5"
    gold.storageclass.storage.k8s.io/requests.storage: 50Gi
    persistentvolumeclaims: "100"
    requests.storage: 100Gi
    silver.storageclass.storage.k8s.io/persistentvolumeclaims: "10"
    silver.storageclass.storage.k8s.io/requests.storage: 75Gi
  used:
    bronze.storageclass.storage.k8s.io/persistentvolumeclaims: "1"
    bronze.storageclass.storage.k8s.io/requests.storage: 8Gi
    gold.storageclass.storage.k8s.io/persistentvolumeclaims: "0"
    gold.storageclass.storage.k8s.io/requests.storage: "0"
    persistentvolumeclaims: "1"
    requests.storage: 8Gi
    silver.storageclass.storage.k8s.io/persistentvolumeclaims: "0"
    silver.storageclass.storage.k8s.io/requests.storage: "0"
```
2016-12-09 14:11:21 -08:00
Derek Carr af6c8a2479 Reduce max container runtime wait time 2016-12-09 16:40:13 -05:00
Kubernetes Submit Queue 43233caaf0 Merge pull request #37871 from Random-Liu/use-patch-in-kubelet
Automatic merge from submit-queue (batch tested with PRs 36692, 37871)

Use PatchStatus to update node status in kubelet.

Fixes https://github.com/kubernetes/kubernetes/issues/37771.

This PR changes kubelet to update node status with `PatchStatus`.

@caesarxuchao @ymqytw told me that there is a limitation of current `CreateTwoWayMergePatch`, it doesn't support primitive type slice which uses strategic merge.
* I checked the node status, the only primitive type slices in NodeStatus are as follows, they are not using strategic merge:
  * [`ContainerImage.Names`](https://github.com/kubernetes/kubernetes/blob/master/pkg/api/v1/types.go#L2963)
  * [`VolumesInUse`](https://github.com/kubernetes/kubernetes/blob/master/pkg/api/v1/types.go#L2909)
* Volume package is already [using `CreateStrategicMergePath` to generate node status update patch](https://github.com/kubernetes/kubernetes/blob/master/pkg/controller/volume/attachdetach/statusupdater/node_status_updater.go#L111), and till now everything is fine. 

@yujuhong @dchen1107 
/cc @kubernetes/sig-node
2016-12-09 11:29:11 -08:00
Derek Carr 459a7a05f1 Ability to quota storage by storage class 2016-12-09 13:26:59 -05:00
Harry Zhang 9170e94e2d Fix cgroupParent is wrongly set in dockershim 2016-12-09 09:22:05 +00:00
Wojciech Tyczynski aa7da5231f Update bazel files 2016-12-09 09:42:02 +01:00
Wojciech Tyczynski e8d1cba875 GetOptions in client calls 2016-12-09 09:42:01 +01:00
Kubernetes Submit Queue e0c6b99e25 Merge pull request #36887 from hex108/pullImage
Automatic merge from submit-queue (batch tested with PRs 38432, 36887, 38415)

Add --image-pull-stuck-timeout option  to kubelet

In this PR, add --image-pull-stuck-time option to specify the stuck timeout for pulling image.

When docker extracts image layer, there is no progress. The progress will exceed 1m if the layer is big or system is busy. It happend in our cluster, so I add above option to specify the timeout. 

Related error log:
<pre>
[... kube_docker_client.go:29] Cancel pulling image "our_registry/demo/test" because of no progress for 1m0s, latest progress "c914ad57d670": Extracting [==================>] 513.5 MB/513.5MB"
[... docker_manager.go:2254] container start failed: ErrImagePull: net/http: request canceled
</pre>
2016-12-08 20:37:55 -08:00
Kubernetes Submit Queue 362dc81d8e Merge pull request #37713 from yujuhong/log_notready_message
Automatic merge from submit-queue (batch tested with PRs 36736, 35956, 35655, 37713, 38316)

Log the condition when node becomes not ready
2016-12-08 19:51:58 -08:00
Jun Gong 036899ec98 Add --image-pull-progress-deadline option to kubelet 2016-12-09 09:28:57 +08:00
Kubernetes Submit Queue bf1afd97fb Merge pull request #38375 from Random-Liu/add-image-cache
Automatic merge from submit-queue (batch tested with PRs 36419, 38330, 37718, 38244, 38375)

Kubelet: Add image cache.

Fixes #38373.

This should be patched into 1.5.1 to solve the customer issue.

@yujuhong 
/cc @kubernetes/sig-node
2016-12-08 17:14:00 -08:00
Random-Liu beba1ebbf8 Use PatchStatus to update node status in kubelet. 2016-12-08 17:13:59 -08:00
Random-Liu 816f867c62 Add image cache. 2016-12-08 14:04:01 -08:00
Euan Kemp bcd939cb08 kuberuntime: set privileged for sandboxes 2016-12-08 13:11:16 -08:00
Euan Kemp 62148a768b CRI: add privileged to sandbox, document better
Adding the `privileged` bool to the sandbox allows runtimes, like rkt,
to make better security choices in some cases.

This also enumerates what "privileged" actually means and how it
interacts with other options (or more accurately, does not).

The documentation closely matches docker's current behavior because, so
far, that's what privileged has meant.
2016-12-08 13:11:16 -08:00
Jordan Liggitt 6819706adf
Pass addressable values to DeepCopy 2016-12-08 14:16:01 -05:00
Kubernetes Submit Queue 61242f7408 Merge pull request #35939 from xiangpengzhao/minor-cleanup
Automatic merge from submit-queue

Minor cleanup: fix typos

Fix some typos.
2016-12-08 07:41:08 -08:00
Kubernetes Submit Queue 910912ea3b Merge pull request #37364 from foxyriver/status-code
Automatic merge from submit-queue

use status code const to express http status

<!--  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**:

Using status code const to express http status.

**Special notes for your reviewer**:

**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
```
2016-12-07 22:47:46 -08:00
Euan Kemp 15fc470343 kubelet: remove redundant hostNetwork helper
It did the same thing as the helper in kubecontainer
2016-12-07 17:24:24 -08:00