Commit Graph

29767 Commits (b0af0f68b102e37df474c4c21fa46935850f824b)

Author SHA1 Message Date
Kubernetes Submit Queue 0757e05e78
Merge pull request #64368 from justinsb/ccm_instanceid_fix
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>.

ccm: recognize InstanceNotFound from InstanceID

Otherwise we won't actually delete Nodes in this code path.

```release-note
NONE
```
2018-06-02 04:48:38 -07:00
Kubernetes Submit Queue 54900d77be
Merge pull request #64519 from vladimirvivien/csi-gRPC-Conn-fix
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>.

CSI fix for gRPC conn leak

**What this PR does / why we need it**:
This PR is a bug fix for leaky gRPC connection that never closes (see issue #64341 for detail)

**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 #64341

This fix was originally started with PR https://github.com/kubernetes/kubernetes/pull/64380

```release-note
NONE
```
2018-06-02 03:58:46 -07:00
Dr. Stefan Schimanski 7066141277 printers: add deepcopy tests to generated tables 2018-06-02 09:56:15 +00:00
Dr. Stefan Schimanski dc5866a781 conversions: don't mutate in.ObjectMeta.Annotations 2018-06-02 09:44:45 +00:00
Dr. Stefan Schimanski ebbfaf3869 printers: fix json types – int64 is only allowed integer
We have the invariant in apimachinery that all integers in JSON are int64.
We panic on other types on deepcopy and possibly at other occasions.
2018-06-02 09:43:20 +00:00
Kubernetes Submit Queue 1ac591e663
Merge pull request #64562 from andrewsykim/ccm-handle-errs
Automatic merge from submit-queue (batch tested with PRs 64057, 63223, 64346, 64562, 64408). 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>.

cloud node controller: improve error handling for node registration

**What this PR does / why we need it**:
Improves error handling for (external) node registration.

**Release note**:
```release-note
NONE
```
2018-06-02 02:10:14 -07:00
Kubernetes Submit Queue a0a4cc73db
Merge pull request #63223 from k82cn/kep548_working
Automatic merge from submit-queue (batch tested with PRs 64057, 63223, 64346, 64562, 64408). 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>.

Schedule DaemonSet Pods in scheduler.

Signed-off-by: Da K. Ma <klaus1982.cn@gmail.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)*:
part of #59194

**Special notes for your reviewer**:

**Release note**:

```release-note
`ScheduleDaemonSetPods` is an alpha feature (since v1.11) that causes DaemonSet Pods
to be scheduler by default scheduler, instead of Daemonset controller. When it is enabled,
the `NodeAffinity` term (instead of `.spec.nodeName`) is added to the DaemonSet Pods;
this enables the default scheduler to bind the Pod to the target host. If node affinity
of DaemonSet Pod already exists, it will be replaced.

DaemonSet controller will only perform these operations when creating DaemonSet Pods;
and those operations will only modify the Pods of DaemonSet, no changes are made to the
`.spec.template` of DaemonSet.
```
2018-06-02 02:10:08 -07:00
Kubernetes Submit Queue c58dbc882d
Merge pull request #64057 from freehan/pod-ready-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>.

Pod Ready++ API

**What this PR does / why we need it**: 
Implements API changes for [pod ready++](https://github.com/kubernetes/community/blob/master/keps/sig-network/0007-pod-ready%2B%2B.md)

```release-note
NONE
```

/assign @MrHohn for review
/assign @thockin for approval
2018-06-02 01:26:14 -07:00
Yecheng Fu 40c3937320 Clean up fake mounters. 2018-06-02 15:55:19 +08:00
Di Xu acabdcb96a apply global flag "context" for kubectl config view 2018-06-02 13:31:58 +08:00
Kubernetes Submit Queue 2aced6d9e4
Merge pull request #63248 from andyzhangx/formatAndMount-windows
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 formatAndMount func issue on Windows

**What this PR does / why we need it**:
disk format code is missing in formatAndMount func on Windows, currently it only has mount related code:
b87a392b1a/pkg/util/mount/mount_windows.go (L356-L377)

format code is now here, which is not correct(invoked in `azuredisk.WaitForAttach` operation, it's not correct, these code should be in `formatAndMount` func and invoked by `MountDevice` operation finally)
b87a392b1a/pkg/volume/azure_dd/azure_common_windows.go (L100-L117)

**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 #63236 

**Special notes for your reviewer**:
This is the first PR,  in second PR, I will remove disk format code in azure_common_windows.go
b87a392b1a/pkg/volume/azure_dd/azure_common_windows.go (L100-L117)

Also need to mention that there would not be issue if  following command invoked twice(by `WaitForAttach` and `formatAndMount`)
```
Get-Disk -Number 4 | Where partitionstyle -eq 'raw' | Initialize-Disk -PartitionStyle MBR -PassThru  | New-Partition -AssignDriveLetter -UseMaximumSize | Format-Volume -FileSystem ntfs -Confirm:$false
```
**Release note**:

```
fix formatAndMount func issue on Windows
```

/sig windows
/assign @rootfs 
cc @msau42
2018-06-01 21:25:57 -07:00
Kubernetes Submit Queue 91b9b62ae8
Merge pull request #64189 from alinbalutoiu/master
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 Windows CNI for the sandbox case

**What this PR does / why we need it**:
Windows supports both sandbox and non-sandbox cases. The non-sandbox
case is for Windows Server 2016 and for Windows Server version greater
than 1709 which use Hyper-V containers.

Currently, the CNI on Windows fetches the IP from the containers
within the pods regardless of the mode. This should be done only
in the non-sandbox mode where the IP of the actual container
will be different than the IP of the sandbox container.

In the case where the sandbox container is supported, all the containers
from the same pod will share the network details of the sandbox container.

This patch updates the CNI to fetch the IP from the sandbox container
when this mode is supported.

**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 #64188

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-06-01 20:32:28 -07:00
Di Xu 5ebd40cb6a bind alpha feature network plugin flags correctly 2018-06-02 11:31:01 +08:00
Jordan Liggitt 7da3d65571
Avoid deadlock in gc resync if available resources change during sync 2018-06-01 21:16:51 -04:00
Da K. Ma 8180e1e60f Eanbled schedule DaemonSet Pods by default scheduler. 2018-06-02 08:39:13 +08:00
Da K. Ma faaa485b35 Updated helper funcs to use nodename. 2018-06-02 08:38:58 +08:00
Lantao Liu 9677616eaf Address comments in #64006.
Signed-off-by: Lantao Liu <lantaol@google.com>
2018-06-01 17:25:56 -07:00
Chao Xu 29d72a7134 GC fallback to jsonmerge patch when SMP is not supported 2018-06-01 16:50:07 -07:00
Minhan Xia 792f03b1d2 validation and feature gate 2018-06-01 16:20:41 -07:00
Minhan Xia bfa9c1091e make update 2018-06-01 16:19:15 -07:00
Minhan Xia 10465ee4a7 add ReadinessGates in pod spec 2018-06-01 16:19:14 -07:00
Hemant Kumar 1f9404dfc0 Implement kubelet side changes for writing volume limit to node
Add tests for checking node limits
2018-06-01 19:17:30 -04:00
Hemant Kumar cf282203c3 Implement volume plugin changes for volume limits 2018-06-01 19:17:30 -04:00
Hemant Kumar a0a9ccfa87 Implement scheduler changes for volume limits 2018-06-01 19:17:31 -04:00
Hemant Kumar 45fb31ec07 Implement API changes needed for dynamic volume limits
define alpha feature and make api changes
2018-06-01 19:17:25 -04:00
Eric Chiang 2069827239
generated:
./hack/update-bazel.sh
	./hack/update-codegen.sh
	./hack/update-staging-godeps.sh
2018-06-01 14:28:07 -07:00
Tim Allclair ce730d96b7
GitRepo command hardening 2018-06-01 12:42:53 -07:00
Tim Allclair d5e05ca2ce
Validate git args are not flags prior to mounting 2018-06-01 12:42:48 -07:00
Kubernetes Submit Queue 38d2dc7068
Merge pull request #64447 from jsafrane/block-provision
Automatic merge from submit-queue (batch tested with PRs 63348, 63839, 63143, 64447, 64567). 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 block volume support to internal provisioners.

**What this PR does / why we need it**:
Internal provisioners now create filesystem PVs when block PVs are requested. This leads to unbindable PVCs.

In this PR, volume plugins that support block volumes provision block PVs when block is requested. All the other provisioners return clear error in `kubectl describe pvc`:

```
Events:
  Type     Reason              Age               From                         Message
  ----     ------              ----              ----                         -------
  Warning  ProvisioningFailed  7s (x2 over 18s)  persistentvolume-controller  Failed to provision volume with StorageClass "standard": kubernetes.io/cinder does not support block volume provisioning

```

```release-note
NONE
```

cc @kubernetes/vmware for vsphere changes
cc @andyzhangx for Azure changes

/assign @copejon @mtanino
2018-06-01 12:12:23 -07:00
Kubernetes Submit Queue d2495b8329
Merge pull request #63143 from jsafrane/containerized-subpath
Automatic merge from submit-queue (batch tested with PRs 63348, 63839, 63143, 64447, 64567). 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>.

Containerized subpath

**What this PR does / why we need it**:
Containerized kubelet needs a different implementation of `PrepareSafeSubpath` than kubelet running directly on the host.

On the host we safely open the subpath and then bind-mount `/proc/<pidof kubelet>/fd/<descriptor of opened subpath>`.

With kubelet running in a container, `/proc/xxx/fd/yy` on the host contains path that works only inside the container, i.e. `/rootfs/path/to/subpath` and thus any bind-mount on the host fails.

Solution:
- safely open the subpath and gets its device ID and inode number
- blindly bind-mount the subpath to `/var/lib/kubelet/pods/<uid>/volume-subpaths/<name of container>/<id of mount>`. This is potentially unsafe, because user can change the subpath source to a link to a bad place (say `/run/docker.sock`) just before the bind-mount.
- get device ID and inode number of the destination. Typical users can't modify this file, as it lies on /var/lib/kubelet on the host.
- compare these device IDs and inode numbers.

**Which issue(s) this PR fixes**
Fixes #61456

**Special notes for your reviewer**:

The PR contains some refactoring of `doBindSubPath` to extract the common code. New `doNsEnterBindSubPath` is added for the nsenter related parts.

**Release note**:

```release-note
NONE
```
2018-06-01 12:12:19 -07:00
Kubernetes Submit Queue 5710943612
Merge pull request #63839 from wgliang/master.movepkg
Automatic merge from submit-queue (batch tested with PRs 63348, 63839, 63143, 64447, 64567). 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 pkg/scheduler/schedulercache -> pkg/scheduler/cache

**What this PR does / why we need it**:
Move pkg/scheduler/schedulercache -> pkg/scheduler/cache

**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 #63813

**Special notes for your reviewer**:

In order to prevent name conflicts still rename the `cache` to `schedulercache`.

**Release note**:

```release-note
NONE
```
2018-06-01 12:12:15 -07:00
Dr. Stefan Schimanski 1db0024ec9 apiextensions: add ObjectMeta schema validation and pruning 2018-06-01 17:43:07 +00:00
Antoine Pelisse 000510d9b7 Replace openapi Fake with kube-openapi version
There are two version of this fake class, let's just use that one
version.
2018-06-01 09:50:05 -07:00
vikaschoudhary16 f2eeb087e9 Add feature gate for kubelet plugin watcher 2018-06-01 04:42:30 -04:00
Kubernetes Submit Queue 8d10a8f74f
Merge pull request #64006 from Random-Liu/streaming-auth
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 proxy for container streaming in kubelet for streaming auth.

For https://github.com/kubernetes/kubernetes/issues/36666, option 2 of https://github.com/kubernetes/kubernetes/issues/36666#issuecomment-378440458.

This PR:
1. Removed the `DirectStreamingRuntime`, and changed `IndirectStreamingRuntime` to `StreamingRuntime`. All `DirectStreamingRuntime`s, `dockertools` and `rkt`, were removed.
2. Proxy container streaming in kubelet instead of returning redirect to apiserver. This solves the container runtime authentication issue, which is what we agreed on in https://github.com/kubernetes/kubernetes/issues/36666.

Please note that, this PR replaced the redirect with proxy directly instead of adding a knob to switch between the 2 behaviors. For existing CRI runtimes like containerd and cri-o, they should change to serve container streaming on localhost, so as to make the whole container streaming connection secure.

 If a general authentication mechanism proposed in https://github.com/kubernetes/kubernetes/issues/62747 is ready, we can switch back to redirect, and all code can be found in github history.

Please also note that this added some overhead in kubelet when there are container streaming connections. However, the actual bottleneck is in the apiserver anyway, because it does proxy for all container streaming happens in the cluster. So it seems fine to get security and simplicity with this overhead. @derekwaynecarr @mrunalp Are you ok with this? Or do you prefer a knob?

@yujuhong @timstclair @dchen1107 @mikebrow @feiskyer 
/cc @kubernetes/sig-node-pr-reviews 
**Release note**:

```release-note
Kubelet now proxies container streaming between apiserver and container runtime. The connection between kubelet and apiserver is authenticated. Container runtime should change streaming server to serve on localhost, to make the connection between kubelet and container runtime local.

In this way, the whole container streaming connection is secure. To switch back to the old behavior, set `--redirect-container-streaming=true` flag.
```
2018-05-31 22:45:29 -07:00
Kubernetes Submit Queue 54d869220d
Merge pull request #64431 from wojtek-t/fix_taint_controller
Automatic merge from submit-queue (batch tested with PRs 59938, 63777, 64577, 63999, 64431). 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>.

Parallelize taint manager

Helps with problem described in https://github.com/kubernetes/kubernetes/issues/63030#issuecomment-392690351
2018-05-31 21:29:20 -07:00
Kubernetes Submit Queue 4993d01be1
Merge pull request #63999 from mikedanese/validatetr
Automatic merge from submit-queue (batch tested with PRs 59938, 63777, 64577, 63999, 64431). 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>.

svcacct: validate min and max expiration seconds on TokenRequest

stop gap https://github.com/kubernetes/kubernetes/pull/63653
```release-note
TokenRequests now are required to have an expiration duration between 10 minutes and 2^32 seconds.
```
2018-05-31 21:29:17 -07:00
Kubernetes Submit Queue d922a4e497
Merge pull request #64577 from gnufied/rename-online-resize-feature-gate
Automatic merge from submit-queue (batch tested with PRs 59938, 63777, 64577, 63999, 64431). 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>.

Rename online resizine feature gate

This was left as a unaddressed comment from https://github.com/kubernetes/kubernetes/pull/62460

cc @saad-ali 
/sig storage

```release-note
None
```
2018-05-31 21:29:14 -07:00
Vladimir Vivien d6d396215e CSI fix for gRPC conn leak, test updates 2018-05-31 23:05:41 -04:00
Kubernetes Submit Queue 440b2b6ea7
Merge pull request #61077 from islinwb/fix_ipvs_warninfo
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>.

Init ipvsInterface only when ipvs modules are present

**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 #61074 

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-05-31 20:01:26 -07:00
RaviSantosh Gudimetla 872addf9e3
Revert "Remove rescheduler and corresponding tests from master" 2018-05-31 22:18:49 -04:00
hangaoshuai c3ee2802e4 fix bug excludeCIDRs was not assign in func NewProxier 2018-06-01 09:27:55 +08:00
Lou Yihua c3c7c59407 Fix some log issues in flexvolume 2018-06-01 08:58:37 +08:00
Kubernetes Submit Queue 26caa84d09
Merge pull request #63445 from ericchiang/deprecate-git-repo-volume
Automatic merge from submit-queue (batch tested with PRs 63445, 63820). 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>.

core v1: deprecate the gitRepo volume type

gitRepo stopped accepting new features nearly 2 years ago https://github.com/kubernetes/kubernetes/issues/17676#issuecomment-228650586 and today this behavior can easily be achieved through an init container. The kubelet shelling out to git in the host namespace can also be a security issue on un-trusted repos, as was demonstrated by [CVE-2017-1000117](https://groups.google.com/forum/#!topic/kubernetes-announce/CTLXJ74cu8M). Our own documentation even alludes to this volume type being removed in the future:

> In the future, such volumes may be moved to an even more decoupled model, rather than extending the Kubernetes API for every such use case.

https://kubernetes.io/docs/concepts/storage/volumes/#gitrepo

Closes https://github.com/kubernetes/kubernetes/issues/60999

```release-note-action-required
The GitRepo volume type is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod's container.
```

/release-note-action-required

Instead of this:

```yaml
apiVersion: v1
kind: Pod
metadata:
  name: server
spec:
  containers:
  - image: nginx
    name: nginx
    volumeMounts:
    - mountPath: /mypath
      name: git-volume
  volumes:
  - name: git-volume
    gitRepo:
      repository: "git@somewhere:me/my-git-repository.git"
      revision: "22f1d8406d464b0c0874075539c1f2e96c253775"
```

Do this:

```yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: git-clone
data:
  git-clone.sh: |
    #!/bin/sh -e
    git clone $1 $3
    cd $3
    git reset --hard $2
---
apiVersion: v1
kind: Pod
metadata:
  name: server
spec:
  initContainers:
  - name: git-clone
    image: alpine/git # Any image with git will do
    command:
    - /usr/local/git/git-clone.sh
    args:
    - "https://somewhere/me/my-git-repository.git"
    - "22f1d8406d464b0c0874075539c1f2e96c253775"
    - "/mypath"
    volumeMounts:
    - name: git-clone
      mountPath: /usr/local/git
    - name: git-repo
      mountPath: /mypath
  containers:
  - image: nginx
    name: nginx
    volumeMounts:
    - mountPath: /mypath
      name: git-volume
  volumes:
  - name: git-volume
    emptyDir: {}
  - name: git-clone
    configMap:
      name: git-clone
      defaultMode: 0755
```
2018-05-31 16:20:07 -07:00
Lantao Liu 746c32db4c Update bazel. 2018-05-31 15:26:32 -07:00
Lantao Liu 1eb721248b Update unit test. 2018-05-31 15:26:32 -07:00
Lantao Liu 174b6d0e2f Proxy container streaming in kubelet. 2018-05-31 15:26:32 -07:00
Hemant Kumar 179e5d7006 Rename online resizine feature gate 2018-05-31 17:28:12 -04:00
Kubernetes Submit Queue 1ed8a69f51
Merge pull request #63774 from wgliang/master.test-master
Automatic merge from submit-queue (batch tested with PRs 62460, 64480, 63774, 64540, 64337). 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 subtest for table units (pkg/master)

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

Go 1.7 added the subtest feature which can make table-driven tests much easier to run and debug. Many table-driven tests in pkg/kubectl are not using this feature.

/kind cleanup

Further reading:  [Using Subtests and Sub-benchmarks](https://blog.golang.org/subtests)

**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-05-31 14:12:18 -07:00
Antoine Pelisse 178a8f87f3 openapi: Remove FakeClient from testing library
And make a simplified version of it where needed.
2018-05-31 13:44:08 -07:00
andrewsykim 4510fe48c3 cloud node controller: improve error handling for node registration 2018-05-31 16:23:41 -04:00
juanvallejo dca6912c54
remove extra "../" when copying from pod to local 2018-05-31 16:22:24 -04:00
Matt Rogers 9f3b97572a Add more kubectl auth reconcile flags
Adds --remove-extra-permissions and --remove-extra-subjects

Signed-off-by: Matt Rogers <mrogers@redhat.com>
2018-05-31 12:16:49 -04:00
Guoliang Wang 761cf41427 Move pkg/scheduler/schedulercache -> pkg/scheduler/cache 2018-05-31 22:55:34 +08:00
mlmhl ca12c73323 implement kubelet side online file system resize for volume 2018-05-31 17:10:24 +08:00
Kubernetes Submit Queue d02cf08e27
Merge pull request #64528 from MrHohn/gce-backend-service-beta
Automatic merge from submit-queue (batch tested with PRs 64364, 64369, 63819, 64528). 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 provider] More wrappers for alpha/beta backend service

**What this PR does / why we need it**:
Sorry, some more wrapper functions I missed last time.

**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 #NONE 

**Special notes for your reviewer**:
/assign @rramkumar1  

**Release note**:

```release-note
NONE
```
2018-05-30 22:54:15 -07:00
Kubernetes Submit Queue 374992a6fb
Merge pull request #63819 from mikedanese/svacctproj-api
Automatic merge from submit-queue (batch tested with PRs 64364, 64369, 63819, 64528). 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 APIs for service account volume projection

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

designed in https://github.com/kubernetes/community/pull/1973

Release note will be included in the implementation.
```release-note
NONE
```
2018-05-30 22:54:11 -07:00
Kubernetes Submit Queue a762ea1beb
Merge pull request #64364 from ravisantoshgudimetla/remove-rescheduler
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 rescheduler and corresponding tests from master

**What this PR does / why we need it**:
This is to remove rescheduler from master branch as we are promoting priority and preemption to beta.
**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Part of #57471

**Special notes for your reviewer**:
/cc @bsalamat @aveshagarwal 
**Release note**:

```release-note
Remove rescheduler from master.
```
2018-05-30 22:20:26 -07:00
Mayank Kumar a1cd3a4bcc remove redundant getKey functions from tests 2018-05-30 22:15:06 -07:00
Kubernetes Submit Queue f5254dab8a
Merge pull request #58442 from m1093782566/ipvs-ga
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>.

Declare IPVS-based kube-proxy GA and remove feature gateway

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

As discussed in sig-network meeting, we decided to target IPVS-based kube-proxy GA in 1.10.

This PR declares IPVS-based kube-proxy GA and remove feature gateway.

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

Fixes: #58443

issue in feature repo: https://github.com/kubernetes/features/issues/265

**Special notes for your reviewer**:

**Release note**:

```release-note
Declare IPVS-based kube-proxy GA
```

@quinton-hoole
2018-05-30 21:21:42 -07:00
Kubernetes Submit Queue 7a2bc5c47b
Merge pull request #64495 from hanxiaoshuai/fix0530
Automatic merge from submit-queue (batch tested with PRs 64338, 64219, 64486, 64495, 64347). 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 unused parameter in func buildFakeProxier

**What this PR does / why we need it**:
remove unused parameter in func buildFakeProxier
**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-05-30 20:17:22 -07:00
Kubernetes Submit Queue 4df4a607cd
Merge pull request #64486 from mtaufen/cleanup-unused-status-message
Automatic merge from submit-queue (batch tested with PRs 64338, 64219, 64486, 64495, 64347). 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 unused status per TODO

This should have been deleted in #63221, as it is now unused.

```release-note
NONE
```
2018-05-30 20:17:19 -07:00
Kubernetes Submit Queue 887f8ecf4e
Merge pull request #64338 from agau4779/deprecate-gce-addr-fakes
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] use fakeGCECloud instead of gce address fakes

**What this PR does / why we need it**:
Use the fakeGCECloud mock instead of FakeCloudAddressService.

**Release note**:
```release-note
NONE
```
2018-05-30 20:09:15 -07:00
Guoliang Wang f15a0fc0da use subtest for table units (pkg/master) 2018-05-31 10:10:20 +08:00
Kubernetes Submit Queue a1c8d3f5f3
Merge pull request #64403 from jsafrane/aws-read-only-attach
Automatic merge from submit-queue (batch tested with PRs 57082, 64325, 64016, 64443, 64403). 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>.

Allow AWS EBS volumes to be attached as ReadOnly.

**Which issue(s) this PR fixes**
Fixes #64402

**Special notes for your reviewer**:
This follows logic e.g. in Cinder volume plugin.

**Release note**:

```release-note
AWS EBS volumes can be now used as ReadOnly in pods.
```

/sig storage
/sig aws
2018-05-30 18:49:23 -07:00
Kubernetes Submit Queue 3e127ccbef
Merge pull request #57082 from tianshapjq/small-nit-container/os.go
Automatic merge from submit-queue (batch tested with PRs 57082, 64325, 64016, 64443, 64403). 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>.

small nit in the annotations of pkg/kubelet/container/os.go

**What this PR does / why we need it**:
just a small nit in the annotations of container/os.go, but, it looks quite uncomfortable cause others all get right.
2018-05-30 18:49:10 -07:00
Kubernetes Submit Queue b5d21a92ad
Merge pull request #64339 from liztio/pronouns
Automatic merge from submit-queue (batch tested with PRs 61803, 64305, 64170, 64361, 64339). 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 some unnecessarily gendered pronouns in comments

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

A bunch of comments are unnecessarily gendered. I've changed them to gender-neutral they/theirs.

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-05-30 17:34:25 -07:00
Kubernetes Submit Queue e978c47f5e
Merge pull request #64170 from mtaufen/cap-node-num-images
Automatic merge from submit-queue (batch tested with PRs 61803, 64305, 64170, 64361, 64339). 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 a flag to control the cap on images reported in node status

While I normally try to avoid adding flags, this is a short term
scalability fix for v1.11, and there are other long-term solutions in
the works, so we shouldn't commit to this in the v1beta1 Kubelet config.
Flags are our escape hatch here.

```release-note
NONE
```
2018-05-30 17:34:18 -07:00
Kubernetes Submit Queue 89dd3316d8
Merge pull request #64305 from hzxuzhonghu/fix-toleration-validation
Automatic merge from submit-queue (batch tested with PRs 61803, 64305, 64170, 64361, 64339). 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 toleration validation invalid error

Fixes #64301

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-05-30 17:34:15 -07:00
Mike Danese dc9e3f1b3e svcacct: validate min and max expiration seconds on TokenRequest 2018-05-30 17:32:49 -07:00
Kubernetes Submit Queue ea92879fab
Merge pull request #62306 from freehan/pod-status-patch2
Automatic merge from submit-queue (batch tested with PRs 58920, 58327, 60577, 49388, 62306). 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 Patch instead of Put to sync pod status

ref: https://github.com/kubernetes/community/blob/master/keps/sig-network/0007-pod-ready%2B%2B.md
```release-note
Use Patch instead of Put to sync pod status
```
2018-05-30 16:09:36 -07:00
Kubernetes Submit Queue 6b2fc7cb75
Merge pull request #49388 from HotelsDotCom/feature/Dynamic-env-in-subpath
Automatic merge from submit-queue (batch tested with PRs 58920, 58327, 60577, 49388, 62306). 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>.

Dynamic env in subpath - Fixes Issue 48677

**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 #48677

**Special notes for your reviewer**:

**Release note**:

```release-note
Adds the VolumeSubpathEnvExpansion alpha feature to support environment variable expansion
Sub-paths cannot be mounted with a dynamic volume mount name.
This fix provides environment variable expansion to sub paths
This reduces the need to manage symbolic linking within sidecar init containers to achieve the same goal  
```
2018-05-30 16:09:31 -07:00
Kubernetes Submit Queue 53fd4cd46d
Merge pull request #58327 from sharmaansh/patch-2
Automatic merge from submit-queue (batch tested with PRs 58920, 58327, 60577, 49388, 62306). 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>.

Replace error string with const
2018-05-30 16:09:24 -07:00
Eric Chiang 759e74cca0
core v1: deprecate the gitRepo volume type 2018-05-30 15:20:08 -07:00
Kubernetes Submit Queue 595059bb65
Merge pull request #62991 from tomoe/cronjob-prune
Automatic merge from submit-queue (batch tested with PRs 64281, 62991). 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>.

Whitelist CronJob for kubectl apply --prune

**What this PR does / why we need it**:
Support CronJob for kubectl apply --prune

**Special notes for your reviewer**: N/A

**Release note**:

```release-note
kubectl apply --prune supports CronJob resource. 
```
2018-05-30 13:24:09 -07:00
Michael Taufen 0539086ff3 add a flag to control the cap on images reported in node status
While I normally try to avoid adding flags, this is a short term
scalability fix for v1.11, and there are other long-term solutions in
the works, so we shouldn't commit to this in the v1beta1 Kubelet config.
Flags are our escape hatch.
2018-05-30 12:54:30 -07:00
Zihong Zheng fdc58eb891 [gce provider] More wrappers for alpha/beta backend service 2018-05-30 12:29:42 -07:00
Minhan Xia 85e0d05ac7 add utils for pod condition 2018-05-30 11:33:55 -07:00
Minhan Xia 78b86333c1 make update 2018-05-30 11:33:55 -07:00
Minhan Xia cb9ac04777 fix unit tests using Patch in fake client 2018-05-30 11:33:55 -07:00
Kubernetes Submit Queue 65573739fe
Merge pull request #64516 from soltysh/fix_error
Automatic merge from submit-queue (batch tested with PRs 64318, 64269, 64438, 64516, 64311). 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 error message to be consistent with others

**Special notes for your reviewer**:
/assign @juanvallejo 

**Release note**:
```release-note
NONE
```
2018-05-30 11:25:25 -07:00
Kubernetes Submit Queue 990892184f
Merge pull request #64438 from dixudx/cli_rollout_name
Automatic merge from submit-queue (batch tested with PRs 64318, 64269, 64438, 64516, 64311). 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>.

include rollout object name in cli message

**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 #64331

**Special notes for your reviewer**:
/cc soltysh 
 
**Release note**:

```release-note
None
```
2018-05-30 11:25:21 -07:00
Kubernetes Submit Queue 5aa513429b
Merge pull request #64318 from gonzolino/os-lbaas-addresses
Automatic merge from submit-queue (batch tested with PRs 64318, 64269, 64438, 64516, 64311). 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>.

Ensure that only IPs are used as node addresses in OpenStack LBs

**What this PR does / why we need it**:
ATM, when no InternalIP can be found for a node, the openstack cloud provider tries to create a LB with whatever is the first address it can find for the node. This could also be the hostname or a dns name.
However, LBaaS will reject anything that is not an IP address for pool members. Therefore a meaningful error should be returned instead of just returning the first address of the node, even if it is clear that this will lead to an error in LBaaS.

**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 #64317

**Special notes for your reviewer**:

**Release note**:

```release-note
Provide a meaningful error message in openstack cloud provider when no valid IP address can be found for a node
```
2018-05-30 11:25:12 -07:00
Minhan Xia 35777c31ea change kubelet status manager to use patch instead of put to update pod status 2018-05-30 11:15:47 -07:00
Minhan Xia 212a16eccc add utils to patch pod status 2018-05-30 11:15:47 -07:00
Mike Danese 514d280e2f autogenerated 2018-05-30 11:06:58 -07:00
Kubernetes Submit Queue 75517f60b9
Merge pull request #64458 from mrogers950/reconcile-dryrun-additive
Automatic merge from submit-queue (batch tested with PRs 64322, 64210, 64458, 64232, 64370). 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 dry-run flag to auth reconcile

```release-note
The --dry-run flag has been enabled for kubectl auth reconcile
```
/assign @juanvallejo 
cc @enj
2018-05-30 10:09:11 -07:00
Kubernetes Submit Queue 6b2172741d
Merge pull request #64453 from deads2k/cli-73-resourcebuidlerflags
Automatic merge from submit-queue (batch tested with PRs 63328, 64316, 64444, 64449, 64453). 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 resource builder flags API

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

This pull expands the utility of the resource builder flags and demonstrates a second use-case with `kubectl set selector`.

@kubernetes/sig-cli-maintainers 
/assign @juanvallejo 
/assign @soltysh 

```release-note
NONE
```
2018-05-30 08:42:29 -07:00
Kubernetes Submit Queue 1123e5dd82
Merge pull request #64449 from deads2k/cli-72-scrub
Automatic merge from submit-queue (batch tested with PRs 63328, 64316, 64444, 64449, 64453). 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>.

cleanup some dead kubectl code and narrow scope of helpers

Found a lot of dead code in kubectl factory that we should scrub out


/assign @soltysh 
/assign @juanvallejo 


```release-note
NONE
```
2018-05-30 08:42:24 -07:00
Kubernetes Submit Queue 1e0973db3f
Merge pull request #64444 from deads2k/cli-71-delete-change
Automatic merge from submit-queue (batch tested with PRs 63328, 64316, 64444, 64449, 64453). 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 delete result being used

fixes https://github.com/kubernetes/kubernetes/issues/64401

@nilebox pretty sure this will fix you.  Do you have an easy test to add to test-cmd?


@kubernetes/sig-cli-bugs 
/kind bug
/assign @nilebox 
/assign @soltysh 

```release-note
NONE
```
2018-05-30 08:42:20 -07:00
Kubernetes Submit Queue a2d8636559
Merge pull request #64316 from krzysied/scheduling_latency_metric
Automatic merge from submit-queue (batch tested with PRs 63328, 64316, 64444, 64449, 64453). 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>.

Fixing scheduling latency metrics

**What this PR does / why we need it**:
Allows to measure and to display scheduling latency metrics during tests. Provides new functionality of resetting scheduler latency metrics.

**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 #63493

**Special notes for your reviewer**:
E2eSchedulingLatency, SchedulingAlgorithmLatency, BindingLatency are now available 
as subtypes of OperationLatency.

**Release note**:

```release-note
NONE
```
2018-05-30 08:42:16 -07:00
Kubernetes Submit Queue 4a44cda40a
Merge pull request #63328 from vikaschoudhary16/probe-watcher-duplicate
Automatic merge from submit-queue (batch tested with PRs 63328, 64316, 64444, 64449, 64453). 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 probe based mechanism for kubelet plugin discovery

**Which issue(s) this PR fixes**
Fixes #56944 
[Design Doc](https://docs.google.com/document/d/1dtHpGY-gPe9sY7zzMGnm8Ywo09zJfNH-E1KEALFV39s/edit#heading=h.7fe6spexljh6)

**Notes For Reviewers**:
Original PR is https://github.com/kubernetes/kubernetes/pull/59963. But because of too many comments(171) that PR does not open sometimes. Therefore this new PR is created to get the github link working.
 
Related PR is https://github.com/kubernetes/kubernetes/pull/58755 
For review efficiency, separating out of the commits or original PR here. 

```release-note
Add probe based mechanism for kubelet plugin discovery
```
/sig node
/area hw-accelerators
/cc @jiayingz @RenaudWasTaken @vishh @ScorpioCPH @sjenning @derekwaynecarr @jeremyeder @lichuqiang @tengqm @saad-ali @chakri-nelluri @ConnorDoyle @vladimirvivien
2018-05-30 08:42:11 -07:00
Maciej Szulik e7e1918b11
Fix error message to be consistent with others 2018-05-30 16:41:50 +02:00
wojtekt f7cf33e218 Parallelize taint manager 2018-05-30 14:46:48 +02:00
Guoliang Wang 76059f874f Errorf format %q has arg b.labelSelector of wrong type *string 2018-05-30 17:51:17 +08:00
Krzysztof Siedlecki 0e833bfc83 Fixing scheduling latency metrics 2018-05-30 11:20:12 +02:00
hangaoshuai 31d3fa2b1a we should use Warningf instead of Warning when we are using format string 2018-05-30 16:44:23 +08:00
hangaoshuai 9d944d30a6 remove unused parameter in func buildFakeProxier 2018-05-30 15:18:07 +08:00
Kubernetes Submit Queue 15cd355281
Merge pull request #64213 from dashpole/eviction_event_annotation
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 metadata to kubelet eviction event annotations

**What this PR does / why we need it**:
Add annotations to kubelet eviction events.  Annotations include 
"offending_containers" : comma-seperated list of containers.
"offending_containers_usage": comma-seperated list of usage.
"starved_resource": v1.ResourceName of the starved resource

**Special notes for your reviewer**:
Adding annotations to events required changing the `EventRecorder` interface to add a `AnnotatedEventf` function, which can add annotations to an event.

**Release note**:
```release-note
NONE
```
/assign @dchen1107 
cc @mwielgus @schylek @kgrygiel
2018-05-29 23:37:47 -07:00
xuzhonghu 9492cf368e move oldNodeUnschedulable pkg var to kubelet struct 2018-05-30 14:09:13 +08:00
Mike Danese fd39d8277c add api for service account token volume projection 2018-05-29 21:50:05 -07:00
yue9944882 64ec40092d review: s/<unknown>/-/ 2018-05-30 12:14:11 +08:00
m1093782566 674a31e4d6 remove ipvs feature gateway 2018-05-30 10:43:16 +08:00
Michael Taufen 665f166c29 remove unused status per TODO
This should have been deleted in #63221, as it is now unused.
2018-05-29 17:34:00 -07:00
ravisantoshgudimetla aeccffc339 Phase out rescheduler in favor of priority and preemption 2018-05-29 19:52:06 -04:00
Kubernetes Submit Queue c6e0a225f9
Merge pull request #64155 from figo/master
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>.

improve test: verify kubelet.config.Restore only happen once

**What this PR does / why we need it**:
This patch is to add additional test coverage of pod config restore, 
it verifies that restore can only happen once.

in the second restore attempt, we should expect no error and no channel update.

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

this is a test improvement based on test been added at https://github.com/kubernetes/kubernetes/pull/63553


**Special notes for your reviewer**:

**Release note**:

```release-note
None
```

/sig node
/cc @rphillips @jiayingz @vikaschoudhary16 @anfernee @Random-Liu  @dchen1107  @derekwaynecarr 
@vishh @yujuhong @tallclair
2018-05-29 16:17:28 -07:00
Lantao Liu aeb6cacf01 Remove direct and indirect streaming runtime interface. 2018-05-29 15:08:15 -07:00
Matt Rogers 20cd94de17 Add dry-run to auth reconcile
Signed-off-by: Matt Rogers <mrogers@redhat.com>
2018-05-29 16:28:46 -04:00
Jonathan Basseri ba08b05e28 Rename equiv. class invalidation functions.
Change the invalidation functions to have cleaner and more consistent
names.
2018-05-29 11:23:13 -07:00
Jonathan Basseri 5d13798e5c Change the return of EquivalenceClass.lookupResult.
This makes the lookup behave like a normal map lookup, so it is easier
for readers to follow the logic. It also inverts the "invalid" bool to
an "ok" bool because `!invalid` is a double negative.
2018-05-29 11:22:02 -07:00
Jonathan Basseri 9b06870620 Clean up names and comments in equivalence cache. 2018-05-29 11:22:02 -07:00
David Eads 4b836d77d5 update set selector to use resource builder flags 2018-05-29 12:47:19 -04:00
David Eads 207e9d1d90 cleanup some dead kubectl code and narrow scope of helpers 2018-05-29 12:44:53 -04:00
Monis Khan 631124cde4
Correctly apply request transforms with flattened resource builder
This change moves the NewClientWithOptions call into
Builder.getClient.  Since getClient is the only way for Builder and
its visitors to create a RESTClient, we can reasonably guarantee
that the request transforms will be honored.  Previously, it was
possible for a call to NewFlattenListVisitor to return resource Info
objects whose Client field did not honor the request transforms.

Signed-off-by: Monis Khan <mkhan@redhat.com>
2018-05-29 12:22:57 -04:00
Kevin Taylor b2d4426f09 Add dynamic environment variable substitution to subpaths 2018-05-29 17:01:09 +01:00
vikaschoudhary16 3a2e3bcc70 Add probe based mechanism for kubelet plugin discovery 2018-05-29 12:00:37 -04:00
vikaschoudhary16 401bab3642 Auto-generated files 2018-05-29 12:00:37 -04:00
David Eads 9c5bdd4b5c add resource builder flags 2018-05-29 10:46:54 -04:00
Guoliang Wang 9449a4372e cleanup some dead kubelet code 2018-05-29 22:38:01 +08:00
David Eads cb09607536 fix the delete result being used 2018-05-29 08:34:47 -04:00
Kubernetes Submit Queue 07e6410cf7
Merge pull request #64375 from nilebox/delete-wait-cleanup
Automatic merge from submit-queue (batch tested with PRs 64300, 64375). 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>.

Declare kubectl wait flag in a way consistent with other deletion flags

**What this PR does / why we need it**:
A follow up PR for #64034 and #63979 that makes declaring wait flag consistent with the other flags.

**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 #64401

**Special notes for your reviewer**:

**Release note**:

```release-note

```
2018-05-29 04:22:10 -07:00
Di Xu 1b1c2d1264 include rollout object name in cli message 2018-05-29 18:07:41 +08:00
Jan Safranek 08564f203e Add block volume support to internal provisioners. 2018-05-29 12:02:40 +02:00
Kubernetes Submit Queue 4a7a18653c
Merge pull request #63885 from soltysh/get_unmarshal
Automatic merge from submit-queue (batch tested with PRs 64392, 63885). 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 unnecessary roundtripping in get.go

/assign @deads2k @juanvallejo 

**Release note**:
```release-note
NONE
```
2018-05-29 00:28:14 -07:00
Kubernetes Submit Queue 60d72f1d2e
Merge pull request #64367 from justinsb/fix_instancenotfound
Automatic merge from submit-queue (batch tested with PRs 64308, 64367, 64165, 64274). 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>.

Restore InstanceNotFound comment & logic

Otherwise node deregistration is broken on AWS.

```release-note
NONE
```
2018-05-28 18:20:08 -07:00
Nail Islamov 6f1b178ed7
Declare wait flag in way consistent with other deletion flags 2018-05-29 08:19:06 +10:00
Kubernetes Submit Queue 881c3cf508
Merge pull request #64324 from cofyc/fix62102
Automatic merge from submit-queue (batch tested with PRs 64399, 64324, 64404, 64406, 64396). 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>.

Should use `hostProcMountinfoPath` constant in nsenter_mount.go.

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

In nsenter mounter implementation, we should read mountinfo from `/rootfs/proc/1/mountinfo` instead of `/proc/self/mountinfo`.

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

`/proc/self/mountinfo` will prefix `/rootfs` on mount point path, see

```
$ mkdir /mnt/test
$ mount -t tmpfs tmpfs /mnt/test/
$ docker run -it --volume=/:/rootfs:ro,rslave --net=host --pid=host --privileged=true busybox:latest cat /rootfs/proc/1/mountinfo | grep '\/mnt\/test'
442 25 0:80 / /mnt/test rw,relatime shared:70 - tmpfs tmpfs rw
$ docker run -it --volume=/:/rootfs:ro,rslave --net=host --pid=host --privileged=true busybox:latest cat /proc/self/mountinfo | grep '\/mnt\/test'
1075 985 0:80 / /rootfs/mnt/test rw,relatime master:70 - tmpfs tmpfs rw
```

**Release note**:

```release-note
NONE
```
2018-05-28 15:06:17 -07:00
Jan Safranek 8ff0fff065 Allow AWS EBS volumes to be attached as ReadOnly. 2018-05-28 16:24:19 +02:00
John Calabrese d1abc5c824 use subtest for table units
employ consitent table var naming

  - https://github.com/kubernetes/kubernetes/pull/63659#discussion_r187736533
2018-05-28 09:33:42 -04:00
David Eads c85e69aeb9
remove unnecessary factory delegation for RESTClientGetter method 2018-05-28 15:12:41 +02:00
Kubernetes Submit Queue 4da73a5f3d
Merge pull request #64390 from soltysh/builder_flags
Automatic merge from submit-queue (batch tested with PRs 64383, 64356, 64390). 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>.

Builder flags

Rebased version of https://github.com/kubernetes/kubernetes/pull/64277.
2018-05-28 06:01:09 -07:00
Kubernetes Submit Queue cf27c256ea
Merge pull request #64383 from andyzhangx/azurefile-sizegrow-fix
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 azure file size grow issue

**What this PR does / why we need it**:
fix azure file size grow issue

**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 #64382

**Special notes for your reviewer**:

**Release note**:

```
fix azure file size grow issue
```

/sig azure
/assign @feiskyer
2018-05-28 05:23:59 -07:00
Kubernetes Submit Queue 85f9108df1
Merge pull request #63964 from islinwb/update_ipvs_docs
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 ipvs docs --- check the prerequisite

**What this PR does / why we need it**:
As #63850 have been merged, the `Prerequisite` should be updated.

**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-05-28 04:24:30 -07:00
Kubernetes Submit Queue 9f280b6739
Merge pull request #64326 from andrewsykim/default-disable-pvl
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>.

disable PersistentVolumeLabel admission controller by default

**What this PR does / why we need it**:
Disables PersisntVolumeLabel admission controller by default. This was set for [deprecation since 1.8](https://github.com/kubernetes/kubernetes/pull/52618) so we can now disable it by default. PersisntVolumeLabel admission controller can still be explicitly enabled and can also run on external cloud controller manageres. 

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

https://github.com/kubernetes/kubernetes/issues/52617

**Special notes for your reviewer**:

**Release note**:

```release-note
(ACTION REQUIRED) PersisntVolumeLabel admission controller is now disabled by default. If you depend on this feature (AWS/GCE) then ensure it is added to the `--enable-admission-plugins` flag on the kube-apiserver.
```
2018-05-28 03:19:17 -07:00
Kubernetes Submit Queue d089901e46
Merge pull request #64349 from nicksardo/fix-nodeport-alloc
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 nodeport repair for ESIPP services

**What this PR does / why we need it**:
The nodeport allocation repair controller does not scrape the `Service.Spec.healthCheckNodePort` value and would remove the allocation from memory and etcd after 10 minutes.  This opens the door for other services to use the same nodeport and cause collisions. 

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

**Release note**:
```release-note
Fix issue of colliding nodePorts when the cluster has services with externalTrafficPolicy=Local
```
2018-05-28 02:21:43 -07:00
yue9944882 dc2184f69f print nodes for those metrics is somehow unreachable 2018-05-28 17:12:37 +08:00
juanvallejo b4af3a4ffb
move filename flags to genericclioptions 2018-05-28 11:09:51 +02:00
juanvallejo d463bbddb1
move resource builder flags to genericclioptions 2018-05-28 11:08:58 +02:00
andyzhangx e330741d6d fix azure file size grow issue 2018-05-28 02:46:18 +00:00
Kubernetes Submit Queue b9e46f5422
Merge pull request #64374 from deads2k/scale-client
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>.

move scaleClient from factory

rebase https://github.com/kubernetes/kubernetes/pull/64287

```release-note
NONE
```
2018-05-27 13:03:21 -07:00
Ward Loos e1e0591364 Don't reset global timeout on each for loop iteration 2018-05-27 20:26:37 +02:00
Maciej Szulik 7495ab5229 Remove Generators from Factory 2018-05-27 11:14:05 -04:00
juanvallejo 3895887f5e move scaleClient from factory 2018-05-27 11:07:36 -04:00
Kubernetes Submit Queue be43b7cc9d
Merge pull request #64352 from Random-Liu/clean-limit-writer
Automatic merge from submit-queue (batch tested with PRs 64355, 64328, 64352). 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 unused limit writer.

All container runtimes are integrated through CRI now. Write limit is handled in https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/kuberuntime/logs/logs.go now.

Signed-off-by: Lantao Liu <lantaol@google.com>

@yujuhong @feiskyer @kubernetes/sig-node-pr-reviews 

**Release note**:

```release-note
none
```
2018-05-27 04:08:09 -07:00
Justin Santa Barbara ec12fe1e84 ccm: recognize InstanceNotFound from InstanceID
Otherwise we won't actually delete Nodes in this code path.
2018-05-26 22:29:36 -07:00
Justin Santa Barbara 3988331c6c Restore InstanceNotFound comment & logic
Otherwise node registration is broken on AWS.
2018-05-26 21:54:15 -07:00
Guoliang Wang bae074ef38 use subtest for table units (pkg/kubectl) 2018-05-27 10:04:55 +08:00
David Eads 4815ec409f collapse into one factory 2018-05-26 18:47:44 -04:00
Kubernetes Submit Queue d057795f3b
Merge pull request #64278 from silveryfu/master
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>.

Adding tests for ImageLocalityPriority

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

This PR adds tests for ImageLocalityPriority scheduling policy, as follow-ups of [#63842](https://github.com/kubernetes/kubernetes/issues/63842) and [#63345](https://github.com/kubernetes/kubernetes/issues/63345). It includes the unit test for ImageSizes function of NodeInfo in the scheduler cache.

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

@resouer 

**Release note**:

```release-note
NONE
```
2018-05-26 12:46:57 -07:00
Kubernetes Submit Queue 2cb7ab012b
Merge pull request #62984 from feiskyer/klet-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 cgroups-per-qos for Windows

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

cgroups-per-qos and enforce-node-allocatable is not supported on Windows, but kubelet allows it on Windows. And then Pods may stuck in terminating state because of it. Refer #61716.

This PR adds validation for them and make kubelet refusing to start in this case.

**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 #61716

**Special notes for your reviewer**:

**Release note**:

```release-note
Fail fast if cgroups-per-qos is set on Windows
```
2018-05-26 03:03:13 -07:00
Kubernetes Submit Queue 39be1048f6
Merge pull request #64343 from MrHohn/security-policy-wrapper
Automatic merge from submit-queue (batch tested with PRs 64288, 64343). 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 provider] Add more wrappers for security policy

**What this PR does / why we need it**:
Adding more wrappers for security policy, mostly for implementing the e2e test.

**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 #NONE 

**Special notes for your reviewer**:
/assign @nicksardo 

**Release note**:

```release-note
NONE
```
2018-05-26 02:11:04 -07:00
Kubernetes Submit Queue 9872a0502b
Merge pull request #64288 from gnufied/take-volume-resize-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>.

Move volume resize feature to beta

Move volume resizing feature to beta. 

xref https://github.com/kubernetes/features/issues/284

```release-note
Move Volume expansion to Beta
```
2018-05-26 01:34:17 -07:00
Kubernetes Submit Queue 5f578f3385
Merge pull request #63979 from soltysh/drop_reapers
Automatic merge from submit-queue (batch tested with PRs 63859, 63979). 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>.

Drop reapers

/assign @deads2k @juanvallejo 

**Release note**:
```release-note
kubectl delete does not use reapers for removing objects anymore, but relies on server-side GC entirely
```
2018-05-26 00:32:11 -07:00
Kubernetes Submit Queue 5e88401cb3
Merge pull request #63859 from frobware/signal-fun
Automatic merge from submit-queue (batch tested with PRs 63859, 63979). 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 signal handler registration from pkg/kubelet

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

The goal of this change is to remove the registration of signal
handling from pkg/kubelet (i.e., library code). 
 
If you register a signal handler in `main()` to aid in a controlled
and deliberate exit then the handler registered in `pkg/kubelet` often
wins and the process exits immediately. This means all other signal
handler registrations are currently racy if `DockerServer.Start()` is
directly or indirectly invoked.

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

This change also removes another signal handler registration from
`NewAPIServerCommand()`; a stop channel is now passed to this
function.

**Release note**:
2018-05-26 00:32:08 -07:00
Haowei Cai 5ebcdb33ff generated 2018-05-25 17:13:44 -07:00
Haowei Cai 98496fa511 POSTing rollback returns deploymentstatus 2018-05-25 17:13:39 -07:00
Lantao Liu 7c17ee25ec Remove unused limit writer.
Signed-off-by: Lantao Liu <lantaol@google.com>
2018-05-25 16:55:08 -07:00
Zihong Zheng 19d7006d6b [gce provider] Update auto-generated codes 2018-05-25 16:43:28 -07:00
Zihong Zheng 332a3e8467 [gce provider] Add more wrapper for securiti policy 2018-05-25 16:43:28 -07:00
Nick Sardo c05e89d0e5 Fix nodeport repair for ESIPP services 2018-05-25 16:09:16 -07:00
Ashley Gau cf393d7a7b remove gce_address_fakes.go from BUILD file 2018-05-25 15:24:17 -07:00
liz ffeca16101
Remove some unnecessarily gendered pronouns in comments 2018-05-25 17:48:17 -04:00
Ashley Gau a96c5f2884 mocks must return true in order to trigger err 2018-05-25 14:33:33 -07:00
Ashley Gau 069062365a use fakeGCECloud instead of gce address fakes 2018-05-25 14:19:00 -07:00
Maciej Szulik b8b4c7c81b
Handle DaemonSet removal the old way 2018-05-25 22:18:10 +02:00
Maciej Szulik 383872615d
Remove kubectl reapers 2018-05-25 22:18:05 +02:00
Hemant Kumar 0dd6e75567 Move volume resizing to beta
Update bootstrap policies
2018-05-25 15:32:38 -04:00
andrewsykim 4c3fa4f9ba disable PersistentVolumeLabel admission controller by default 2018-05-25 12:37:56 -04:00
Yecheng Fu 28b6f34107 Should use `hostProcMountinfoPath` constant in nsenter_mount.go. 2018-05-26 00:09:25 +08:00
Kubernetes Submit Queue 880dbd339b
Merge pull request #64231 from twilfong/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>.

Update function hasClusterTag to fix issue #64230

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

Fixes issue #64230, by changing function hasClusterTag, in aws/tags.go, to ensure that, when called with a list of tags containing a tag with a key which matches clusterTagKey, function will return true even if a tag with key TagNameKubernetesClusterLegacy also exists in the list with a value other than the ClusterID.

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

**Special notes for your reviewer**:
Notes are in issue

**Release note**:
```release-note
NONE
```
2018-05-25 09:01:00 -07:00
Kubernetes Submit Queue a176a8b1b7
Merge pull request #64134 from wgliang/master.remove-from-factory2
Automatic merge from submit-queue (batch tested with PRs 63232, 64257, 64183, 64266, 64134). 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 SuggestedPodTemplateResources from factory to set_resources

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

Move SuggestedPodTemplateResources from factory to set_resources

**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 #64106

**Special notes for your reviewer**:

/cc @juanvallejo
**Release note**:

```release-note
NONE
```
2018-05-25 08:24:25 -07:00
Kubernetes Submit Queue f33aed89d1
Merge pull request #64183 from WanLinghao/ctl_set_subject_fix
Automatic merge from submit-queue (batch tested with PRs 63232, 64257, 64183, 64266, 64134). 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 kubectl set subject --all option invalid bug

**What this PR does / why we need it**:
Fix the kubectl set subject --all option invalid bug and add test cases for 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 #64182

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-05-25 08:24:19 -07:00
Kubernetes Submit Queue 5e214cd7ea
Merge pull request #64257 from wojtek-t/trigger_for_secrets_storage
Automatic merge from submit-queue (batch tested with PRs 63232, 64257, 64183, 64266, 64134). 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>.

Trigger function for secrets
2018-05-25 08:24:11 -07:00
Kubernetes Submit Queue a8cf18c0ae
Merge pull request #63232 from lichuqiang/provision_plumbing
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>.

Volume topology aware dynamic provisioning: basic plumbing

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

Split PR https://github.com/kubernetes/kubernetes/pull/63193 for better review
part 1: basic scheduler and controller plumbing

Next: https://github.com/kubernetes/kubernetes/pull/63233

**Which issue(s) this PR fixes** 
Feature: https://github.com/kubernetes/features/issues/561
Design: https://github.com/kubernetes/community/issues/2168

**Special notes for your reviewer**:
/sig storage
/sig scheduling
/assign @msau42 @jsafrane @saad-ali @bsalamat


**Release note**:

```release-note
Basic plumbing for volume topology aware dynamic provisioning
```
2018-05-25 07:58:53 -07:00
Daniel Gonzalez 7b5f3a1dc5 Ensure that only IPs are used as node addresses in OpenStack LBs 2018-05-25 16:34:31 +02:00
Kubernetes Submit Queue 8b442973ac
Merge pull request #64302 from krmayankk/refactor-rbd
Automatic merge from submit-queue (batch tested with PRs 64204, 64302). 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>.

simplify logic and remove else blocks

```release-note
NONE
```
2018-05-25 05:47:07 -07:00
xuzhonghu cc210a4505 fix toleration validation invalid error 2018-05-25 18:03:22 +08:00
Kubernetes Submit Queue 89b73711fe
Merge pull request #64049 from aveshagarwal/master-scheduler-flake
Automatic merge from submit-queue (batch tested with PRs 61963, 64279, 64130, 64125, 64049). 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 TestSchedulerWithVolumeBinding to avoid setting predicate ordering.

It is causing data race condition as predicate ordering is changing global
variable `predicatesOrdering`. Infact this test does not require any special
predicate order and should work on default predicate ordering as far as
VolumeScheduling feature is enabled.

See these logs:

```
==================
==================
WARNING: DATA RACE
Read at 0x00c420894180 by goroutine 156:
  k8s.io/kubernetes/pkg/scheduler/core.podFitsOnNode()
      /home/avagarwa/upstream-code/gocode/src/k8s.io/kubernetes/pkg/scheduler/core/generic_scheduler.go:503 +0xbb
  k8s.io/kubernetes/pkg/scheduler/core.(*genericScheduler).findNodesThatFit.func1()
      /home/avagarwa/upstream-code/gocode/src/k8s.io/kubernetes/pkg/scheduler/core/generic_scheduler.go:353 +0x2f0
  k8s.io/kubernetes/vendor/k8s.io/client-go/util/workqueue.Parallelize.func1()
      /home/avagarwa/upstream-code/gocode/src/k8s.io/kubernetes/vendor/k8s.io/client-go/util/workqueue/parallelizer.go:47 +0xa3

Previous write at 0x00c420894180 by goroutine 186:
  k8s.io/kubernetes/pkg/scheduler.TestSchedulerWithVolumeBinding()
      /home/avagarwa/upstream-code/gocode/src/k8s.io/kubernetes/pkg/scheduler/scheduler_test.go:663 +0x71
  testing.tRunner()
      /usr/lib/golang/src/testing/testing.go:777 +0x16d

Goroutine 156 (running) created at:
  k8s.io/kubernetes/vendor/k8s.io/client-go/util/workqueue.Parallelize()
      /home/avagarwa/upstream-code/gocode/src/k8s.io/kubernetes/vendor/k8s.io/client-go/util/workqueue/parallelizer.go:43 +0x139
  k8s.io/kubernetes/pkg/scheduler/core.(*genericScheduler).findNodesThatFit()
      /home/avagarwa/upstream-code/gocode/src/k8s.io/kubernetes/pkg/scheduler/core/generic_scheduler.go:378 +0xe8a
  k8s.io/kubernetes/pkg/scheduler/core.(*genericScheduler).Schedule()
      /home/avagarwa/upstream-code/gocode/src/k8s.io/kubernetes/pkg/scheduler/core/generic_scheduler.go:131 +0x385
  k8s.io/kubernetes/pkg/scheduler.(*Scheduler).schedule()
      /home/avagarwa/upstream-code/gocode/src/k8s.io/kubernetes/pkg/scheduler/scheduler.go:192 +0xcd
  k8s.io/kubernetes/pkg/scheduler.(*Scheduler).scheduleOne()
      /home/avagarwa/upstream-code/gocode/src/k8s.io/kubernetes/pkg/scheduler/scheduler.go:447 +0x598
  k8s.io/kubernetes/pkg/scheduler.(*Scheduler).(k8s.io/kubernetes/pkg/scheduler.scheduleOne)-fm()
      /home/avagarwa/upstream-code/gocode/src/k8s.io/kubernetes/pkg/scheduler/scheduler.go:182 +0x41
  k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/util/wait.JitterUntil.func1()
      /home/avagarwa/upstream-code/gocode/src/k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:133 +0x61
  k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/util/wait.JitterUntil()
      /home/avagarwa/upstream-code/gocode/src/k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:134 +0xcd
  k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/util/wait.Until()
      /home/avagarwa/upstream-code/gocode/src/k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:88 +0x5a

Goroutine 186 (running) created at:
  testing.(*T).Run()
      /usr/lib/golang/src/testing/testing.go:824 +0x564
  testing.runTests.func1()
      /usr/lib/golang/src/testing/testing.go:1063 +0xa4
  testing.tRunner()
      /usr/lib/golang/src/testing/testing.go:777 +0x16d
  testing.runTests()
      /usr/lib/golang/src/testing/testing.go:1061 +0x4e1
  testing.(*M).Run()
      /usr/lib/golang/src/testing/testing.go:978 +0x2cd
  main.main()
      _testmain.go:52 +0x22a
==================
--- FAIL: TestSchedulerWithVolumeBinding (18.04s)
	testing.go:730: race detected during execution of test
FAIL
```

It is pretty easy to reproduce this race by following these steps:

```
cd pkg/scheduler
go test -c -race
stress -p 100 ./scheduler.test
```

Predicate ordering to this unit test was added here: https://github.com/kubernetes/kubernetes/pull/57168
Since the whole scheduler instance uses just one ordering at time, not sure what is the advantage. 

@kubernetes/sig-scheduling-bugs @bsalamat @k82cn @frobware @smarterclayton @sjenning 

```release-note
None
```
2018-05-25 01:09:29 -07:00
Mayank Kumar 83818ee0c8 simplify else 2018-05-25 00:38:54 -07:00
Silvery Fu 096dda3768 Rename and add unit test for ImageSizes 2018-05-24 23:29:23 -07:00
Kubernetes Submit Queue d7c40cf69e
Merge pull request #64275 from mtaufen/dkcfg-beta
Automatic merge from submit-queue (batch tested with PRs 63417, 64249, 64242, 64128, 64275). 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>.

graduate DynamicKubeletConfig feature to beta

Everything in the https://github.com/kubernetes/features/issues/281 beta target except a few documentation-related items is complete. Docs should be done very soon, so I'm sending this PR to graduate to beta before freeze.

```release-note
The dynamic Kubelet config feature is now beta, and the DynamicKubeletConfig feature gate is on by default. In order to use dynamic Kubelet config, ensure that the Kubelet's --dynamic-config-dir option is set. 
```

/cc @luxas
2018-05-24 20:49:22 -07:00
Kubernetes Submit Queue 7a7ab200ee
Merge pull request #64242 from WanLinghao/ctl_print_fix
Automatic merge from submit-queue (batch tested with PRs 63417, 64249, 64242, 64128, 64275). 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 bugs that break processing when printing errors occur in kubectl

**What this PR does / why we need it**:
The process should continue when error happens, this patch fix the problem
**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-05-24 20:49:15 -07:00
Guoliang Wang 3bc8b09e78 Move SuggestedPodTemplateResources from factory to set_resources 2018-05-25 11:00:01 +08:00
Kubernetes Submit Queue ac58ee4ca5
Merge pull request #64233 from juanvallejo/jvallejo/move-describer-out-of-factory
Automatic merge from submit-queue (batch tested with PRs 63319, 64248, 64250, 63890, 64233). 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 Describer from factory

**Release note**:
```release-note
NONE
```

Moves `Describer` out of the object_mapping_factory

cc @soltysh @deads2k
2018-05-24 19:46:21 -07:00
Kubernetes Submit Queue 9de1db7c0a
Merge pull request #63890 from mgugino-upstream-stage/kubectl-cp-add-tests
Automatic merge from submit-queue (batch tested with PRs 63319, 64248, 64250, 63890, 64233). 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>.

Additional test coverage for kubectl/cmd/cp

This commit adds some additional test coverage
for the kubectl cp command.

**Release note**:

```release-note
NONE
```
2018-05-24 19:46:18 -07:00
Kubernetes Submit Queue 696430dd51
Merge pull request #64248 from feiskyer/exact-err-msg
Automatic merge from submit-queue (batch tested with PRs 63319, 64248, 64250, 63890, 64233). 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 reason message logs for non-exist Azure resources

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

In azure_wrap.go the function checkResourceExistsFromError() looks at a received error and determines it to be a ResourceNotFound if the HTTP status is http.StatusNotFound. However, the HTTP status also equals http.StatusNotFound in case of SubscriptionNotFound.

this PR adds logs to indict the real error messages for such case.

**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 #64220 

**Special notes for your reviewer**:

**Release note**:

```release-note
Add reason message logs for non-exist Azure resources
```
2018-05-24 19:46:12 -07:00
Kubernetes Submit Queue 9587272e1e
Merge pull request #63319 from soundcloud/always-masquerade-service-vips
Automatic merge from submit-queue (batch tested with PRs 63319, 64248, 64250, 63890, 64233). 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>.

Always masquerade node-originating traffic with a service VIP source ip

**What this PR does / why we need it**:
This is a follow up to make IPVS work on systems without cluster-cidr or masquerade-all.
On these systems the best matching network / source IP to reach the service VIP is the service VIP itself - at least for the host network.
The workaround is simple: Everything originating on the host (OUTPUT nat chain) with a source IP that is the VIP should be masqueraded.

The relevant rule change is the first rule in `KUBE-SERVICES`:
```
Chain KUBE-SERVICES (2 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 KUBE-MARK-MASQ  all  --  *      *       0.0.0.0/0            0.0.0.0/0            match-set KUBE-CLUSTER-IP src,dst
  104  6240 KUBE-MARK-MASQ  tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp match-set KUBE-NODE-PORT-TCP dst
```

The matching rule could be stricter by matching src(ip),dst(ip),dst(port) but the src ip will only be selected if the VIP should be reached.

**Which issue(s) this PR fixes**
Fixes #63241

**Special notes for your reviewer**:

**Release note**:
```release-note
NONE
```
2018-05-24 19:46:10 -07:00
Tim Wilfong fc1d9dbd18
Fix hasClusterTag to actually get behavior we want 2018-05-24 19:23:12 -07:00
Tim Wilfong d8d2a4e84c
fix space-vs-tab indent on comment line 2018-05-24 16:21:01 -07:00
Andrew McDermott ca58578b24 Resurrect lost log line 2018-05-24 20:44:12 +01:00
Andrew McDermott 9cbd54018f Remove signal handler registration from pkg/kubelet
The goal of this change is to remove the registration of signal
handling from pkg/kubelet. We now pass in a stop channel.

If you register a signal handler in `main()` to aid in a controlled
and deliberate exit then the handler registered in `pkg/kubelet` often
wins and the process exits immediately. This means all other signal
handler registrations are currently racy if `DockerServer.Start()` is
directly or indirectly invoked.

This change also removes another signal handler registration from
`NewAPIServerCommand()`; a stop channel is now passed to this
function.
2018-05-24 20:44:12 +01:00
Kubernetes Submit Queue 2feb093783
Merge pull request #64180 from feiskyer/verbose
Automatic merge from submit-queue (batch tested with PRs 63434, 64172, 63975, 64180, 63755). 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>.

Check SessionAffinity for Azure load balancer

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

Currently azure load balance rule comparing is based on name which does not have affinity information. So during updating, the loadDistribution property is not updated.

This PR fixes this and adds some verbose logs for better understanding what's happening.

**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 #63908

**Special notes for your reviewer**:

Cherry pick to 1.10.

**Release note**:

```release-note
Fix SessionAffinity not updated issue for Azure load balancer
```
2018-05-24 12:18:20 -07:00
Kubernetes Submit Queue b8dff0b4f1
Merge pull request #63975 from godliness/lock-optimization
Automatic merge from submit-queue (batch tested with PRs 63434, 64172, 63975, 64180, 63755). 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>.

Optimize the lock which in the RunPredicate

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


Enhance the performance of scheduler

-  Change the lock in the RunPredicate from lock to rlock




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

Could solve part of #63784 

**Special notes for your reviewer**:

_Run benchmark test by scheduler_perf_:
`Before`  BenchmarkScheduling/1000Nodes/0Pods-32     1000    11689758 ns/op
`After`     BenchmarkScheduling/1000Nodes/0Pods-32     1000    5951510 ns/op

_Run integration (density) test by scheduler_perf_:
Schedule 3000 Pods On 3000 Nodes
`Before`  rate  19 per second on average
`After`     rate  58 per second on average

_Cpu profile test result_:
`Before`  [click](https://cdn.rawgit.com/godliness/files/master/63784_before.svg)
`After`     [click](https://cdn.rawgit.com/godliness/files/master/63784_after.svg)

**Release note**:

```release-note
`None`
```

/sig scheduling

/cc @misterikkit 
/cc @bsalamat
/cc @ravisantoshgudimetla 
/cc @resouer
2018-05-24 12:18:17 -07:00
Kubernetes Submit Queue 97f4a64fac
Merge pull request #63434 from adfinis-forks/bug_typo_kubelet_volume_stats
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 typo in volume_stats.go

**What this PR does / why we need it**:
While reviewing the implementation details I came across a typo in volume_stats.go
sed/volumeStatsCollecotr/volumeStatsCollector/

**Release note**:

```release-note
NONE
```
2018-05-24 11:44:20 -07:00
Kubernetes Submit Queue a80b334bcb
Merge pull request #63895 from misterikkit/warning-note
Automatic merge from submit-queue (batch tested with PRs 64127, 63895, 64066, 64215, 64202). 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 warnings about cache invalidation.

Part of https://github.com/kubernetes/kubernetes/pull/63040 is the
assumption that scheduler cache updates must happen before equivalence
cache updates for any given informer event.

The reason for this is that the equivalence cache implementation checks
the main cache for staleness while holding the equiv. cache write lock.

case 1: If an informer invalidates an equiv. cache entry before the
staleness check, then we know that the main cache update completed.

case 2: If an informer blocks trying to grab the equiv. cache lock, then
invalidation will occur right after the potentially stale update is
written.

This patch adds a note to places where we invalidate the equivalence
cache so that hopefully nobody violates this invariant.



**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
/kind cleanup
/sig scheduling
2018-05-24 10:45:15 -07:00
Kubernetes Submit Queue 5c226acc29
Merge pull request #64127 from WanLinghao/use_go_library
Automatic merge from submit-queue (batch tested with PRs 64127, 63895, 64066, 64215, 64202). 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>.

convert Duration into seconds by go library function

**What this PR does / why we need it**:
Here we try convert time.Duration  into int64 seconds. I think it's better to use golang library function,
https://golang.org/pkg/time/#Duration.Round

**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-05-24 10:45:11 -07:00
Michael Taufen d4e48fd789 graduate DynamicKubeletConfig feature to beta 2018-05-24 09:59:29 -07:00
Kubernetes Submit Queue 2a18b02641
Merge pull request #64216 from misterikkit/nil-or-empty
Automatic merge from submit-queue (batch tested with PRs 64174, 64187, 64216, 63265, 64223). 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>.

Do not use DeepEqual to compare slices in test.

This wraps DeepEqual with a helper that considers nil slices and empty
slices to be equal.

Scheduler code might use a nil slice or empty slice to represent an
empty list, so tests should not be sensitive to the difference.  Tests
could fail because DeepEqual considers nil to be different from an empty
slice.



**What this PR does / why we need it**:
Avoid breaking tests in cases where application behavior is not changed.

**Special notes for your reviewer**:
This brittle test keeps breaking in a number of my PRs. Hoping to get this fix merged independently.

**Release note**:

```release-note
NONE
```

/sig scheduling
/kind cleanup
2018-05-24 09:41:17 -07:00
Kubernetes Submit Queue fa354b3f68
Merge pull request #64174 from liggitt/correct-openapi-extensions
Automatic merge from submit-queue (batch tested with PRs 64174, 64187, 64216, 63265, 64223). 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>.

Correctly identify types served in the kube-apiserver openapi doc

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

Split out from https://github.com/kubernetes/kubernetes/pull/63893

```release-note
The kube-apiserver openapi doc now includes extensions identifying APIService and CustomResourceDefinition kinds
```
2018-05-24 09:41:09 -07:00
Tardis Xu 015871bf57 Format 2018-05-25 00:07:41 +08:00
Tardis Xu 56289ef3f8 Fix issue 64119. 2018-05-24 23:48:19 +08:00
David Eads 6d117383fc fix describer tests 2018-05-24 10:50:49 -04:00
juanvallejo cf29a30258 move Describer from factory 2018-05-24 09:43:28 -04:00
wojtekt 1a1d7205b4 Trigger function for secrets 2018-05-24 15:05:37 +02:00
Kubernetes Submit Queue bebc5c1c4f
Merge pull request #64132 from wgliang/master.remove-from-factory1
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>.

Move unrelated methods from the factory to helper

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

Move unrelated methods from the factory to helper

**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 #64106


**Special notes for your reviewer**:

/cc @juanvallejo

**Release note**:

```release-note
NONE
```
2018-05-24 05:39:08 -07:00
lichuqiang 446f36559e pv_controller change for provisioning 2018-05-24 17:12:38 +08:00
lichuqiang 95b530366a Add dynamic provisioning process 2018-05-24 17:12:38 +08:00
lichuqiang 91d403f384 cache update for dynamic provisioning 2018-05-24 17:12:12 +08:00
Pengfei Ni 5a06ad2d0f Add reason message logs for non-exist resources 2018-05-24 17:08:48 +08:00
Rene Treffer f66d4e183f Always masquerade node-originating traffic with a service VIP source ip 2018-05-24 09:42:48 +02:00
Alin-Gheorghe Balutoiu 49e762ab3a Fix Windows CNI for the sandbox case
Windows supports both sandbox and non-sandbox cases. The non-sandbox
case is for Windows Server 2016 and for Windows Server version greater
than 1709 which use Hyper-V containers.

Currently, the CNI on Windows fetches the IP from the containers
within the pods regardless of the mode. This should be done only
in the non-sandbox mode where the IP of the actual container
will be different than the IP of the sandbox container.

In the case where the sandbox container is supported, all the containers
from the same pod will share the network details of the sandbox container.

This patch updates the CNI to fetch the IP from the sandbox container
when this mode is supported.

Signed-off-by: Alin Balutoiu <abalutoiu@cloudbasesolutions.com>
2018-05-24 08:56:30 +02:00
Pengfei Ni a50ac29029 Add unit tests for findRule() 2018-05-24 13:20:46 +08:00
Pengfei Ni b9b6a9e98d Add verbose logs for azure cloud provider 2018-05-24 13:20:46 +08:00
Pengfei Ni 00dc6b5ed8 Check LoadBalancingRulePropertiesFormat for azure load balancers 2018-05-24 13:20:41 +08:00
Guoliang Wang cf86cb77eb Move unrelated methods from the factory to helper 2018-05-24 11:42:26 +08:00
Kubernetes Submit Queue 481b2dc7cf
Merge pull request #62102 from cofyc/fixlocalvolumefsgroup
Automatic merge from submit-queue (batch tested with PRs 64013, 63896, 64139, 57527, 62102). 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>.

Setup fsGroup for local volumes correctly

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

This pr fixes fsGroup check in local volume in containerized kubelet. Except this, it also fixes fsGroup check when volume source is a normal directory whether kubelet is running on the host or in a container.

**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 #61741 

**Special notes for your reviewer**:

Bind mounts are detected in `/proc/mounts`, but it does not contain root of mount for bind mounts. So `mount.GetMountRefsByDev()` cannot get all references if source is a normal directory. e.g.

```
# mkdir /tmp/src /mnt/dst
# mount --bind /tmp/src /tmp/src # required by local-volume-provisioner, see https://github.com/kubernetes-incubator/external-storage/pull/499
# mount --bind /tmp/src /mnt/dst
# grep -P 'src|dst' /proc/mounts 
tmpfs /tmp/src tmpfs rw,nosuid,nodev,noatime,size=4194304k 0 0
tmpfs /mnt/dst tmpfs rw,nosuid,nodev,noatime,size=4194304k 0 0
# grep -P 'src|dst' /proc/self/mountinfo 
234 409 0:42 /src /tmp/src rw,nosuid,nodev,noatime shared:30 - tmpfs tmpfs rw,size=4194304k
235 24 0:42 /src /mnt/dst rw,nosuid,nodev,noatime shared:30 - tmpfs tmpfs rw,size=4194304k
```

We need to compare root of mount and device in this case.

**Release note**:

```release-note
NONE
```
2018-05-23 19:44:24 -07:00
Kubernetes Submit Queue 731eaecfd1
Merge pull request #57527 from mtaufen/kc-metric
Automatic merge from submit-queue (batch tested with PRs 64013, 63896, 64139, 57527, 62102). 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 dynamic config metrics

This PR exports config-releated metrics from the Kubelet.
The Guages for active, assigned, and last-known-good config can be used
to identify config versions and produce aggregate counts across several
nodes. The error-reporting Gauge can be used to determine whether a node
is experiencing a config-related error, and to prodouce an aggregate
count of nodes in an error state.

https://github.com/kubernetes/features/issues/281

```release-note
The Kubelet now exports metrics that report the assigned (node_config_assigned), last-known-good (node_config_last_known_good), and active (node_config_active) config sources, and a metric indicating whether the node is experiencing a config-related error (node_config_error). The config source metrics always report the value 1, and carry the node_config_name, node_config_uid, node_config_resource_version, and node_config_kubelet_key labels, which identify the config version. The error metric reports 1 if there is an error, 0 otherwise.
```
2018-05-23 19:44:21 -07:00
Kubernetes Submit Queue be599a6248
Merge pull request #64139 from k82cn/vol_util_enhance
Automatic merge from submit-queue (batch tested with PRs 64013, 63896, 64139, 57527, 62102). 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>.

Simplify the volume util by v1helper.

Signed-off-by: Da K. Ma <klaus1982.cn@gmail.com>

**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**:
```release-note
None
```
2018-05-23 19:44:18 -07:00
Kubernetes Submit Queue 195914d02a
Merge pull request #64013 from hzxuzhonghu/rm-duplicate
Automatic merge from submit-queue (batch tested with PRs 64013, 63896, 64139, 57527, 62102). 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 uses its own pkg/kubectl/util/logs

kubectl uses its own logs instead of  `staging/src/k8s.io/apiserver/pkg/util/logs`

**Release note**:

```release-note
NONE
```
2018-05-23 19:44:12 -07:00
godliness 506271b363 Optimize the lock which in the RunPredicate 2018-05-24 10:41:19 +08:00
WanLinghao b020a4ba8c fix bugs that break processing when printing errors occur in kubectl 2018-05-24 09:57:25 +08:00
WanLinghao ddbd9d20cb fix kubectl set subject --all option invalid bug 2018-05-24 09:17:06 +08:00
Kubernetes Submit Queue 74bcefc8b2
Merge pull request #64063 from roycaihw/support-get-status
Automatic merge from submit-queue (batch tested with PRs 62756, 63862, 61419, 64015, 64063). 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>.

apiservices/status and certificatesigningrequests/status support get+update+patch

**What this PR does / why we need it**:
Fix the remaining `/status` subresources that return 405 on GET and PATCH

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

**Release note**:

```release-note
apiservices/status and certificatesigningrequests/status now support GET and PATCH
```
2018-05-23 18:14:20 -07:00
Kubernetes Submit Queue 5fe35cdbf9
Merge pull request #61419 from enisoc/apps-v1-deploy
Automatic merge from submit-queue (batch tested with PRs 62756, 63862, 61419, 64015, 64063). 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 apps/v1 Deployment/ReplicaSet in controller and kubectl

This updates the Deployment controller and integration/e2e tests to use apps/v1, as part of #55714.

This also requires updating any other components that use the `deployment/util` package, most notably `kubectl`. That means client versions 1.11 and above will only work with server versions 1.9 and above. This is well within our client-server version skew policy of +/-1 minor version.

However, this PR *only* updates the parts of `kubectl` that used `deployment/util`. So although kubectl now requires apps/v1, it still also depends on extensions/v1beta1. Migrating other parts of kubectl to apps/v1 is beyond the scope of this PR, which was just to change the Deployment controller and fix all the fallout.

```release-note
kubectl: This client version requires the `apps/v1` APIs, so it will not work against a cluster version older than v1.9.0. Note that kubectl only guarantees compatibility with clusters that are +/-1 minor version away.
```
2018-05-23 18:14:13 -07:00
David Ashpole fd1f19fc42 add metadata to kubelet eviction event annotations 2018-05-23 16:12:54 -07:00
Kubernetes Submit Queue 420071d86e
Merge pull request #60636 from PhilipGough/keys-from-cm-patch
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>.

Allow env from resource with keys & updated tests

**What this PR does / why we need it**:
This change allows users to pull environment from specific keys in secrets and configmaps using the `kubectl set env` command. User can provide a list of comma-separated keys with the `--keys` flag.

This can be useful when a number of applications want to share a configuration object but don't want to pollute a resource with unused environment

Improves test coverage of set env command

**Release note**:

```
Allow kubectl set env to specify which keys to import from a resource
```
2018-05-23 15:51:01 -07:00
Tim Wilfong 0a95581de0
Update function hasClusterTag to fix issue #64230
Fixes issue #64230, by changing function hasClusterTag, in aws/tags.go, to ensure that a list of tags containing a tag with a key which matches clusterTagKey will return true even if a TagNameKubernetesClusterLegacy tag also exists in the list with a value other than the ClusterID.

/sig aws
2018-05-23 13:54:20 -07:00
Kubernetes Submit Queue b143093a62
Merge pull request #64111 from juanvallejo/jvallejo/move-more-helpers
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>.

Move CanBeExposed helper from factory_client_access

**Release note**:
```release-note
NONE
```

Moves additional helpers from the "factory_client_access". Continues work from https://github.com/kubernetes/kubernetes/pull/63984 and https://github.com/kubernetes/kubernetes/pull/63884

Moves CanBeExposed from factory_client_access.

cc @soltysh
2018-05-23 13:50:02 -07:00
Jonathan Basseri 2de996856f Do not use DeepEqual to compare slices in test.
This wraps DeepEqual with a helper that considers nil slices and empty
slices to be equal.

Scheduler code might use a nil slice or empty slice to represent an
empty list, so tests should not be sensitive to the difference.  Tests
could fail because DeepEqual considers nil to be different from an empty
slice.
2018-05-23 11:18:00 -07:00
hui luo bf48d39f39 add test: verify kubelet.config.Restore only happen once 2018-05-23 10:10:40 -07:00
Kubernetes Submit Queue 02818ed092
Merge pull request #63912 from luxas/move_rotatecerts_kubelet
Automatic merge from submit-queue (batch tested with PRs 59851, 64114, 63912, 64156, 64191). 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: Move RotateCertificates to the KubeletConfiguration struct

**What this PR does / why we need it**:
Moves `.RotateCertificates` to the `KubeletConfiguration` struct, so it can be configured via the Config file smoothly.

**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 https://github.com/kubernetes/kubernetes/issues/63878
Fixes https://github.com/kubernetes/kubernetes/issues/61653

**Special notes for your reviewer**:
Pretty similar to https://github.com/kubernetes/kubernetes/pull/62352

**Release note**:

```release-note
The kubelet certificate rotation feature can now be enabled via the `.RotateCertificates` field in the kubelet's config file. The `--rotate-certificates` flag is now deprecated, and will be removed in a future release.
```
@kubernetes/sig-node-pr-reviews @kubernetes/sig-cluster-lifecycle-pr-reviews
2018-05-23 09:06:15 -07:00
Kubernetes Submit Queue 6e1727a865
Merge pull request #64114 from juanvallejo/jvallejo/remove-command-method-from-factory
Automatic merge from submit-queue (batch tested with PRs 59851, 64114, 63912, 64156, 64191). 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 f.Command out of the factory

**Release note**:
```release-note
NONE
```

Moves the "f.Command" method out of factory_client_access

cc @soltysh
2018-05-23 09:06:11 -07:00
Kubernetes Submit Queue 8f4674d267
Merge pull request #59851 from nilebox/kubectl-foreground-deletion
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 DeleteOptions.PropagationPolicy instead of OrphanDependents (deprecated) in kubectl

**What this PR does / why we need it**:
Replaces the deprecated `DeleteOptions.OrphanDependents` deletion option with `DeleteOptions.PropagationPolicy`. It will improve the cascade deletion by using `Foreground` GC deletion instead of the old `OrphanDependents: false` which has a confusing behavior (leaves orphans if children has finalizers set).

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

**Special notes for your reviewer**:

**Release note**:

```release-note
Use DeleteOptions.PropagationPolicy instead of OrphanDependents in kubectl 
```
2018-05-23 08:53:23 -07:00
juanvallejo b6db623799 move rollbacker from the factory 2018-05-23 10:44:01 -04:00
juanvallejo fb0794976a move Pauser and Resumer from the factory 2018-05-23 10:27:20 -04:00
juanvallejo 5f5e3a59c0 move more CanBeExposed from factory_client_access 2018-05-23 10:27:20 -04:00
Kubernetes Submit Queue eacf6f05b1
Merge pull request #63841 from andyzhangx/azuredisk-block-device
Automatic merge from submit-queue (batch tested with PRs 64102, 63303, 64150, 63841). 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 block device support for azure disk

**What this PR does / why we need it**:
add block device support for azure disk

**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 #61821

**Special notes for your reviewer**:
detailed steps about how it work:
https://github.com/andyzhangx/demo/tree/master/linux/block/azuredisk

**Release note**:

```
add block device support for azure disk
```

@karataliu @feiskyer @khenidak
2018-05-23 04:53:25 -07:00
Kubernetes Submit Queue 70caf33969
Merge pull request #63303 from jsafrane/fix-csi-attach-error
Automatic merge from submit-queue (batch tested with PRs 64102, 63303, 64150, 63841). 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 attach error to A/D controller.

The plugin should not wait with errors for WaitForAttach, WaitForAttach runs on nodes, not in A/D controller.

**Which issue(s) this PR fixes**
Fixes #63300

~~Work in progress, missing testing.~~

**Release note**:

```release-note
NONE
```

/sig storage
@saad-ali @vladimirvivien
2018-05-23 04:53:17 -07:00
Kubernetes Submit Queue 60b626379b
Merge pull request #64102 from atombender/ext-reserved-blocks
Automatic merge from submit-queue (batch tested with PRs 64102, 63303, 64150, 63841). 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>.

When creating ext3/ext4 volume, disable reserved blocks

**What this PR does / why we need it**:
When creating ext3/ext4 volume, `mkfs` defaults to reserving 5% of the volume for the super-user (root). This patch changes the `mkfs` to pass `-m0` to disable this setting.

Rationale: Reserving a percentage of the volume is generally a neither useful nor desirable feature for volumes that aren't used as root file systems for Linux distributions, since the reserved portion becomes unavailable for non-root users. For containers, the general case is to use the entire volume for data, without running as root. The case where one might want reserved blocks enabled is much rarer.

**Special notes for your reviewer**:
I also added some comments to describe the flags passed to `mkfs`.

**Release note**:

```release-note
Changes ext3/ext4 volume creation to not reserve any portion of the volume for the root user.
```
2018-05-23 04:53:13 -07:00
Jan Safranek cb5eb25ec1 Nsenter unit tests 2018-05-23 10:21:21 +02:00
Jan Safranek 9b74125440 Pass Nsenter to NsenterMounter and NsenterWriter
So Nsenter is initialized only once and with the right parameters.
2018-05-23 10:21:21 +02:00
Jan Safranek a8a37fb714 Created directories in /var/lib/kubelet directly. 2018-05-23 10:21:21 +02:00
Jan Safranek 9f80de3772 Split NsEnterMounter and Mounter implementation of doBindSubpath
nsenter implementation needs to mount different thing in the end and do
different checks on the result.
2018-05-23 10:21:21 +02:00
Jan Safranek 225a879b07 Refactor doBindSubPath into smaller functions:
- getSubpathBindTarget() computes final target of subpath bind-mount.
- prepareSubpathTarget() creates target for bind-mount.
- safeOpenSubPath() checks symlinks in Subpath and safely opens it.
2018-05-23 10:21:21 +02:00
Jan Safranek 7e3fb502a8 Change SafeMakeDir to resolve symlinks in mounter implementation
Kubelet should not resolve symlinks outside of mounter interface.
Only mounter interface knows, how to resolve them properly on the host.

As consequence, declaration of SafeMakeDir changes to simplify the
implementation:
from SafeMakeDir(fullPath string, base string, perm os.FileMode)
to   SafeMakeDir(subdirectoryInBase string, base string, perm os.FileMode)
2018-05-23 10:21:20 +02:00
Jan Safranek 74ba0878a1 Enhance ExistsPath check
It should return error when the check fails (e.g. no permissions, symlink link
loop etc.)
2018-05-23 10:21:20 +02:00
Jan Safranek 7450d1b427 Allow EvalSymlinks target not to exist.
Various NsEnterMounter function need to resolve the part of the path that
exists and blindly add the part that doesn't.
2018-05-23 10:21:18 +02:00
Jan Safranek 97b5299cd7 Add GetMode to mounter interface.
Kubelet must not call os.Lstat on raw volume paths when it runs in a container.
Mounter knows where the file really is.
2018-05-23 10:17:59 +02:00
Nail Islamov 3b5afd8809
Use DeleteOptions.PropagationPolicy instead of OrphanDependents (deprecated) in kubectl 2018-05-23 16:59:53 +10:00
Kubernetes Submit Queue f8decc04eb
Merge pull request #63579 from jsafrane/fix-rbd-double-mount
Automatic merge from submit-queue (batch tested with PRs 63830, 63579, 64173). 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 iSCSI and RBD UnmountDevice with mount containers.

Google's [configure-helper.sh](https://github.com/kubernetes/kubernetes/blob/master/cluster/gce/gci/configure-helper.sh) script bind-mounts `/var/lib/kubelet` somewhere into `/home/kubernetes` and thus every mount that Kubernetes does is visible **twice** in `/proc/mounts`.

iSCSI and RBD volume plugins should not rely on counting entries in `/proc/mounts` and unmount device when Kubernetes thinks it's unusued. Kubernetes tracks the mounts by itself and most of other volume plugins already rely on it safely.

/sig storage

Fixes #56704
(well, it does not fix it, but it makes Kubernetes working with double mounts)

**Release note**:

```release-note
NONE
```

@rootfs, PTAL
2018-05-22 23:52:06 -07:00
Kubernetes Submit Queue 45c94a1cb4
Merge pull request #63830 from mbohlool/crd_versioning_nop
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>.

Crd versioning with nop Conversion

Implements Custom Resource Definition versioning according to[ design doc](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/api-machinery/customresources-versioning.md).

Note: I recreated this PR instead of #63518. Huge number of comments there broke github. 

@sttts @nikhita @deads2k @liggitt @lavalamp 

```release-note
Add CRD Versioning with NOP converter
```
2018-05-22 23:11:55 -07:00
Guoliang Wang 097094e5fa Remove unused parameter (pod) 2018-05-23 13:56:17 +08:00
Kubernetes Submit Queue c4d7987a62
Merge pull request #64126 from mtaufen/remove-old-todos
Automatic merge from submit-queue (batch tested with PRs 63283, 64032, 64159, 64126, 64098). 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 some completed TODOs

This PR removes some old TODOs that were recently completed.
```release-note
NONE
```
2018-05-22 22:14:13 -07:00
Kubernetes Submit Queue c0f1cb67e3
Merge pull request #64032 from wgliang/master.rmove-scheduler-unused
Automatic merge from submit-queue (batch tested with PRs 63283, 64032, 64159, 64126, 64098). 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 unused code of (pkg/scheduler)

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

remove unused 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-05-22 22:14:07 -07:00
Kubernetes Submit Queue 190ef1e01e
Merge pull request #63283 from stewart-yu/stewart-cleancontroller
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>.

split the generic component config and options into a kube and cloud part

**What this PR does / why we need it**:
Summary ideas:
1. Moving some substruct shared by both `kube-controller manager` and `cloud-controller manager` in `KubeControllerManagerConfiguration` struct into `GenericControllerManagerConfiguration` struct, and keep `KubeControllerManagerConfiguration` struct;
2. Construct a new `CloudControllerManagerConfiguration` struct  for `cloud-controller manager`.

As  an follow-up of [https://github.com/kubernetes/kubernetes/pull/60270](https://github.com/kubernetes/kubernetes/pull/60270).

**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-05-22 21:36:05 -07:00
Pengfei Ni 40abe94a40 Validate cgroups-per-qos for windows 2018-05-23 11:12:59 +08:00
Yecheng Fu df0f108a02 Fixes fsGroup check in local volume in containerized kubelet. Except
this, it also fixes fsGroup check when volume source is a normal
directory whether kubelet is running on the host or in a container.
2018-05-23 10:41:42 +08:00
Kubernetes Submit Queue 0ba60a3eed
Merge pull request #64059 from wgliang/master.rename-controller-unit-test
Automatic merge from submit-queue (batch tested with PRs 64034, 64072, 64146, 64059, 64161). 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>.

Fixing wrong unit test naming of (pkg/controller/podautoscaler)

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

Fixing wrong unit test naming of (pkg/controller/podautoscaler). Unit tests will not be executed, function name of _test.go file must start with Test*.

**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-05-22 19:20:21 -07:00
Kubernetes Submit Queue 094e605cd0
Merge pull request #64146 from Lion-Wei/ipvs-lb
Automatic merge from submit-queue (batch tested with PRs 64034, 64072, 64146, 64059, 64161). 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 session affinity for LoadBalancer service with ESIPP

**What this PR does / why we need it**:
fix session affinity for LoadBalancer service with ESIPP

**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 #63351

**Special notes for your reviewer**:
In cases that loadbalancer type service with externaltrafficpolicy=local and session-affinity specified, traffic to loadbalancer should only route to backends that in the same node with kube-proxy. 

**Release note**:
```release-note
NONE
```
2018-05-22 19:20:18 -07:00
Kubernetes Submit Queue 5fee050734
Merge pull request #64072 from CaoShuFeng/show_kind
Automatic merge from submit-queue (batch tested with PRs 64034, 64072, 64146, 64059, 64161). 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 kubectl get --show-kind

This pull request fix `kubectl get --show-kind`
Before this change:
```json
$ kubectl get pods --show-kind
NAME                    READY     STATUS      RESTARTS   AGE
pi-with-timeout-52sjs   0/1       Completed   0          1d
pi-with-timeout-f5pb5   0/1       Completed   0          1d
```
After this change:
```
$ kubectl get pods --show-kind
NAME                        READY     STATUS      RESTARTS   AGE
pod/pi-with-timeout-52sjs   0/1       Completed   0          1d
pod/pi-with-timeout-f5pb5   0/1       Completed   0          1d
```


**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**:
/assign @soltysh 
**Release note**:

```release-note
NONE
```
2018-05-22 19:20:15 -07:00
Kubernetes Submit Queue f9c8898116
Merge pull request #64034 from deads2k/cli-62-wait
Automatic merge from submit-queue (batch tested with PRs 64034, 64072, 64146, 64059, 64161). 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 kubectl wait

Adds a `kubectl wait --for=[delete|condition=condition-name] resource/string` command.  This allows generic waiting on well behaved conditions and for a resource or set of resources to be deleted.

This was requested for delete to do foreground deletion

WIP because I need to add test cases.


@kubernetes/sig-cli-maintainers this is using a separation of concerns made possible by the genericclioptions to make an easily unit testable command.
@smarterclayton 

```release-note
adds a kubectl wait command
```
2018-05-22 19:20:12 -07:00
Jordan Liggitt 43551e8208
Correctly identify types served in the kube-apiserver openapi doc 2018-05-22 20:57:18 -04:00
Kubernetes Submit Queue 36b1f67617
Merge pull request #64026 from jsafrane/csi-selinux
Automatic merge from submit-queue (batch tested with PRs 63914, 63887, 64116, 64026, 62933). 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>.

Enable SELinux relabeling in CSI volumes

**What this PR does / why we need it**:
CSI volume plugin should provide correct information in `GetAttributes` call so kubelet can ask container runtime to relabel the volume. Therefore CSI volume plugin needs to check if a random volume mounted by a CSI driver supports SELinux or not by checking for "seclabel" mount or superblock option.


**Which issue(s) this PR fixes**
Fixes #63965

**Release note**:
```release-note
NONE
```

@saad-ali @vladimirvivien @davidz627 
@cofyc, FYI, I'm changing `struct mountInfo`.
2018-05-22 17:36:18 -07:00
Kubernetes Submit Queue c5bd053a6f
Merge pull request #64116 from deads2k/cli-64-portsforobj
Automatic merge from submit-queue (batch tested with PRs 63914, 63887, 64116, 64026, 62933). 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 portsforobject from factory

Removes another non-factory method out.

/assign @juanvallejo

```release-note
NONE
```
2018-05-22 17:36:15 -07:00
Kubernetes Submit Queue 773ced14ce
Merge pull request #63887 from luxas/kubeadm_kubelet_integration
Automatic merge from submit-queue (batch tested with PRs 63914, 63887, 64116, 64026, 62933). 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>.

kubeadm: Write kubelet config file to disk and persist in-cluster

**What this PR does / why we need it**:
In order to make configuration flow from the cluster level to node level, we need a way for kubeadm to tell the kubelet what config to use. As of v1.10 (I think) the kubelet can read `--config` using the kubelet Beta ComponentConfiguration API, so now we have an interface to talk to the kubelet properly.

This PR:
 - Writes the kubelet ComponentConfig to `/var/lib/kubelet/config.yaml` on init and join
 - Writes an environment file to source in the kubelet systemd dropin `/var/lib/kubelet/kubeadm-flags.env`. This file contain runtime flags that should be passed to the kubelet.
 - Uploads a ConfigMap with the name `kubelet-config-1.X`
 - Patches the node object so that it starts using the ConfigMap with updates using Dynamic Kubelet Configuration, **only if the feature gate is set** (currently alpha and off by default, not intended to be switched on in v1.11)
 - Updates the phase commands to reflect this new flow

The kubelet dropin file I used now looks like this:
```
# v1.11.x dropin as-is at HEAD
# /etc/systemd/system/kubelet.service.d/10-kubeadm.conf
---
[Service]
Environment="KUBELET_KUBECONFIG_ARGS=--bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --kubeconfig=/etc/kubernetes/kubelet.conf"
Environment="KUBELET_CONFIG_ARGS=--config=/var/lib/kubelet/config.yaml"
EnvironmentFile-=/var/lib/kubelet/kubeadm-flags.env
# Should default to 0 in v1.11: https://github.com/kubernetes/kubernetes/pull/63881, and hence not be here in the real v1.11 manifest
Environment="KUBELET_CADVISOR_ARGS=--cadvisor-port=0"
# Should be configurable via the config file: https://github.com/kubernetes/kubernetes/issues/63878, and hence be configured using the file in v1.11
Environment="KUBELET_CERTIFICATE_ARGS=--rotate-certificates=true"
ExecStart=
ExecStart=/usr/bin/kubelet $KUBELET_KUBECONFIG_ARGS $KUBELET_CONFIG_ARGS $KUBELET_KUBEADM_ARGS $KUBELET_CADVISOR_ARGS $KUBELET_CERTIFICATE_ARGS $KUBELET_EXTRA_ARGS
---
# v1.11.x dropin end goal
# /etc/systemd/system/kubelet.service.d/10-kubeadm.conf
---
[Service]
Environment="KUBELET_KUBECONFIG_ARGS=--bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --kubeconfig=/etc/kubernetes/kubelet.conf"
Environment="KUBELET_CONFIG_ARGS=--config=/var/lib/kubelet/config.yaml"
EnvironmentFile-=/var/lib/kubelet/kubeadm-flags.env
ExecStart=
ExecStart=/usr/bin/kubelet $KUBELET_KUBECONFIG_ARGS $KUBELET_CONFIG_ARGS $KUBELET_KUBEADM_ARGS $KUBELET_EXTRA_ARGS
---
# Environment file dynamically created at runtime by "kubeadm init"
# /var/lib/kubelet/kubeadm-flags.env
KUBELET_KUBEADM_ARGS=--cni-bin-dir=/opt/cni/bin --cni-conf-dir=/etc/cni/net.d --network-plugin=cni
```

**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 https://github.com/kubernetes/kubeadm/issues/822
Fixes https://github.com/kubernetes/kubeadm/issues/571

**Special notes for your reviewer**:

**Release note**:

```release-note
"kubeadm init" now writes a structured and versioned kubelet ComponentConfiguration file to `/var/lib/kubelet/config.yaml` and an environment file with runtime flags (you can source this file in the systemd kubelet dropin) to `/var/lib/kubelet/kubeadm-flags.env`.
```
@kubernetes/sig-cluster-lifecycle-pr-reviews @mtaufen
2018-05-22 17:36:12 -07:00
Kubernetes Submit Queue cecbbad128
Merge pull request #63914 from superbrothers/completion-init-containers
Automatic merge from submit-queue (batch tested with PRs 63914, 63887, 64116, 64026, 62933). 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 initContainers into completion suggestions for kubectl logs/attach

**What this PR does / why we need it**: This PR improves autocomplete of kubectl logs/attach to add initContainers into completion suggestions in addition to containers.

```
$ cat <<EOL | kubectl apply -f -
apiVersion: v1
kind: Pod
metadata:
  name: myapp-pod
spec:
  initContainers:
  - name: init-myservice
    image: busybox
    command: ['sh', '-c', 'until nslookup myservice; do echo waiting for myservice; sleep 2; done;']
  - name: init-mydb
    image: busybox
    command: ['sh', '-c', 'until nslookup mydb; do echo waiting for mydb; sleep 2; done;']
  containers:
  - name: myapp-container
    image: busybox
    command: ['sh', '-c', 'echo The app is running! && sleep 3600']
EOL
$ kubectl logs myapp-pod <tab><tab>
init-mydb        init-myservice   myapp-container
```

**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-05-22 17:36:09 -07:00
Jonathan Basseri 18a8184dce Add warnings about cache invalidation.
Part of https://github.com/kubernetes/kubernetes/pull/63040 is the
assumption that scheduler cache updates must happen before equivalence
cache updates for any given informer event.

The reason for this is that the equivalence cache implementation checks
the main cache for staleness while holding the equiv. cache write lock.

case 1: If an informer invalidates an equiv. cache entry before the
staleness check, then we know that the main cache update completed.

case 2: If an informer blocks trying to grab the equiv. cache lock, then
invalidation will occur right after the potentially stale update is
written.

This patch adds a note to places where we invalidate the equivalence
cache so that hopefully nobody violates this invariant.
2018-05-22 15:15:37 -07:00
Lucas Käldström 57e74f9928
autogenerated 2018-05-23 00:19:21 +03:00
Lucas Käldström 2590e127f9
kubelet: Move RotateCertificates to the KubeletConfiguration struct 2018-05-23 00:19:11 +03:00
Michael Taufen fd3432ef05 add dynamic config metrics
This PR exports config-releated metrics from the Kubelet.
The Guages for active, assigned, and last-known-good config can be used
to identify config versions and produce aggregate counts across several
nodes. The error-reporting Gauge can be used to determine whether a node
is experiencing a config-related error, and to prodouce an aggregate
count of nodes in an error state.
2018-05-22 14:08:55 -07:00
Mehdy Bohlool 0f6d98a056 CRD versioning with no-op converter 2018-05-22 13:54:33 -07:00
Anthony Yeh 436db71751
Set explicit labels/selector for apps/v1 Deployment/RS. 2018-05-22 13:43:07 -07:00
Anthony Yeh 1c531fc970
kubectl: Use apps/v1 Deployment/ReplicaSet.
This is necessary since kubectl shares code with the controllers,
and the controllers have been updated to use apps/v1.
2018-05-22 13:43:06 -07:00
Anthony Yeh e32a15558b
Use apps/v1 in Deployment controller. 2018-05-22 13:42:10 -07:00
Michael Taufen 62a1532d51 Remove some completed TODOs 2018-05-22 11:02:57 -07:00
juanvallejo 0d3e85608f move f.Command out of the factory 2018-05-22 13:31:01 -04:00
Kubernetes Submit Queue 2ff0bc2b8a
Merge pull request #63967 from deads2k/rbac-06-external
Automatic merge from submit-queue (batch tested with PRs 62025, 63851, 64077, 63967, 63991). 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>.

switch rbac to external

The overall trajectory of the project is towards external types.  Having all helpers agree on the version they operate on makes life much easier.  We've already written one RBAC controller (role aggregation) and more may follow.  `v1` has been around for a while now and we know that any future changes have to reliably roundtrip through it.  This pull switches all the core helpers over to use the external types.

@kubernetes/sig-auth-pr-reviews 

```release-note
`kubectl auth reconcile` only works with rbac.v1
```
2018-05-22 08:40:26 -07:00
Kubernetes Submit Queue 220d16edc0
Merge pull request #64077 from CaoShuFeng/get_test
Automatic merge from submit-queue (batch tested with PRs 62025, 63851, 64077, 63967, 63991). 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 one duplicated unit test

Unit test `TestGetAllListObjects` is exactly the same with unit test `TestGetListObjects`.



**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**:
/assign @soltysh 
**Release note**:
```release-note
NONE
```
2018-05-22 08:40:23 -07:00
Kubernetes Submit Queue 007e936c6d
Merge pull request #63851 from WanLinghao/ctl_create_aggegated_rules
Automatic merge from submit-queue (batch tested with PRs 62025, 63851, 64077, 63967, 63991). 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 kubectl could create clusterrole with aggregation rules

**What this PR does / why we need it**:
The clusterrole aggregation rule features are available since v1.9:
https://kubernetes.io/docs/admin/authorization/rbac/#aggregated-clusterroles
This patch makes kubectl could create clusterrole with aggregation rules.
**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-05-22 08:40:20 -07:00
Kubernetes Submit Queue 48b5fd9182
Merge pull request #62025 from hanxiaoshuai/bugfix0402
Automatic merge from submit-queue (batch tested with PRs 62025, 63851, 64077, 63967, 63991). 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>.

check error when parse field failed

**What this PR does / why we need it**:
check error when parse field failed
**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-05-22 08:40:16 -07:00
David Eads 043f66b86e remove portsforobject from factory 2018-05-22 09:09:55 -04:00
David Eads 49258593c3 add a discarding printer for testing and delegation 2018-05-22 08:47:42 -04:00
David Eads 76794643c5 add wait 2018-05-22 08:47:42 -04:00
David Eads ff743c7f4f generated 2018-05-22 08:17:05 -04:00
David Eads 092714ea0f switch rbac to external 2018-05-22 08:17:05 -04:00
liangwei 62e3285cf8 ipvs lb local session affinity 2018-05-22 19:51:54 +08:00
Kubernetes Submit Queue e85b81bbee
Merge pull request #59566 from stewart-yu/ipvsGAkubeadm
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>.

Automatically load ipvs required kernel modules in kubeadm

**What this PR does / why we need it**:
This PR is part of [https://github.com/kubernetes/kubernetes/issues/59402](https://github.com/kubernetes/kubernetes/issues/59402), aiming to load kernel modules in kubeadm

**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 #[https://github.com/kubernetes/kubernetes/issues/59402](https://github.com/kubernetes/kubernetes/issues/59402)

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-05-22 02:52:16 -07:00
Da K. Ma 275a4bf91f Simplify the volume util by v1helper.
Signed-off-by: Da K. Ma <klaus1982.cn@gmail.com>
2018-05-22 16:41:43 +08:00
Jan Safranek 49b3de6623 Create nsenter OWNERS 2018-05-22 10:04:58 +02:00
PhilipGough 027d15e58c
Allow env from resource with keys & updated tests 2018-05-22 09:04:45 +01:00
andyzhangx 541edb7448 add volumeName in getVolumeSpecFromGlobalMapPath
fix test build failure
2018-05-22 06:52:24 +00:00
Lucas Käldström 0aa0f3208a
kubeadm: Write kubelet config file to disk and persist in-cluster. Also write runtime environment file and fixup the kubelet phases command 2018-05-22 09:12:25 +03:00
Kubernetes Submit Queue a0036fcae1
Merge pull request #64113 from juanvallejo/jvallejo/remove-uneeded-factory-methods
Automatic merge from submit-queue (batch tested with PRs 63151, 63795, 63553, 64068, 64113). 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 LabelsForObject and ResolveImage from factory

**Release note**:
```release-note
NONE
```

Removes the `ResolveImage` and `LabelsForObject` methods from factory_client_access, which are not needed.

cc @soltysh
2018-05-21 21:41:24 -07:00
Kubernetes Submit Queue 6935b755b9
Merge pull request #63553 from rphillips/fixes/checkpoint_logic_on_restore
Automatic merge from submit-queue (batch tested with PRs 63151, 63795, 63553, 64068, 64113). 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 checkpoint manager logic bug on restore

**What this PR does / why we need it**:
I am testing the new checkpoint logic within the kubelet and ran across a logic bug on API server restores.

Initial PR: https://github.com/kubernetes/kubernetes/pull/56040

**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**:
/cc @vikaschoudhary16 

**Release note**:
```release-note
NONE
```
2018-05-21 21:41:18 -07:00
Kubernetes Submit Queue 0ea35f4c61
Merge pull request #63795 from wojtek-t/watching_secret_manager
Automatic merge from submit-queue (batch tested with PRs 63151, 63795, 63553, 64068, 64113). 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 watch-based secret manager

Initial experiments on 5000-node Kubemark show that apiserver is handling those with no real issues.
That said, we shouldn't enable it in prod without much more extensive scalability tests (so most probably not in 1.11), but having that in would enable easier testing.

@liggitt
2018-05-21 21:41:14 -07:00
xuzhonghu 46d8cf23ef kubectl use its own logs 2018-05-22 11:35:38 +08:00
stewart-yu 5f4025c029 auto generated file 2018-05-22 11:20:47 +08:00
stewart-yu 2f7941dd08 load kernel modules required by IPVS in kubeadm 2018-05-22 11:20:47 +08:00
Pengfei Ni 66da2ddcd0 Rename Du() to DiskUsage() for more expressive 2018-05-22 10:52:06 +08:00
WanLinghao 7026f23cd2 convert Duration into seconds by go library function 2018-05-22 10:50:47 +08:00
Cao Shufeng a1bba62202 fix kubectl get --show-kind 2018-05-22 10:41:27 +08:00
Kubernetes Submit Queue 9eb0c35668
Merge pull request #63701 from scf0920/branch-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 typo: peirodically->periodically

**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-05-21 18:42:59 -07:00
Kubernetes Submit Queue 8cccc022b0
Merge pull request #64118 from deads2k/cli-65-podspec
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>.

move updatepodspecforobject out of factory

Updating a podspec is a polymorphic helper, but it isn't a factory method.

@kubernetes/sig-cli-maintainers 
/assign @juanvallejo 

```release-note
NONE
```
2018-05-21 18:42:37 -07:00
Kubernetes Submit Queue 2a989c60ff
Merge pull request #63221 from mtaufen/dkcfg-live-configmap
Automatic merge from submit-queue (batch tested with PRs 63881, 64046, 63409, 63402, 63221). 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 responds to ConfigMap mutations for dynamic Kubelet config

This PR makes dynamic Kubelet config easier to reason about by leaving less room for silent skew scenarios. The new behavior is as follows:
- ConfigMap does not exist: Kubelet reports error status due to missing source
- ConfigMap is created: Kubelet starts using it
- ConfigMap is updated: Kubelet respects the update (but we discourage this pattern, in favor of incrementally migrating to a new ConfigMap)
- ConfigMap is deleted: Kubelet keeps using the config (non-disruptive), but reports error status due to missing source
- ConfigMap is recreated: Kubelet respects any updates (but, again, we discourage this pattern)

This PR also makes a small change to the config checkpoint file tree structure, because ResourceVersion is now taken into account when saving checkpoints. The new structure is as follows:
```
- dir named by --dynamic-config-dir (root for managing dynamic config)
| - meta
  | - assigned (encoded kubeletconfig/v1beta1.SerializedNodeConfigSource object, indicating the assigned config)
  | - last-known-good (encoded kubeletconfig/v1beta1.SerializedNodeConfigSource object, indicating the last-known-good config)
| - checkpoints
  | - uid1 (dir for versions of object identified by uid1)
    | - resourceVersion1 (dir for unpacked files from resourceVersion1)
    | - ...
  | - ...
```


fixes: #61643

```release-note
The dynamic Kubelet config feature will now update config in the event of a ConfigMap mutation, which reduces the chance for silent config skew. Only name, namespace, and kubeletConfigKey may now be set in Node.Spec.ConfigSource.ConfigMap. The least disruptive pattern for config management is still to create a new ConfigMap and incrementally roll out a new Node.Spec.ConfigSource.
```
2018-05-21 17:05:42 -07:00
Kubernetes Submit Queue fe509498c4
Merge pull request #63402 from juanvallejo/jvallejo/move-printer-flags-to-genericclihelpers
Automatic merge from submit-queue (batch tested with PRs 63881, 64046, 63409, 63402, 63221). 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 printer flags to genericclihelpers

**Release note**:
```release-note
NONE
```

Moves all pkg/kubectl/cmd#PrintFlags to pkg/kubectl/genericclioptions
~~Depends on https://github.com/kubernetes/kubernetes/pull/63340~~
~~Depends on https://github.com/kubernetes/kubernetes/pull/63808~~
~~Depends on https://github.com/kubernetes/kubernetes/pull/63928~~
Depends on https://github.com/kubernetes/kubernetes/pull/64107

~Opening now to catch CI failures~

cc @deads2k @soltysh
2018-05-21 17:05:38 -07:00
Kubernetes Submit Queue 6d510f52f2
Merge pull request #63409 from mtaufen/kc-validation-feature-gates
Automatic merge from submit-queue (batch tested with PRs 63881, 64046, 63409, 63402, 63221). 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 config: Validate new config against future feature gates

This fixes an issue with KubeletConfiguration validation, where the             
feature gates set by the new config were not taken into account.                
                                                                                
Also fixes a validation issue with dynamic Kubelet config, where flag           
precedence was not enforced prior to dynamic config validation in the           
controller; this prevented rejection of dynamic configs that don't merge        
well with values set via legacy flags. 

Fixes #63305 

```release-note
NONE
```
2018-05-21 17:05:34 -07:00
Kubernetes Submit Queue 19388204ee
Merge pull request #64046 from yujuhong/log-rotate-beta
Automatic merge from submit-queue (batch tested with PRs 63881, 64046, 63409, 63402, 63221). 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>.

Graduate CRIContainerLogRotation to beta

**Release note**:

```release-note
Graduate CRI container log rotation to beta, and enable it by default.
```
2018-05-21 17:05:30 -07:00
David Eads 087140aee9 move updatepodspecforobject out of factory 2018-05-21 17:56:33 -04:00
Ryan Phillips 6469c8e333 kubelet: fix checkpoint manager logic bug on restore 2018-05-21 16:17:48 -05:00
juanvallejo 8fc0bfd287 remove LabelsForObject and ResolveImage from factory 2018-05-21 16:30:46 -04:00
Kubernetes Submit Queue bf790f4467
Merge pull request #63894 from dims/bump-grpc-max-message-size-for-docker-service
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>.

Bump grpc max message size for docker service

**What this PR does / why we need it**:
When we have a lot of containers, we run into the limit in grpc ( https://github.com/grpc/grpc-go/blob/master/clientconn.go#L118 )

**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 #63858

**Special notes for your reviewer**:
In https://github.com/kubernetes/kubernetes/pull/63977 we fixed the send and receive sizes on the client side. we should fix the docker service too 

**Release note**:

```release-note
NONE
```
2018-05-21 12:47:14 -07:00
juanvallejo d1603c9560 move PrintOptions to genericclioptions 2018-05-21 14:59:41 -04:00
David Eads 3693ed095f remove API dependency on printers 2018-05-21 13:46:53 -04:00
Alexander Staubo 1b3dee951c When creating ext3/ext4 volume, pass -m0 to mkfs in order to disable the
super-user-reserved blocks, which otherwise defaults to 5% of the
entire disk.

Rationale: Reserving a percentage of the volume is generally a neither
useful nor desirable feature for volumes that aren't used as root file
systems for Linux distributions, since the reserved portion becomes
unavailable for non-root users. For containers, the general case is to
use the entire volume for data, without running as root. The case where
one might want reserved blocks enabled is much rarer.
2018-05-21 12:43:57 -04:00
Michael Taufen b5648c3f61 dynamic Kubelet config reconciles ConfigMap updates 2018-05-21 09:03:58 -07:00
xuzhonghu 4be6328126 remove unused gc code 2018-05-21 20:22:37 +08:00
andyzhangx 8259dcbaa7 add block device support for azure disk
add plugin field for azure dataDisk struct

add azure_dd_block_test

fix comments

fix comments
2018-05-21 09:03:59 +00:00
andyzhangx 045989e7bd add formatAndMount unit test on Windows
fix comments

fix comments

fix comments

fix comments
2018-05-21 05:48:04 +00:00
Cao Shufeng 188b2bfabd remove one duplicated unit test 2018-05-21 10:33:49 +08:00
Michael Taufen 647e90341c Kubelet config: Validate new config against future feature gates
This fixes an issue with KubeletConfiguration validation, where the
feature gates set by the new config were not taken into account.

Also fixes a validation issue with dynamic Kubelet config, where flag
precedence was not enforced prior to dynamic config validation in the
controller; this prevented rejection of dynamic configs that don't merge
well with values set via legacy flags.
2018-05-20 13:15:59 -07:00
Davanum Srinivas eb6bd67446
Bump grpc max message size for docker service 2018-05-19 16:52:00 -04:00
Kubernetes Submit Queue b9c07d272c
Merge pull request #63963 from wojtek-t/collapse_configmap_manager
Automatic merge from submit-queue (batch tested with PRs 63598, 63913, 63459, 63963, 60464). 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>.

Refactor ConfigMapManager

This is a follow up from https://github.com/kubernetes/kubernetes/pull/63857 to unify SecretManager with ConfigMap manager.

This is more-or-less a copy of that PR for ConfigMapManager, with super minor changes in secretManager code.
2018-05-19 06:49:23 -07:00
Kubernetes Submit Queue 0a2467d849
Merge pull request #63459 from resouer/fix-63427
Automatic merge from submit-queue (batch tested with PRs 63598, 63913, 63459, 63963, 60464). 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>.

Check nodeInfo before ecache predicate

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

There's chances during test when nodeInfo is nil which may cause ecache predicate fail with nil pointer.

**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 #63427

**Special notes for your reviewer**:

Not sure how to reproduce the original issue yet. i.e. why and when `nodeInfo` will become nil in tests is not clear to me, that's why I label it as WIP.

cc @bsalamat who may have more inputs.

**Release note**:

```release-note
NONE
```
2018-05-19 06:49:19 -07:00
Kubernetes Submit Queue 4b0b91ae31
Merge pull request #63598 from nikhita/subresources-to-beta
Automatic merge from submit-queue (batch tested with PRs 63598, 63913, 63459, 63963, 60464). 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>.

apiextensions: promote CustomResourcesSubresources to beta

Fixes #62786

This PR promotes the CustomResourcesSubResources feature to beta and makes it enabled by default.

**Release note**:

```release-note
Subresources for custom resources is now beta and enabled by default. With this, updates to the `/status` subresource will disallow updates to all fields other than `.status` (not just `.spec` and `.metadata` as before). Also, `required` can be used at the root of the CRD OpenAPI validation schema when the `/status` subresource is enabled.
```

/assign sttts deads2k 
/sig api-machinery
/area custom-resources
2018-05-19 06:49:12 -07:00
Kubernetes Submit Queue bdac43b635
Merge pull request #63984 from juanvallejo/jvallejo/move-more-helpers-from-factory
Automatic merge from submit-queue (batch tested with PRs 63770, 63776, 64001, 64028, 63984). 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 additional helpers from the factory

**Release note**:
```release-note
NONE
```

~~Builds on https://github.com/kubernetes/kubernetes/pull/63927~~

cc @deads2k @soltysh
2018-05-19 02:11:39 -07:00
Kubernetes Submit Queue 25c36876a2
Merge pull request #64028 from soltysh/job_scaler
Automatic merge from submit-queue (batch tested with PRs 63770, 63776, 64001, 64028, 63984). 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>.

Tolarate negative values when calculating job scale progress

**What this PR does / why we need it**:
It might happen that the job controller will complete a job, but the status will still contain information about active pods which during scale down operation will be giving false (non 0) value in [this calculation](1b950d1e8e/pkg/kubectl/cmd/scalejob/scalejob.go (L147)). To prevent that situation we should tolerate non-zero values there. 

/assign @liggitt 

**Release note**:
```release-note
NONE
```
2018-05-19 02:11:36 -07:00
Kubernetes Submit Queue 8a40e5f77f
Merge pull request #64001 from juanvallejo/jvallejo/sort-on-generic-output
Automatic merge from submit-queue (batch tested with PRs 63770, 63776, 64001, 64028, 63984). 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>.

sort on non-tabular output

**Release note**:

```release-note
NONE
```

Enables sorting objects when printing as json, yaml, etc.

cc @soltysh
2018-05-19 02:11:33 -07:00
Kubernetes Submit Queue a915811a98
Merge pull request #63776 from wgliang/master.test-printers
Automatic merge from submit-queue (batch tested with PRs 63770, 63776, 64001, 64028, 63984). 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 subtest for table units (pkg/printers)

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

Go 1.7 added the subtest feature which can make table-driven tests much easier to run and debug. Many table-driven tests in pkg/kubectl are not using this feature.

/kind cleanup

Further reading: [Using Subtests and Sub-benchmarks](https://blog.golang.org/subtests)

**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-05-19 02:11:30 -07:00
Kubernetes Submit Queue 4d786a937d
Merge pull request #63977 from runcom/increase-grpc-resp-size
Automatic merge from submit-queue (batch tested with PRs 60012, 63692, 63977, 63960, 64008). 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>.

pkg: kubelet: remote: increase grpc client default size

Signed-off-by: Antonio Murdaca <runcom@redhat.com>



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

when running lots and lots of containers and having tons of images on a given node, we started seeing this in the logs (with docker):

```
Unable to retrieve pods: rpc error: code = ResourceExhausted desc = grpc: received message larger than max (4208374 vs. 4194304)
```

That's because the grpc client is defaulting to a 4MB response size.
This patch increases the resp size to 8MB to avoid such issue.

**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
increase grpc client default response size
```
2018-05-18 23:35:20 -07:00
Kubernetes Submit Queue 680e00a656
Merge pull request #63692 from msau42/debug-scheduler
Automatic merge from submit-queue (batch tested with PRs 60012, 63692, 63977, 63960, 64008). 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>.

Only override objects from informer when version has increased.

**What this PR does / why we need it**:
We don't want an informer resync to override assumed volumes if the version has not increased.

**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 #63467

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-05-18 23:35:17 -07:00
Kubernetes Submit Queue ddf551c24b
Merge pull request #60012 from atlassian/dial-with-context
Automatic merge from submit-queue (batch tested with PRs 60012, 63692, 63977, 63960, 64008). 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 Dial with context

**What this PR does / why we need it**:
`net/http/Transport.Dial` field is deprecated:
```go
// DialContext specifies the dial function for creating unencrypted TCP connections.
// If DialContext is nil (and the deprecated Dial below is also nil),
// then the transport dials using package net.
DialContext func(ctx context.Context, network, addr string) (net.Conn, error)

// Dial specifies the dial function for creating unencrypted TCP connections.
//
// Deprecated: Use DialContext instead, which allows the transport
// to cancel dials as soon as they are no longer needed.
// If both are set, DialContext takes priority.
Dial func(network, addr string) (net.Conn, error)
```
This PR switches all `Dial` usages to `DialContext`. Fixes #63455.

**Special notes for your reviewer**:
Also related: https://github.com/kubernetes/kubernetes/pull/59287 https://github.com/kubernetes/kubernetes/pull/58532 https://github.com/kubernetes/kubernetes/issues/815 https://github.com/kubernetes/community/pull/1166 https://github.com/kubernetes/kubernetes/pull/58677 https://github.com/kubernetes/kubernetes/pull/57932

**Release note**:
```release-note
HTTP transport now uses `context.Context` to cancel dial operations. k8s.io/client-go/transport/Config struct has been updated to accept a function with a `context.Context` parameter. This is a breaking change if you use this field in your code.
```
/sig api-machinery
/kind enhancement
/cc @sttts
2018-05-18 23:35:13 -07:00
Haowei Cai 4e114fd65b generated 2018-05-18 18:42:39 -07:00
Haowei Cai cd13c41dde Add GET PATCH support for two /status:
apiservices/status under apiregistration.k8s.io
certificatesigningrequests/status under certificates.k8s.io
2018-05-18 18:31:27 -07:00
Guoliang Wang afa2a1cfe5 Fixing wrong unit test naming 2018-05-19 08:09:39 +08:00
Kubernetes Submit Queue 2d1f42e0b1
Merge pull request #63902 from vmware/vcp_secrets
Automatic merge from submit-queue (batch tested with PRs 63969, 63902, 63689, 63973, 63978). 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>.

Adds a mechanism in vSphere Cloud Provider to get credentials from Kubernetes secrets

**What this PR does / why we need it**:
Currently, vCenter credentials are stored in plain text in vsphere.conf. This PR adds a mechanism in vSphere Cloud Provider to get vCenter credentials from Kubernetes secrets.

**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**:
Internally review here: https://github.com/vmware/kubernetes/pull/484
**Workflow:**
1. Create vsphere.conf file with ```secret-name``` and ```secret-namespace```.
	```
	[Global]
	insecure-flag = 1
	secret-name = "vcconf"
	secret-namespace = "kube-system"

	[VirtualCenter "10.160.45.119"]
	port = 443
	datacenters = k8s-dc-1

	[Workspace]
	server = 10.160.45.119
	datacenter = k8s-dc-1
	default-datastore = sharedVMFS-0
	folder = Discovered virtual machine
	```
2. Launch Kubernetes cluster with vSphere Cloud Provider Configured.
3. Create secret with vCenter credentials.
	a. Create base64 encoding for username and password:
	username:
	```	
		> echo -n 'admin' | base64
		YWRtaW4= 
	```
	password:
	```
		> echo -n 'vsphere' | base64
		dnNwaGVyZQ==
	```

	b. kubectl create -f vccredentials.yaml
	```
		#vccredentials.yaml
		apiVersion: v1
		kind: Secret
		metadata:
			name: vcconf
		type: Opaque
		data:
			10.192.44.199.username: YWRtaW4=
			10.192.44.199.password: dnNwaGVyZQ==
	```
4. vSphere Cloud Provider can be used now.

**Note:**
Secrets info can be provided with both (old and new) vSphere Cloud provider configuration formats.


**Tests Done:**
- [x] vSphere Cloud Provider unit test.
- [x] Volume lifecyle with Username and Password in vsphere.conf (for backward compability)
- [x] Volume lifecyle with secrets information in vsphere.conf.
- [x] Update secrets workflow

**Release note**:

```release-note
Adds a mechanism in vSphere Cloud Provider to get credentials from Kubernetes secrets
```
2018-05-18 15:59:15 -07:00
Mikhail Mazurskiy 5e8e570dbd
Use Dial with context 2018-05-19 08:14:37 +10:00
juanvallejo c87cd9c0f6 sort on non-tabular output 2018-05-18 14:27:16 -04:00
Avesh Agarwal ea057eb9b5 Fix TestSchedulerWithVolumeBinding to avoid setting predicate ordering.
It is causing data race condition as predicate ordering is changing global
variable predicatesOrdering. Infact this test does not require any special
predicate order and should work on default predicate ordering as far as
VolumeScheduling feature is enabled.
2018-05-18 14:19:26 -04:00
Yu-Ju Hong a3593b5aa6 Graduate CRIContainerLogRotation to beta 2018-05-18 10:09:09 -07:00
Kubernetes Submit Queue 77a08ee2d7
Merge pull request #63989 from MrHohn/gce-security-policy
Automatic merge from submit-queue (batch tested with PRs 63569, 63918, 63980, 63295, 63989). 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 provider: add wrapper for security policy

**What this PR does / why we need it**:
Generated mock interface for beta backend service and security policy as well.

**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 #NONE 

**Special notes for your reviewer**:
/assign @nicksardo   

**Release note**:

```release-note
NONE
```
2018-05-18 09:54:26 -07:00
Kubernetes Submit Queue 7da05eb87b
Merge pull request #63295 from jsafrane/fix-csi-detach-delete
Automatic merge from submit-queue (batch tested with PRs 63569, 63918, 63980, 63295, 63989). 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>.

Fixed CSI volume detach when the volume is already detached.

**What this PR does / why we need it**:
"VolumeAttachment NotFound" error should be treated as successful detach.

/sig storage
/assign @vladimirvivien @saad-ali

**Special notes for your reviewer**:
Note that the PR changes just 4 lines in attachment code, the rest is unit test refactoring to inject fake errors.

**Release note**:

```release-note
NONE
```
2018-05-18 09:54:22 -07:00
Kubernetes Submit Queue 08a094ca2e
Merge pull request #63569 from hanxiaoshuai/bugfix0509
Automatic merge from submit-queue (batch tested with PRs 63569, 63918, 63980, 63295, 63989). 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 small mistake in function getFieldMeta

**What this PR does / why we need it**:
fix a small mistake in function getFieldMeta
**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**:
```
if e, found := ext["x-kubernetes-patch-strategy"]; found {
	strategy, ok := e.(string)
	if !ok {
		return apply.FieldMetaImpl{}, fmt.Errorf("Expected string for x-kubernetes-patch-strategy by got %T", s)
	}
}
```
According the judgment above, I think we should print the type of e.
**Release note**:

```release-note
NONE
```
2018-05-18 09:54:11 -07:00
juanvallejo f3a46cf626 move additional methods from factory 2018-05-18 11:49:02 -04:00
Guoliang Wang 9219a76266 remove unused code of (pkg/scheduler) 2018-05-18 23:48:43 +08:00
Kubernetes Submit Queue 0ef96cbaf4
Merge pull request #61730 from liggitt/deflake-test-cancel-and-readd
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>.

increase timeout in TestCancelAndReadd

the flakes referenced in #51704 were still seen downstream. the current timeout approach is [known to be faulty](https://github.com/kubernetes/kubernetes/issues/51704#issuecomment-328459239), but fixing the tests has not been prioritized. this increases the timeout sufficiently to avoid flakes in the meantime

```release-note
NONE
```
2018-05-18 07:20:43 -07:00
Maciej Szulik 6eb69dfff7
Tolarate negative values when calculating job scale progress 2018-05-18 15:35:37 +02:00
Jan Safranek 080d2dfe8f Add SELinux support to CSI 2018-05-18 14:27:13 +02:00
WanLinghao 5e9e3afb2e kubectl: add aggregation rule support to clusterrole 2018-05-18 19:44:23 +08:00
Kubernetes Submit Queue 1b950d1e8e
Merge pull request #63337 from vikaschoudhary16/fix-e2e
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 e2e "When checkpoint file is corrupted should complete pod sandbo…

…x clean up"



**What this PR does / why we need it**:
This PR fixes the e2e-node test, "When checkpoint file is corrupted should complete pod sandbox clean up"

**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 #62738
Related #62937

**Special notes for your reviewer**:

**Release note**:

```release-note
None
```
/cc @dashpole @derekwaynecarr 
/sig node
2018-05-18 04:12:43 -07:00
Kubernetes Submit Queue 062f6b50bf
Merge pull request #63928 from deads2k/cli-61-apiversion-protection
Automatic merge from submit-queue (batch tested with PRs 63920, 63716, 63928, 60553, 63946). 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 protection for missing apiversion so we never serialize a bad object

we need the json and yaml printers to fail if they are going to serialize a thing that is missing apiversion and kind information.  This adds a simple check for it.

@kubernetes/sig-cli-maintainers 
/assign @juanvallejo 
/assign @soltysh 

```release-note
NONE
```
2018-05-18 01:07:18 -07:00