Commit Graph

27775 Commits (30eb1aa7c5a20245a29168d23df275a91230ffef)

Author SHA1 Message Date
Mike Danese 1fbf8b8f2a svcacct: move getters to use an external clientset 2018-02-27 17:20:46 -08:00
Kubernetes Submit Queue e30554bd39
Merge pull request #58029 from yguo0905/tpu-api
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

GCE: support Cloud TPU API in cloud provider

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

This PR adds the support for Cloud TPU API in GCE cloud provider.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
GCE: support Cloud TPU API in cloud provider
```

/assign @vishh 
/assign @cheftako
2018-02-27 15:58:13 -08:00
Ryan Hitchman 8aa3ca3cbb Add a few "+build linux" tags where appropriate. 2018-02-27 13:53:32 -08:00
Ryan Hitchman 0067002db8 Make a few code paths compile cleanly with 32-bit Go. 2018-02-27 13:53:32 -08:00
Ryan Hitchman e04b91facf Remove unused variables (only assigned to) from test code.
This is revealed by the go/types package, which is stricter than
the Go compiler about unused variables. See also: golang/go#8560
2018-02-27 13:45:31 -08:00
Kubernetes Submit Queue b79fe10730
Merge pull request #54739 from xiangpengzhao/handleerr
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Add FailedPostStartHook error message.

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

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

**Special notes for your reviewer**:
/cc @derekwaynecarr 
cc @lovejoy @OJezu

**Release note**:

```release-note
NONE
```
2018-02-27 13:11:39 -08:00
Kubernetes Submit Queue 3d36044a62
Merge pull request #59714 from hzxuzhonghu/clean-up-goroutinemap
Automatic merge from submit-queue (batch tested with PRs 60157, 60337, 60246, 59714, 60467). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

util/goroutinemap code cleanup

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

code cleanup

**Release note**:

```release-note
NONE
```
2018-02-27 12:05:40 -08:00
Kubernetes Submit Queue 729f691d74
Merge pull request #60246 from mtaufen/backoff-pleg
Automatic merge from submit-queue (batch tested with PRs 60157, 60337, 60246, 59714, 60467). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

backoff runtime errors in kubelet sync loop

The runtime health check can race with PLEG's first relist, and this
often results in an unnecessary 5 second wait during Kubelet bootstrap.

This change aims to improve the performance.

```release-note
NONE
```
2018-02-27 12:05:37 -08:00
Kubernetes Submit Queue b13bfc74e2
Merge pull request #60337 from verult/repd-feature-gate
Automatic merge from submit-queue (batch tested with PRs 60157, 60337, 60246, 59714, 60467). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Feature gate for regional PDs

**What this PR does / why we need it**: Adding beta feature gate around regional PD support.

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

**Special notes for your reviewer**: This feature has already been in alpha for two releases, but at the time it was not gated with a Kubernetes feature gate. Instead it was controlled by a GCE-specific alpha gate. However, there are additional changes with GCE PD StorageClass parameters that we'd like to gate as well, and this is out of scope of GCE alpha gates.

/cc @saad-ali @lavalamp
2018-02-27 12:05:33 -08:00
Kubernetes Submit Queue 5f3c3647b2
Merge pull request #60157 from msau42/topology-beta
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Update kubectl describe to print out PV node affinity

**What this PR does / why we need it**:
Print out PV NodeAffinity in kubectl describe.

Sample output:
```
Name:            example-local-pv
Labels:          foo1=bar1
                 foo2=bar2
Annotations:     <none>
Finalizers:      []
StorageClass:    local-storage
Status:          Available
Claim:
Reclaim Policy:  Delete
Access Modes:    RWO
Capacity:        5Gi
Node Affinity:
  Required Terms:
    Term 0:  kubernetes.io/hostname in [my-node]
             foo1 in [bar1, bar2]
    Term 1:  foo2 exists
Message:
Source:
    Type:  LocalVolume (a persistent volume backed by local storage on a node)
    Path:  /mnt/disks/ssd1
Events:    <none>
```

No NodeAffinity is set:
```
Name:            nfs
Labels:          <none>
Annotations:     <none>
Finalizers:      []
StorageClass:    
Status:          Available
Claim:           
Reclaim Policy:  Retain
Access Modes:    RWX
Capacity:        1Mi
Node Affinity:   <none>
Message:         
Source:
    Type:      NFS (an NFS mount that lasts the lifetime of a pod)
    Server:    10.244.1.4
    Path:      /exports
    ReadOnly:  false
Events:        <none>
```

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-02-27 11:44:52 -08:00
Zihong Zheng 6004452bed Auto-updated BUILD files 2018-02-27 11:18:11 -08:00
Zihong Zheng f6eed81f21 [kube-proxy] Mass service/endpoint info functions rename and comments 2018-02-27 11:14:02 -08:00
Zihong Zheng 06064498de [kube-proxy] Unit test for unmatched IP version 2018-02-27 11:14:02 -08:00
Zihong Zheng 95cde4fb98 [kube-proxy] Harden change tracker and proxiers for unmatched IP versions 2018-02-27 11:14:02 -08:00
Zihong Zheng 2ae45e9f1b [kube-proxy] Make the import name of utilproxy consistent 2018-02-27 11:14:02 -08:00
Zihong Zheng ca032528be [kube-proxy] Add more IP version related utils 2018-02-27 11:14:02 -08:00
Zihong Zheng dfbec1a63a [kube-proxy] Move ipv6 related funcs to utils pkg 2018-02-27 11:12:45 -08:00
Zihong Zheng b485f7b5b4 [kube-proxy] Move Service/EndpointInfo common codes to change tracker 2018-02-27 11:05:59 -08:00
Kubernetes Submit Queue c7b3e163d3
Merge pull request #60448 from Random-Liu/image-cache-return-copy
Automatic merge from submit-queue (batch tested with PRs 59365, 60446, 60448, 55019, 60431). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Let image manager return a copy of image list.

Fixes https://github.com/kubernetes/kubernetes/issues/60443.
/cc @kubernetes/sig-node-pr-reviews 

**Release note**:

```release-note
none
```
2018-02-27 10:50:41 -08:00
Kubernetes Submit Queue 249ecab74e
Merge pull request #59365 from ayushpateria/patch-sts
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fix StatefulSet set-based selector bug

**What this PR does / why we need it**:
ControllerRevisions were using selectors as the labels, in case of set-based selectors, the helper function to convert selectors to labels would break. This PR uses pod labels for ControllerRevision labels instead of selectors.
**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #59266

**Special notes for your reviewer**:
I'm trying to learn Kubernetes codebase and would be happy to make changes if anything is off.
**Release note**:

```release-note
Fix StatefulSet to work with set-based selectors.
```
2018-02-27 10:21:00 -08:00
Kubernetes Submit Queue d9da83a022
Merge pull request #60355 from CaoShuFeng/cli_example
Automatic merge from submit-queue (batch tested with PRs 60430, 60115, 58052, 60355, 60116). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

fix cli example

ref: https://github.com/kubernetes/kubernetes/pull/60210

/assign @deads2k 

**Release note**:

```release-note
NONE
```
2018-02-27 09:38:47 -08:00
Kubernetes Submit Queue 42378eab40
Merge pull request #58052 from m1093782566/nodeip-config
Automatic merge from submit-queue (batch tested with PRs 60430, 60115, 58052, 60355, 60116). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Make nodeport ip configurable

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

By default, kube-proxy accepts everything from NodePort without any filter. It can be a problem for nodes which has both public and private NICs, and people only want to provide a service in private network and avoid exposing any internal service on the public IPs.

This PR makes nodeport ip configurable.

**Which issue(s) this PR fixes**:
Closes: #21070

**Special notes for your reviewer**:

Design proposal see: https://github.com/kubernetes/community/pull/1547

Issue in feature repo: https://github.com/kubernetes/features/issues/539

**Release note**:

```release-note
Make NodePort IP addresses configurable
```
2018-02-27 09:38:44 -08:00
Kubernetes Submit Queue 0a8e5f8012
Merge pull request #60115 from davidz627/csiMountDevice
Automatic merge from submit-queue (batch tested with PRs 60430, 60115, 58052, 60355, 60116). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

CSI MountDevice/UnmountDevice Implementation

Fixes #60114

**What this PR does / why we need it**:
This PR Implements MountDevice and UnmountDevice for the CSI Plugin, the functions will call through to NodeStageVolume/NodeUnstageVolume for CSI plugins.

/sig storage

```release-note
Implements MountDevice and UnmountDevice for the CSI Plugin, the functions will call through to NodeStageVolume/NodeUnstageVolume for CSI plugins.
```
2018-02-27 09:38:40 -08:00
Kubernetes Submit Queue aa97cd3000
Merge pull request #60430 from deads2k/server-08-unit-cache
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

don't use storage cache during apiserver unit test

General apiserver unit tests don't need to test the caching storage.  It also leaks a bunch a goroutines which does bad things with race detection on and caused timeouts when upgrading etcd.

@kubernetes/sig-api-machinery-bugs 
@sttts you can try pulling this in.
@liggitt doesn't affect "normal" runtime, which is why we only see it during tests.  See relax.
2018-02-27 09:11:27 -08:00
xiangpengzhao 22ea748809 Use consts defined in api instead of defining another ones. 2018-02-28 00:40:58 +08:00
Kubernetes Submit Queue e99ec24595
Merge pull request #60440 from andrewsykim/andrewsykim/fix-char-device-mount-bug
Automatic merge from submit-queue (batch tested with PRs 60433, 59982, 59128, 60243, 60440). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

kubelet: fix bug where character device is not recognized

**What this PR does / why we need it**:
Fixes a bug where character devices are not recognized by the kubelet because we return `FileTypeBlockDev` instead of `FileTypeCharDev`.

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Related issue: https://github.com/kubernetes/kubernetes/issues/5607

**Special notes for your reviewer**:
Kubelet event for bug: https://github.com/kubernetes/kubernetes/issues/5607#issuecomment-366366340
```
Warning		FailedMount		MountVolume.SetUp failed for volume "dev-fuse" : hostPath type check failed: /dev/fuse is not a character device
```

Commit where bug was introduced: 57ead4898b 
**Release note**:
```release-note
Fixes a bug where character devices are not recongized by the kubelet
```
2018-02-27 08:25:51 -08:00
Kubernetes Submit Queue a2ddca76d2
Merge pull request #60243 from MaciekPytel/hpa_api_ext_imp
Automatic merge from submit-queue (batch tested with PRs 60433, 59982, 59128, 60243, 60440). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Implement external metric in HPA

This implement the changes to HPA introduced in https://github.com/kubernetes/kubernetes/pull/60096
2018-02-27 08:25:47 -08:00
Kubernetes Submit Queue 8d02b2b39a
Merge pull request #60433 from MaciekPytel/hpa_validation
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Validate path in external metric name

Add validation following comments on https://github.com/kubernetes/kubernetes/pull/60220
2018-02-27 07:24:40 -08:00
Kubernetes Submit Queue 117dc08afd
Merge pull request #60424 from bskiba/em-kubectl
Automatic merge from submit-queue (batch tested with PRs 59310, 60424, 60308, 60436, 60020). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Add support for external metrics in kubectl

**What this PR does / why we need it**:
Add support for metrics coming from external sources when describing or printing horizontal pod autoscaler objects. API change: #60096

@MaciekPytel @DirectXMan12 

**Release note**:
```
NONE
```
2018-02-27 07:11:43 -08:00
Jan Safranek e8a85fc0d3 Fixed log calls in VolumeManager
Use glog.Infof() instead of glog.Info()
2018-02-27 15:48:16 +01:00
Joel Smith 60c7ebf640 Fix nested volume mounts for read-only API data volumes
Since the runtime may try to create mount points within
the sandbox, it will fail if the mount point is within
a read-only API data volume, like a secret or configMap
volume.

Create any needed mount points during volume setup.
2018-02-27 07:41:39 -07:00
Maciej Pytel 4e7bc56aa2 Validate path in external metric name 2018-02-27 14:37:20 +01:00
Aleksandra Malinowska e58411c600 Implement external metrics in HPA 2018-02-27 14:10:29 +01:00
Maciej Pytel 66f4f9080d Add external metrics client to HPA rest client 2018-02-27 14:10:29 +01:00
Johannes Scheuermann 7bf7f9c79c Remove old featureGate flag 2018-02-27 14:01:45 +01:00
wackxu b3ba80b223 update bazel 2018-02-27 20:23:36 +08:00
wackxu f737ad62ed update import 2018-02-27 20:23:35 +08:00
Shyam Jeedigunta fd2ea3ff31 Make Scale() for RC poll-based until #31345 is fixed 2018-02-27 13:10:38 +01:00
wackxu a01f633e8e move fs into seperate directory to break cycle import 2018-02-27 19:58:41 +08:00
wackxu f268bb1605 merge util into one file 2018-02-27 19:58:41 +08:00
wackxu 2ca2f442ac Extract volumepathhandler into seperate directory 2018-02-27 19:58:41 +08:00
wackxu 8fe844d413 Extract recycler client into seperate directory 2018-02-27 19:58:41 +08:00
Kubernetes Submit Queue 7deaa982e8
Merge pull request #58916 from ianchakeres/ceph-nbd
Automatic merge from submit-queue (batch tested with PRs 59674, 60059, 60220, 58916, 60336). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Support rbd-nbd for mounting operations on Ceph rbd volumes

**What this PR does / why we need it**: 
This PR improves Ceph RBD support by allowing the pkg/volume/rbd to use the rbd-nbd client. This client is based on the common and broadly adopted (librados) librbd library, and it is being actively developed and maintained&nbsp;as part of the ceph upstream code base, unlike krbd.

**Which issue(s) this PR fixes**: 
Fixes https://github.com/kubernetes/kubernetes/issues/32266

**Special notes for your reviewer**:
rbd-nbd will be used for Ceph rbd volumes if rbd fails.

Some inspiration was pulled from these PRs #38936 & #55866.

**Test Description**: Tested against a k8s cluster with centos/7 as the host os. rbd-nbd installed from package rbd-nbd-10.2.3.rpm.

Tested:
1. Fall-through to current rbd map/unmap when no rbd-nbd tools are found.
2. Map/Unmap through rbd-nbd.
3. Detecting image already mapped to a nbd device and skipping additional mapping.
4. Detecting image already mapped to a rbd device and skipping additional mapping through nbd.
5. Unmap in hosts having mixed rbd and nbd devices (caused by fall-throughs for some images).
6. Map failure in rbd-nbd due to missing image.
7. Map failure in rbd-nbd due to unreachable mon.
8. Fall-through to current rbd map when rbd-nbd map fails for any reason.


**Release note**:

```release-note
K8s supports rbd-nbd for Ceph rbd volume mounts.
```
2018-02-27 03:31:42 -08:00
Kubernetes Submit Queue 1eb1c00c44
Merge pull request #59674 from jennybuckley/codegen
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

code-gen: output golint compliant 'Generated by' comment

New PR instead of reopening #58115 because /reopen did not work.
This won't be ready to merge until the upstream https://github.com/kubernetes/gengo/pull/94 merges. Once that merges, the second commit will be changed to godep-save.sh and update-staging-godeps.sh, and the last commit will be changed to update-all.sh

The failing test is due to the upstream changes not being merged yet

```devel-release-note
Go code generated by the code generators will now have a comment which allows them to be easily identified by golint
```

Fixes #56489
2018-02-27 02:47:05 -08:00
Kubernetes Submit Queue 9c57bf74b3
Merge pull request #60187 from humblec/error-util
Automatic merge from submit-queue (batch tested with PRs 60427, 60361, 60364, 58625, 60187). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Avoid explicit mention of glusterfs in error strings.

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>



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

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

**Special notes for your reviewer**:

**Release note**:

```release-note

```
2018-02-27 01:34:34 -08:00
Kubernetes Submit Queue 6eabef4a7a
Merge pull request #58625 from screeley44/aws-block-update2
Automatic merge from submit-queue (batch tested with PRs 60427, 60361, 60364, 58625, 60187). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

update aws plugin for block support

Update aws plugin to support block and volumeMode.

cc @jsafrane @mtanino @msau42 

```release-note
AWS EBS volume plugin got block volume support
```
2018-02-27 01:34:30 -08:00
Kubernetes Submit Queue 56ce616e5b
Merge pull request #60364 from dixudx/kubectl_common_flags_bind
Automatic merge from submit-queue (batch tested with PRs 60427, 60361, 60364, 58625, 60187). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

kubectl: flag value bindings for common utils

**What this PR does / why we need it**:
/kind cleanup
/sig cli

xxxOptions did not get bound as default value for some flags.
This PR cleans those flag bindings in common utils library.

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

**Special notes for your reviewer**:
/assign @deads2k 
**Release note**:

```release-note
None
```
2018-02-27 01:34:26 -08:00
Kubernetes Submit Queue 38b61e2914
Merge pull request #60361 from dixudx/kubectl_l2v_flags_bind
Automatic merge from submit-queue (batch tested with PRs 60427, 60361, 60364, 58625, 60187). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

flag value bindings for kubectl label/patch/taint/top commands

**What this PR does / why we need it**:
/kind cleanup
/sig cli

xxxOptions did not get bound as default value for some flags.
This PR cleans those flag bindings for `kubectl label/patch/taint/top` commands.

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

**Special notes for your reviewer**:
/assign @deads2k
**Release note**:

```release-note
None
```
2018-02-27 01:34:22 -08:00
zhangxiaoyu-zidif 44aeb56eab fix nodenames slices comparison para. 2018-02-27 15:54:45 +08:00
Kubernetes Submit Queue e30b6634c3
Merge pull request #60367 from NickrenREN/admission-sc-dir-change
Automatic merge from submit-queue (batch tested with PRs 60011, 59256, 59293, 60328, 60367). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Move `storageclass` into  `storage` package under `plugin/pkg/admission`

We have two directories `storage` and `storageclass` under package `plugin/pkg/admission` and one subdir `storageobjectinuseprotection` of `storage` now.
- 1. Move `storageclass` into  `storage` being  `storage`'s sub-package since storageclass is one of the storage objects
- 2. fix golint failures

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

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

**Special notes for your reviewer**:

**Release note**:
```release-note
NONE
```
2018-02-26 23:47:59 -08:00
Kubernetes Submit Queue 3039a7792e
Merge pull request #60328 from Random-Liu/fix-pod-stats
Automatic merge from submit-queue (batch tested with PRs 60011, 59256, 59293, 60328, 60367). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Add CPU/Memory pod stats for CRI stats.

For https://github.com/kubernetes/features/issues/286.

Add CPU and memory stats for pod.

@kubernetes/sig-node-pr-reviews 
/cc @dashpole @yujuhong @abhi @yguo0905 
Signed-off-by: Lantao Liu <lantaol@google.com>



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

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

**Special notes for your reviewer**:

**Release note**:

```release-note
Summary API will include pod CPU and Memory stats for CRI container runtime.
```
2018-02-26 23:47:56 -08:00
Kubernetes Submit Queue 7c67e4d7ab
Merge pull request #60011 from justaugustus/use-utils-int32-ptr
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Use `Int32Ptr` function from utils instead of self-written versions

**What this PR does / why we need it**:
Replaces instances of newInt{,32} with `Int32Ptr` function from `k8s.io/kubernetes/pkg/util/pointer`

**Which issue(s) this PR fixes**:
Fixes #59971

**Release note**:

```release-note
NONE
```
2018-02-26 23:34:35 -08:00
Kubernetes Submit Queue 205ec1e97d
Merge pull request #60147 from aledbf/remove-cassandra
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Remove cassandra example.

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

Removes duplicated content from this repository and `kubernetes/examples`

https://github.com/kubernetes/examples/tree/master/cassandra

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-02-26 22:34:15 -08:00
Yang Guo 3aca71e162 GCE: support Cloud TPU API in cloud provider 2018-02-26 22:09:35 -08:00
Kubernetes Submit Queue 5e10b13f7e
Merge pull request #59958 from ixdy/bzl-boilerplate
Automatic merge from submit-queue (batch tested with PRs 50724, 59025, 59710, 59404, 59958). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Require boilerplate on Bazel Skylark source files

**What this PR does / why we need it**: `.bzl` files are also source code, so they should probably have the boilerplate text too.

**Release note**:

```release-note
NONE
```
2018-02-26 21:34:45 -08:00
Kubernetes Submit Queue 89e433fca1
Merge pull request #59404 from ohmystack/docker-mem-swap
Automatic merge from submit-queue (batch tested with PRs 50724, 59025, 59710, 59404, 59958). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

dockertools: disable MemorySwap on Linux

In this commit, set `MemorySwap` the same with `Memory` to prevent using swap on Linux.

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

In #39731, @pires tried to disable swap on Linux by setting `MemorySwap` to 0.
However, according to [Docker's docs](https://docs.docker.com/config/containers/resource_constraints/#--memory-swap-details), setting `MemorySwap` to 0 is treated as unset, and its [default behavior](https://github.com/moby/moby/blob/v17.05.0-ce/daemon/daemon_unix.go#L266-L269) is to set to twice the size of `Memory`, which can still cause the container to use the swap.

**Which issue(s) this PR fixes** :

This issue was mentioned in this comment: https://github.com/kubernetes/kubernetes/issues/7294#issuecomment-362722637

**Special notes for your reviewer**:

1. For the case on Windows, we can still use the 0 because [Windows does not support `MemorySwap`](https://github.com/moby/moby/blob/v17.05.0-ce/daemon/daemon_windows.go#L185-L187).
2. There is another place using the `DefaultMemorySwap()` is for [sandbox](https://github.com/kubernetes/kubernetes/blob/v1.9.2/pkg/kubelet/dockershim/docker_sandbox.go#L505).
Maybe setting the sandbox's `MemorySwap` to 0 is fine. I didn't change that.

**Release note**:

```release-note
dockertools: disable memory swap on Linux.
```
2018-02-26 21:34:42 -08:00
Kubernetes Submit Queue 68f496d50f
Merge pull request #59710 from sailingwithoutwind/fix/some-typo
Automatic merge from submit-queue (batch tested with PRs 50724, 59025, 59710, 59404, 59958). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

some typo

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

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

**Special notes for your reviewer**:

**Release note**:

```release-note

```
2018-02-26 21:34:38 -08:00
Kubernetes Submit Queue 97b9271abd
Merge pull request #59025 from ggaaooppeenngg/add-err-in-ensure-check
Automatic merge from submit-queue (batch tested with PRs 50724, 59025, 59710, 59404, 59958). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Add detailed err in ensure docker process error

Signed-off-by: Peng Gao <peng.gao.dut@gmail.com>



**What this PR does / why we need it**:
Add detailed error.
**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-02-26 21:34:32 -08:00
Kubernetes Submit Queue b684a282e5
Merge pull request #50724 from allencloud/fix-incorrect-comparison-log
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

fix incorrect comparison in /pkg/volume error message

Signed-off-by: allencloud <allen.sun@daocloud.io>



**What this PR does / why we need it**:
This PR fixes incorrect error message when there is comparison.

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

**Special notes for your reviewer**:
NONE

**Release note**:

```release-note
NONE
```
2018-02-26 20:34:37 -08:00
Kubernetes Submit Queue 2966cdaa12
Merge pull request #58559 from mlmhl/volumemanager_cleanup
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

use GetUniqueVolumeNameFromSpec instead of implementing it manually for kubelet volume manager

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

`volumeName` is only used for attachable plugin, so we should resolve it inside the `if` statement. Besides, we can use the already exist `GetUniqueVolumeNameFromSpec` mthod instead of invoking `GetVolumeName` and `GetUniqueVolumeName` manually.

**Release note**:

```release-note
NONE
```

/sig storage
/kind cleanup
2018-02-26 19:34:22 -08:00
jianglingxia 334c9f43d3 Delete the Redundant define tc 2018-02-27 11:08:48 +08:00
Kubernetes Submit Queue 3ca89a3469
Merge pull request #60125 from vainu-arto/aws-missing-tags-error
Automatic merge from submit-queue (batch tested with PRs 60435, 60334, 60458, 59301, 60125). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Return missing ClusterID error instead of ignoring it

This fixes issue #57382. In the cases I'm aware of kubelet cannot function if it can't detect the cluster it is running in, so the error should be passed up to the caller preventing initialization when kubelet would fail. This way the error can be detected and kubelet startup attempted again later (giving AWS time to apply the tags).

```release-note
On AWS kubelet returns an error when started under conditions that do not allow it to work (AWS has not yet tagged the instance).
```
2018-02-26 17:48:54 -08:00
Kubernetes Submit Queue 1902a18c88
Merge pull request #59301 from dcbw/dockershim-stop-sandbox-no-ip
Automatic merge from submit-queue (batch tested with PRs 60435, 60334, 60458, 59301, 60125). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

dockershim: don't check pod IP in StopPodSandbox

We're about to tear the container down, there's no point.  It also suppresses
an annoying error message due to kubelet stupidity that causes multiple
parallel calls to StopPodSandbox for the same sandbox.

docker_sandbox.go:355] failed to read pod IP from plugin/docker: NetworkPlugin cni failed on the status hook for pod "docker-registry-1-deploy_default": Unexpected command output nsenter: cannot open /proc/22646/ns/net: No such file or directory

1) A first StopPodSandbox() request triggered by SyncLoop(PLEG) for
a ContainerDied event calls into TearDownPod() and thus the network
plugin.  Until this completes, networkReady=true for the
sandbox.

2) A second StopPodSandbox() request triggered by SyncLoop(REMOVE)
calls PodSandboxStatus() and calls into the network plugin to read
the IP address because networkReady=true

3) The first request exits the network plugin, sets networReady=false,
and calls StopContainer() on the sandbox.  This destroys the network
namespace.

4) The second request finally gets around to running nsenter but
the network namespace is already destroyed.  It returns an error
which is logged by getIP().

```release-note
NONE
```
@yujuhong @freehan
2018-02-26 17:48:50 -08:00
jennybuckley c8dacd8e63 Run hack/update-all.sh 2018-02-26 17:16:14 -08:00
Manuel de Brito Fontes 02370e529b
Remove cassandra example 2018-02-26 20:39:07 -03:00
Cheng Xing bb0f819d0b Adding beta feature flag for regional PDs. 2018-02-26 15:28:23 -08:00
Kubernetes Submit Queue e491689ef9
Merge pull request #60301 from tnozicka/fix-recreate
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fix Deployment with Recreate strategy not to wait on Pods in terminal phase

**What this PR does / why we need it**:
Fixes Deployment with Recreate strategy not to wait on Pods in terminal phase. It can happen after eviction or failing to match selector and RS leaves such pod around right now. (Hopefully RC gets fixed separately.) 

**Which issue(s) this PR fixes** *:
Fixes https://github.com/kubernetes/kubernetes/issues/60162

**Special notes for your reviewer**:

**Release note**:

```release-note
Fixes a case when Deployment with recreate strategy could get stuck on old failed Pod.
```

/cc @janetkuo
2018-02-26 15:00:49 -08:00
David Zhu cbd18965fd Added MountDevice/UnmountDevice pass-through to NodeStageVolume/NodeUnstageVolume for CSI Volume Plugin. Added related unit tests. Vendored CSI Spec to HEAD 2018-02-26 14:50:32 -08:00
andrewsykim d856a97da1 fix bug where character devices are not recognized 2018-02-26 17:18:05 -05:00
Lantao Liu 3688650a6b Add CPU/Memory pod stats for CRI stats.
Signed-off-by: Lantao Liu <lantaol@google.com>
2018-02-26 19:29:47 +00:00
Lantao Liu 1fb91cc8be Let image manager return a copy of image list. 2018-02-26 19:19:18 +00:00
Beata Skiba d003550bd2 Differentiate between target and target average value 2018-02-26 18:46:43 +01:00
Kubernetes Submit Queue 2b77b8f1ad
Merge pull request #60370 from jianglingxia/jlx-fc2018
Automatic merge from submit-queue (batch tested with PRs 57326, 60076, 60293, 59756, 60370). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

FIX the os.Stat() func in volume file/kind bug

**What this PR does / why we need it**:
FIX the os.Stat() func has two same and delete one
**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-02-26 09:20:52 -08:00
Kubernetes Submit Queue 98b1c79e2b
Merge pull request #59756 from tsmetana/refactor-describe-volume
Automatic merge from submit-queue (batch tested with PRs 57326, 60076, 60293, 59756, 60370). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fix #59601: AWS: Check error code returned from describeVolume

The errors returned by the describeVolume call are not all equal:
if the error is of InvalidVolume.NotFound type it does not necessarily
mean the desired operation cannot be finished successfully.

Fixes #59601

```release-note
NONE
```
2018-02-26 09:20:49 -08:00
Kubernetes Submit Queue c0383763ea
Merge pull request #60293 from tenxcloud/fix_volume_cache_grammar_error
Automatic merge from submit-queue (batch tested with PRs 57326, 60076, 60293, 59756, 60370). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fix grammar issues and improve log in volume cache code

**What this PR does / why we need it**:
Fix grammar issues and improve log in volume cache code

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-02-26 09:20:46 -08:00
Kubernetes Submit Queue 05425f0826
Merge pull request #60256 from danwinship/review-iptables-stuff
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

add me to iptables/kube-proxy reviewers

kube-proxy needs reviewers!
2018-02-26 07:50:58 -08:00
Kubernetes Submit Queue a6797824f2
Merge pull request #60307 from deads2k/cli-09-rebreak-filter
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

rebreak the filter

Pull https://github.com/kubernetes/kubernetes/pull/60117/commits fixed a bug in the filtering code which was actually being exploited to get inconsistent printing behavior. This reverts the commit that "fixed" the inconsistency and adjusts the test back to the equivalent, pre-printing fixes.

/assign @soltysh 


```release-note
NONE
```
2018-02-26 07:50:44 -08:00
m1093782566 2edc97bf17 fix static checks 2018-02-26 23:49:26 +08:00
m1093782566 9bb4807e25 update bazel 2018-02-26 23:48:48 +08:00
m1093782566 df7df811a4 auto generated codes 2018-02-26 23:48:48 +08:00
m1093782566 b498a33927 userspace part changes 2018-02-26 23:48:48 +08:00
m1093782566 c537ff54e7 ipvs part implementation 2018-02-26 23:48:47 +08:00
m1093782566 ddfa04e8f4 iptables part implementation 2018-02-26 23:48:47 +08:00
m1093782566 bf565305ee create netwowrk interface util 2018-02-26 23:48:46 +08:00
m1093782566 dbcb2c9b27 validate nodeport-addresses 2018-02-26 23:48:46 +08:00
m1093782566 bc850adce4 add nodeport-addresses flag for kube-proxy 2018-02-26 23:48:46 +08:00
David Eads 8526ce7de3 don't use storage cache during apiserver unit test 2018-02-26 10:46:47 -05:00
Ian Chakeres 110447844d Use rbd-nbd if present for rbd volume map and unmap operations, if rbd fails. 2018-02-26 07:06:07 -08:00
Kubernetes Submit Queue fbf4546000
Merge pull request #60369 from jianglingxia/jlx-201802241854
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Delete the two same if in func TestPlugin

**What this PR does / why we need it**:
Delete the two same if in func TestPlugin
**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-02-26 06:28:03 -08:00
Scott Creeley 53c6ea6d48 update aws plugin for block support 2018-02-26 09:08:21 -05:00
David Eads f9a884d3f5 adjust filtered object test to reflect old weird behavior 2018-02-26 08:08:47 -05:00
David Eads a1b7785e2e Revert "fix resource filter for generic printers on get"
This reverts commit 799a0bf410.
2018-02-26 08:05:05 -05:00
Beata Skiba afe1724695 Add support for external metrics in kubectl 2018-02-26 13:54:35 +01:00
Arto Jantunen cba110aa3d Return missing ClusterID error instead of ignoring it
This fixes issue #57382.
2018-02-26 14:50:58 +02:00
Arto Jantunen a58f16bdfa Add clusterid tags to the instances in AWS tests
In practice these were in most cases required to exist, but kubelet did not
previously enforce this. It now does, so these tests need to change a bit.
2018-02-26 14:50:58 +02:00
Kubernetes Submit Queue 2aed8d7a6d
Merge pull request #58710 from screeley44/gce-block-update2
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

update GCE plugin for block support

update GCE plugin for block volume support

cc @gnufied @mtanino @jsafrane 
```release-note
GCE PD volume plugin got block volume support
```
2018-02-26 04:39:13 -08:00
Kubernetes Submit Queue d866cf4b1c
Merge pull request #60387 from jianglingxia/jlx-plugintest
Automatic merge from submit-queue (batch tested with PRs 60396, 60384, 60395, 60387, 60260). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

correct the expected value in plugintest

**What this PR does / why we need it**:
correct the expected value and got value
**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-02-26 00:01:40 -08:00
Kubernetes Submit Queue bf8cda56c9
Merge pull request #60395 from jianglingxia/jlx-2018022609
Automatic merge from submit-queue (batch tested with PRs 60396, 60384, 60395, 60387, 60260). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Delete two same if judgement in photon_pd

**What this PR does / why we need it**:
Delete two same if in photon_pd
**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-02-26 00:01:37 -08:00
Kubernetes Submit Queue d0e36e0770
Merge pull request #60396 from zouyee/ss-1
Automatic merge from submit-queue (batch tested with PRs 60396, 60384, 60395, 60387, 60260). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

statefulset validate collisionCount

**What this PR does / why we need it**:
 validate statefulset collisionCount

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


**Special notes for your reviewer**:

**Release note**:

```NONE

```
2018-02-26 00:01:32 -08:00
Kubernetes Submit Queue 753a60f300
Merge pull request #59182 from fancyuan/patch-1
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

fix a typo in pkg/apis/core/fuzzer/fuzzer.go

**What this PR does / why we need it**:
fix a typo in pkg/apis/core/fuzzer/fuzzer.go

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

**Release note**:
`NONE`
2018-02-25 22:26:19 -08:00