Commit Graph

23556 Commits (9a21343b20ba414c72bffddfc08dc568e939c470)

Author SHA1 Message Date
Kubernetes Submit Queue f7eb492f0d Merge pull request #51390 from alrs/fix-photon-pd-swallowed-errors
Automatic merge from submit-queue

Fix swallowed errors in tests of photon_pd package

**What this PR does / why we need it**: Fixes swallowed errors in the tests of the photon_pd package.

```release-note NONE
```
2017-08-26 07:32:24 -07:00
huangjiuyuan 39c61b0967 adding validations on kubelet starting configurations 2017-08-26 22:28:14 +08:00
Serguei Bezverkhi f2e89886a1 Fixes cross platform build failure
Closes #51358
2017-08-26 09:58:51 -04:00
Kubernetes Submit Queue 84d9778f22 Merge pull request #51388 from alrs/fix-scaleio-swallowed-error
Automatic merge from submit-queue (batch tested with PRs 51174, 51363, 51087, 51382, 51388)

Fix swallowed error in scaleio package tests

**What this PR does / why we need it**: Fixes a dropped error in the tests of the scaleio package.

**Release note**:
```release-note NONE
```
2017-08-26 06:43:36 -07:00
Kubernetes Submit Queue 4b7135513f Merge pull request #51382 from nicksardo/revert-51038-gce-netproj
Automatic merge from submit-queue (batch tested with PRs 51174, 51363, 51087, 51382, 51388)

Revert "GCE: Consume new config value for network project id"

Reverts kubernetes/kubernetes#51038

Broke GKE tests
2017-08-26 06:43:33 -07:00
Kubernetes Submit Queue 27fbb68f18 Merge pull request #51087 from oracle/for/upstream/master/ccm-instance-exists
Automatic merge from submit-queue (batch tested with PRs 51174, 51363, 51087, 51382, 51388)

Add InstanceExistsByProviderID to cloud provider interface for CCM

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

Currently, [`MonitorNode()`](02b520f0a4/pkg/controller/cloud/nodecontroller.go (L240)) in the node controller checks with the CCM if a node still exists by calling `ExternalID(nodeName)`. `ExternalID` is supposed to return the provider id of a node which is not supported on every cloud. This means that any clouds who cannot infer the provider id by the node name from a remote location will never remove nodes that no longer exist. 


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

**Special notes for your reviewer**:

We'll want to create a subsequent issue to track the implementation of these two new methods in the cloud providers.

**Release note**:

```release-note
Adds `InstanceExists` and `InstanceExistsByProviderID` to cloud provider interface for the cloud controller manager
```

/cc @wlan0 @thockin @andrewsykim @luxas @jhorwit2

/area cloudprovider
/sig cluster-lifecycle
2017-08-26 06:43:30 -07:00
Kubernetes Submit Queue 1e5d85a0bb Merge pull request #51174 from caesarxuchao/fix-resourcequota
Automatic merge from submit-queue

Let the quota evaluator handle mutating specs of pod & pvc

### Background
The final goal is to address https://github.com/kubernetes/kubernetes/issues/47837, which aims to allow more mutation for uninitialized objects.

To do that, we [decided](https://github.com/kubernetes/kubernetes/issues/47837#issuecomment-321462433) to let the admission controllers to handle mutation of uninitialized objects.

### Issue
#50399 attempted to fix all admission controllers so that can handle mutating uninitialized objects. It was incomplete. I didn't realize although the resourcequota admission plugin handles the update operation, the underlying evaluator didn't. This PR updated the evaluators to handle updates of uninitialized pods/pvc.

### TODO
We still miss another piece. The [quota replenish controller](https://github.com/kubernetes/kubernetes/blob/master/pkg/controller/resourcequota/replenishment_controller.go) uses the sharedinformer, which doesn't observe the deletion of uninitialized pods at the moment. So there is a quota leak if a pod is deleted before it's initialized. It will be addressed with https://github.com/kubernetes/kubernetes/issues/48893.
2017-08-26 06:07:29 -07:00
Kubernetes Submit Queue d27da4133d Merge pull request #49439 from zhangxiaoyu-zidif/fix-err-message-for-pdb
Automatic merge from submit-queue

fix error message for pdb.go

**What this PR does / why we need it**:
fix error message for pdb.go

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

**Special notes for your reviewer**:
NONE

**Release note**:

```release-note
NONE
```
2017-08-26 03:24:31 -07:00
Kubernetes Submit Queue c241cbe44d Merge pull request #51173 from liggitt/role-printers
Automatic merge from submit-queue (batch tested with PRs 51054, 51101, 50031, 51296, 51173)

Print multiple node roles, remove kubeadm-specific annotation from kubectl

related to #50010

Follow up to https://github.com/kubernetes/kubernetes/pull/50438 that removes the kubeadm-specific label, makes kubectl role-agnostic, and outputs multiple roles if present
2017-08-26 02:05:39 -07:00
Kubernetes Submit Queue 932e07af53 Merge pull request #50031 from verult/ConnectedProbe
Automatic merge from submit-queue (batch tested with PRs 51054, 51101, 50031, 51296, 51173)

Dynamic Flexvolume plugin discovery, probing with filesystem watch.

**What this PR does / why we need it**: Enables dynamic Flexvolume plugin discovery. This model uses a filesystem watch (fsnotify library), which notifies the system that a probe is necessary only if something changes in the Flexvolume plugin directory.

This PR uses the dependency injection model in https://github.com/kubernetes/kubernetes/pull/49668.

**Release Note**:
```release-note
Dynamic Flexvolume plugin discovery. Flexvolume plugins can now be discovered on the fly rather than only at system initialization time.
```

/sig-storage

/assign @jsafrane @saad-ali 
/cc @bassam @chakri-nelluri @kokhang @liggitt @thockin
2017-08-26 02:05:34 -07:00
Kubernetes Submit Queue d660a41f36 Merge pull request #51101 from zhangxiaoyu-zidif/refactor-kubelet-kuberuntime-test
Automatic merge from submit-queue (batch tested with PRs 51054, 51101, 50031, 51296, 51173)

Refactor kuberuntime test case with sets.String

**What this PR does / why we need it**:
change to make got and want use sets.String instead, since that is both safe and more clearly shows the intent.

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

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-08-26 02:05:29 -07:00
NickrenREN bc393e3f8b Add feature gate for local storage quota 2017-08-26 14:14:26 +08:00
NickrenREN a3c180e549 Add local storage support in Quota 2017-08-26 14:13:43 +08:00
Kubernetes Submit Queue 6650bbe0dd Merge pull request #50582 from dixudx/support_fieldSelector_spec.schedulerName
Automatic merge from submit-queue (batch tested with PRs 50889, 51347, 50582, 51297, 51264)

support fieldSelector spec.schedulerName

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

**Special notes for your reviewer**:
/assign @davidopp  @bsalamat
/cc @lavalamp

**Release note**:

```release-note
add fieldSelector spec.schedulerName
```
2017-08-25 22:43:32 -07:00
Kubernetes Submit Queue ea206bbe29 Merge pull request #51347 from Random-Liu/fix-no-new-privs
Automatic merge from submit-queue (batch tested with PRs 50889, 51347, 50582, 51297, 51264)

Fix NoNewPrivs and also allow remote runtime to provide the support.

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

This PR:
1) Let kubelet admit remote runtime for `NoNewPrivis` container runtime.
2) Fix a `NoNewPrivis` bug which checks wrong runtime type.

/cc @kubernetes/sig-node-bugs @jessfraz
2017-08-25 22:43:28 -07:00
Kubernetes Submit Queue 76c520cea3 Merge pull request #50889 from NickrenREN/local-storage-eviction
Automatic merge from submit-queue (batch tested with PRs 50889, 51347, 50582, 51297, 51264)

Change eviction manager to manage one single local storage resource

**What this PR does / why we need it**:
We decided to manage one single resource name, eviction policy should be modified too.

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

**Special notes for your reviewer**:

**Release note**:
```release-note
Change eviction manager to manage one single local ephemeral storage resource
```

/assign @jingxu97
2017-08-25 22:43:26 -07:00
NickrenREN 194418986f Add local storage to downwards API 2017-08-26 11:58:21 +08:00
Lars Lehtonen 47ee11437d
Fix swallowed error in iscsi package 2017-08-25 20:57:58 -07:00
Kubernetes Submit Queue c112dbcab4 Merge pull request #51341 from mtaufen/fix-port-disable
Automatic merge from submit-queue (batch tested with PRs 49850, 47782, 50595, 50730, 51341)

fix ReadOnlyPort defaulting, CAdvisorPort documentation

The ReadOnlyPort defaulting prevented passing 0 to diable via
the KubeletConfiguraiton struct.

The HealthzPort defaulting prevented passing 0 to disable via the
KubeletConfiguration struct. The documentation also failed to mention
this, but the check is performed in code.

The CAdvisorPort documentation failed to mention that you can pass 0 to
disable.


fixes #51345
2017-08-25 20:43:40 -07:00
Kubernetes Submit Queue 21aa8cacc5 Merge pull request #50730 from andrewsykim/49836
Automatic merge from submit-queue (batch tested with PRs 49850, 47782, 50595, 50730, 51341)

Cloud Controller Manager now sets Node.Spec.ProviderID

**What this PR does / why we need it**:
Cloud Controller Manager now sets `Node.Spec.ProviderID`.

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

**Special notes for your reviewer**:
* As part of an effort to move cloud controller manager into beta https://github.com/kubernetes/kubernetes/issues/48690.
2017-08-25 20:43:37 -07:00
Kubernetes Submit Queue 9e69d5b8f0 Merge pull request #50595 from k82cn/k8s_50594
Automatic merge from submit-queue (batch tested with PRs 49850, 47782, 50595, 50730, 51341)

NodeConditionPredicates should return NodeOutOfDisk error.

**What this PR does / why we need it**:
In https://github.com/kubernetes/kubernetes/pull/49932 , I moved node condition check into a predicates; but it return incorrect error :(. 

We also need to add more cases to `TestNodeShouldRunDaemonPod` which is key function of DaemonSet.

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

**Release note**:

```release-note
None
```
2017-08-25 20:43:35 -07:00
Kubernetes Submit Queue b65f3cc8dd Merge pull request #49850 from m1093782566/service-session-timeout
Automatic merge from submit-queue (batch tested with PRs 49850, 47782, 50595, 50730, 51341)

Paramaterize `stickyMaxAgeMinutes` for service in API

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

Currently I find `stickyMaxAgeMinutes` for a session affinity type service is hard code to 180min. There is a TODO comment, see

https://github.com/kubernetes/kubernetes/blob/master/pkg/proxy/iptables/proxier.go#L205

I think the seesion sticky max time varies from service to service and users may not aware of it since it's hard coded in all proxier.go - iptables, userspace and winuserspace.

Once we parameterize it in API, users can set/get the values for their different services.

Perhaps, we can introduce a new field `api.ClientIPAffinityConfig` in `api.ServiceSpec`.

There is an initial discussion about it in sig-network group. See,

https://groups.google.com/forum/#!topic/kubernetes-sig-network/i-LkeHrjs80

**Which issue this PR fixes**: 

fixes #49831

**Special notes for your reviewer**:

**Release note**:

```release-note
Paramaterize session affinity timeout seconds in service API for Client IP based session affinity.
```
2017-08-25 20:43:30 -07:00
Lars Lehtonen f77dd0ebac
Fix swallowed errors in tests of photon_pd package 2017-08-25 20:37:05 -07:00
Lars Lehtonen 7ee91d6d54
Fix swallowed error in scaleio package tests
Test log improvement
2017-08-25 20:18:44 -07:00
Kubernetes Submit Queue 85f963310e Merge pull request #50504 from yastij/fcVolume-handleFailedMount
Automatic merge from submit-queue (batch tested with PRs 51235, 50819, 51274, 50972, 50504)

handle failed mounts for fc volumes

**What this PR does / why we need it**: handles failed mounts for fc

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

**Special notes for your reviewer**: 

**Release note**:

```release-note
None
```
2017-08-25 19:40:38 -07:00
Kubernetes Submit Queue c170f5bfa2 Merge pull request #50972 from FengyunPan/external-loadBalancerIP
Automatic merge from submit-queue (batch tested with PRs 51235, 50819, 51274, 50972, 50504)

Support for specifying external LoadBalancerIP on openstack

1. Support ServiceAnnotationLoadBalancerFloatingNetworkId for LB v1

2. Support for specifying external LoadBalancerIP on openstack
    Add ServiceAnnotationLoadBalancerInternal annotation to distinguish
    between internal LoadBalancerIP and external LoadBalancerIP.


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

**Release note**:
```release-note
NONE
```
2017-08-25 19:40:36 -07:00
Kubernetes Submit Queue 9d7bdb6a5f Merge pull request #51274 from yastij/clean-cinder-detachLogError
Automatic merge from submit-queue (batch tested with PRs 51235, 50819, 51274, 50972, 50504)

Clean cinder detachlogerror

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

**Which issue this PR fixes** : fixes #50441

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-08-25 19:40:32 -07:00
Nick Sardo 0d55f6bdcb Revert "GCE: Consume new config value for network project id" 2017-08-25 18:02:10 -07:00
andrewsykim fd86022714 add deprecation warnings for auto detecting cloud providers 2017-08-25 19:30:52 -04:00
Lantao Liu a0ae7fac2b Implement stop function in streaming server.
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-08-25 23:24:30 +00:00
Josh Horwitz cf75c49883 change godoc based on feedback from luxas 2017-08-25 18:04:10 -04:00
Lantao Liu b760fa95e5 Fix NoNewPrivs and also allow remote runtime to provide the support. 2017-08-25 21:32:33 +00:00
NickrenREN 9730e3d302 Change validation for local ephemeral storage 2017-08-26 05:15:16 +08:00
NickrenREN 27901ad5df Change eviction policy to manage one single local storage resource 2017-08-26 05:14:49 +08:00
Matt Moyer 33e02aff60 Add extra group constants and validation to `pkg/bootstrap/api`.
This adds constants and validation for a new `auth-extra-groups` key on `bootstrap.kubernetes.io/token` secrets. This key allows a bootstrap token to authenticate to extra groups in addition to the `system:bootstrappers` group.

Extra groups are always applied in addition to the `system:bootstrappers` group, must begin with a `system:bootstrappers:` prefix, are limited in length, and are limited to a restricted set of characters (alphanumeric, colons, and dashes without a trailing colon/dash).
2017-08-25 16:04:53 -05:00
Yassine TIJANI 588fe268dc handle iscsi failed mounts 2017-08-25 22:32:13 +02:00
Josh Horwitz 82a69b2815 refactor method name as per comments 2017-08-25 16:25:19 -04:00
Josh Horwitz 3528ceb27f address test & doc comments 2017-08-25 16:15:55 -04:00
Michael Taufen 6918ab1d70 fix ReadOnlyPort, HealthzPort, CAdvisorPort defaulting/documentation
The ReadOnlyPort defaulting prevented passing 0 to diable via
the KubeletConfiguraiton struct.

The HealthzPort defaulting prevented passing 0 to disable via the
KubeletConfiguration struct. The documentation also failed to mention
this, but the check is performed in code.

The CAdvisorPort documentation failed to mention that you can pass 0 to
disable.
2017-08-25 13:15:36 -07:00
Yang Guo f9767d2f71 Change StatsProvider interface to provide container stats from either cadvisor or CRI and implement this interface using cadvisor 2017-08-25 13:11:26 -07:00
Kubernetes Submit Queue 08c2071bec Merge pull request #47171 from xilabao/validate-nonResourceURL-in-create-clusterrole
Automatic merge from submit-queue (batch tested with PRs 51038, 50063, 51257, 47171, 51143)

validate nonResourceURL in create clusterrole

**Release note**:

```release-note
NONE
```
2017-08-25 12:31:07 -07:00
Kubernetes Submit Queue cd908f3e59 Merge pull request #51257 from NickrenREN/validation-bugfix
Automatic merge from submit-queue (batch tested with PRs 51038, 50063, 51257, 47171, 51143)

Fix validation return value

Errors returned by some validation functions may be wrong

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


**Release note**:
```release-note
NONE
```
2017-08-25 12:31:05 -07:00
Kubernetes Submit Queue c02afa6e39 Merge pull request #51038 from nicksardo/gce-netproj
Automatic merge from submit-queue

GCE: Consume new config value for network project id

This PR will allow users to specify the network's project ID in gce.conf. If it's not specified, it will be filled with `ProjectID`.  This means that `network-project-id` is a required field for building a cluster on a shared VPC network. However, this means the field does not need to be specified for GKE clusters on non-shared networks. 

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

**Special notes for your reviewer**:
/assign @bowei @freehan 

**Release note**:
```release-note
NONE
```
2017-08-25 12:25:50 -07:00
Matthew Wong 19ebaf2870 Don't update pvc.status.capacity if pvc is already Bound 2017-08-25 15:23:25 -04:00
Jordan Liggitt c7defb806f
Generated files 2017-08-25 15:01:08 -04:00
Cheng Xing 396c3c7c6f Adding dynamic Flexvolume plugin discovery capability, using filesystem watch. 2017-08-25 11:42:32 -07:00
Kubernetes Submit Queue c19785cfea Merge pull request #49674 from crimsonfaith91/rollout
Automatic merge from submit-queue (batch tested with PRs 50033, 49988, 51132, 49674, 51207)

StatefulSet kubectl rollout command

**What this PR does / why we need it**: This PR implements StatefulSet kubectl rollout command, covering `history`, `status`, and `undo`.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
kubectl rollout `history`, `status`, and `undo` subcommands now support StatefulSets.
```
2017-08-25 11:07:15 -07:00
Kubernetes Submit Queue fe0c519f49 Merge pull request #51132 from ConnorDoyle/cpuset-helpers
Automatic merge from submit-queue (batch tested with PRs 50033, 49988, 51132, 49674, 51207)

Add cpuset helper library.

Blocker for CPU manager #49186 (1 of 6)

@sjenning @derekwaynecarr 

```release-note
NONE
```
2017-08-25 11:07:12 -07:00
Kubernetes Submit Queue dfd1ca7728 Merge pull request #49988 from sbezverk/fsgroup_check
Automatic merge from submit-queue (batch tested with PRs 50033, 49988, 51132, 49674, 51207)

Adding fsGroup check before mounting a volume

fsGroup check will be enforcing that if a volume has already been
mounted by one pod and another pod wants to mount it but has a different
fsGroup value, this mount operation will not be allowed.

Closes #45053
2017-08-25 11:07:09 -07:00
Kubernetes Submit Queue c04e516373 Merge pull request #50033 from cmluciano/cml/addnpcidrselector
Automatic merge from submit-queue (batch tested with PRs 50033, 49988, 51132, 49674, 51207)

Add IPBlock to Network Policy

**What this PR does / why we need it**:
 Add ipBlockRule to NetworkPolicyPeer.

**Which issue this PR fixes**
fixes #49978

**Special notes for your reviewer**:
- I added this directly as a field on the existing API per guidance from API-Machinery/lazy SIG-Network consensus.

Todo:
- [ ] Documentation comments to mention this is beta, unless we want to go straight to GA
- [ ] e2e tests

**Release note**:
```
Support ipBlock in NetworkPolicy
```
2017-08-25 11:07:07 -07:00
Matthew Wong 8b5b2e9927 Set flexvolumeplugin.host so that it's not nil 2017-08-25 13:36:17 -04:00
Kubernetes Submit Queue cb6f32e8ba Merge pull request #50841 from zjj2wry/kubectl-set-image-ignoring
Automatic merge from submit-queue (batch tested with PRs 50872, 51103, 51220, 51285, 50841)

Fix issue(#49695)kubectl set image deployment is ignoring --selector

**What this PR does / why we need it**:
closes #49695

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-08-25 10:10:13 -07:00
Kubernetes Submit Queue 256113f7b4 Merge pull request #51103 from jsafrane/exec-scaleio
Automatic merge from submit-queue (batch tested with PRs 50872, 51103, 51220, 51285, 50841)

ScaleIO:  Use VolumeHost.GetExec() to execute stuff in volume plugins

This PR updates ScaleIO volume plugin to use `VolumeHost.GetExec()` to execute utilities like mkfs and lsblk instead of simple `os/exec` + to use a fresh `mounter` for every `SetUp` / `TearDown` calls, as they may be different each time.

This prepares the volume plugin to run these utilities in containers instead of running them on the host + makes the volume plugin more independent and less hardcoded.

See proposal in https://github.com/kubernetes/community/pull/589.

Note that this PR does **not** change place where the utilities are executed - `VolumeHost.GetExec()` still leads directly to `os/exec`. It will be changed when the aforementioned proposal is merged and implemented.

**Special notes for your reviewer**:

* I needed to pass `mount.Exec` interface from the place where it is available down to `SioClient` where it's needed to execute stuff.


@kubernetes/sig-storage-pr-reviews 
/assign @vladimirvivien @rootfs 

**Release note**:
```release-note
NONE
```
2017-08-25 10:10:06 -07:00
devinyan 8ab2110328 add an starting info log of namespace controller. 2017-08-26 00:25:37 +08:00
Yu-Ju Hong 91275d23e2 GCE: Add a fake forwarding rule service
Also add more methods to the address service.
2017-08-25 08:49:11 -07:00
Nick Sardo 0028385e20 Consume new config value for network project id 2017-08-25 08:42:28 -07:00
FengyunPan 79d2b1dd4e Implement GetZoneByProviderID and GetZoneByNodeName for openstack
This is part of #50926
cc @wlan0
2017-08-25 23:08:00 +08:00
Kubernetes Submit Queue 6a3647a7e9 Merge pull request #50155 from lucab85/i18n-Italian
Automatic merge from submit-queue (batch tested with PRs 46986, 51214, 51169, 50155, 51261)

Add Italian translation for kubectl

**What this PR does / why we need it:**
This PR provides first attempt to translate kubectl in Italian (related to #40645, #45573,
#45562, #40591, #46559).

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

**Special notes for your reviewer:**
This PR requires Italian people to assist in the review. I'm native in Italian with BS in Computer Science.

```release-note
Adding Italian translation for kubectl
```
2017-08-25 07:58:11 -07:00
Kubernetes Submit Queue 2b28555c2e Merge pull request #51169 from MikaelCluseau/wip-flexvolume-caps
Automatic merge from submit-queue (batch tested with PRs 46986, 51214, 51169, 50155, 51261)

refactor(flexvolume): simplify capabilities handling

```release-note
Simplify capabilities handling in FlexVolume.
```
2017-08-25 07:58:09 -07:00
Kubernetes Submit Queue 26192e1be7 Merge pull request #51214 from sttts/sttts-cut-off-api-apiserver
Automatic merge from submit-queue (batch tested with PRs 46986, 51214, 51169, 50155, 51261)

admission api: cut off api from k8s.io/apiserver
2017-08-25 07:58:06 -07:00
Kubernetes Submit Queue d7965e9331 Merge pull request #51197 from deads2k/api-02-field-default
Automatic merge from submit-queue (batch tested with PRs 51114, 51233, 51024, 51053, 51197)

default field selectors

We have a lot of code around field selectors that doesn't add much value. Every gettable resources probably wants name and namespace by default and since they all use metav1 (today), we can assign that as a default. If we think we'll always have metav1 style name and namespace, then this makes a reasonable default and you can always set something different.

This removes cruft and avoids the risk of accidentally forgetting a field selector.  

@kubernetes/sig-api-machinery-misc @smarterclayton
2017-08-25 06:22:20 -07:00
Kubernetes Submit Queue 4a4c194bbd Merge pull request #51024 from fisherxu/UTautoscaler
Automatic merge from submit-queue (batch tested with PRs 51114, 51233, 51024, 51053, 51197)

add UT for pkg/apis/autoscaling/v2alpha1/defaults.go

**What this PR does / why we need it**:
add UT for pkg/apis/autoscaling/v2alpha1/defaults.go

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

**Special notes for your reviewer**:

**Release note**:

```release-note
None
```
2017-08-25 06:22:14 -07:00
Kubernetes Submit Queue c025965db3 Merge pull request #51233 from bowei/add-alias
Automatic merge from submit-queue (batch tested with PRs 51114, 51233, 51024, 51053, 51197)

Add AddAliasToInstance() to gce cloud provider

- Adds AddAliasToInstance() to the GCE cloud provider.
- Adds field "secondary-range-name" to the gce.conf configuration file.

```release-note
NONE
```
2017-08-25 06:22:12 -07:00
Kubernetes Submit Queue d3dc9cd9ba Merge pull request #51114 from jsafrane/exec-rbd
Automatic merge from submit-queue (batch tested with PRs 51114, 51233, 51024, 51053, 51197)

rbd: Use VolumeHost.GetExec() to execute stuff in volume plugins

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

This PR updates rbd volume plugin to use `VolumeHost.GetExec()` to execute utilities like mkfs and lsblk instead of simple `os/exec`. This prepares the volume plugin to run these utilities in containers instead of running them on the host + makes the volume plugin more independent and less hardcoded.

See proposal in https://github.com/kubernetes/community/pull/589.

Note that this PR does **not** change place where the utilities are executed - `VolumeHost.GetExec()` still leads directly to `os/exec`. It will be changed when the aforementioned proposal is merged and implemented.

@kubernetes/sig-storage-pr-reviews 

**Release note**:
```release-note
NONE
```
2017-08-25 06:22:09 -07:00
Kubernetes Submit Queue 0f3f232b6f Merge pull request #51095 from cofyc/rbd_log
Automatic merge from submit-queue

RBD Plugin: Log RBD Attach/Mount/Unmout actions in addition to Detach

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

Currently, RBD Plugin can log a info message for a successful action of RBD Unmap, e.g.:

```
I0822 09:32:31.595162   15177 rbd_util.go:349] rbd: successfully unmap device /dev/rbd0
```

This PR adds logs for another three important actions: Attach, Mount and Unmount.

Logging these actions and associated info is *very* useful in diagnosing problems.

**Special notes for your reviewer**:

Example RBD Plugin logs of successful pod volume attaching and mounting:

```
I0822 09:30:27.512015   15177 rbd_util.go:148] lock list output "2017-08-22 09:30:27.493889 7fa4ae3c23c0 -1 auth: unable to find a keyring on /etc/ceph/ceph.client.kube.keyring,/etc/ceph/ceph.keyring,/etc/ceph/keyring,/etc/ceph/keyring.bin: (2) No such file or directory\n"
W0822 09:30:27.547513   15177 rbd_util.go:460] rbd: no watchers on kubernetes-dynamic-pvc-83bfd49e-871c-11e7-b88e-000c291fbe71
I0822 09:30:27.704703   15177 rbd_util.go:315] rbd: successfully map image kube/kubernetes-dynamic-pvc-83bfd49e-871c-11e7-b88e-000c291fbe71 to /dev/rbd0
I0822 09:30:27.965603   15177 rbd_util.go:322] rbd: successfully mount image kube/kubernetes-dynamic-pvc-83bfd49e-871c-11e7-b88e-000c291fbe71 at /var/lib/kubelet/plugins/kubernetes.io/rbd/rbd/kube-image-kubernetes-dynamic-pvc-83bfd49e-871c-11e7-b88e-000c291fbe71
```

Example RBD Plugin logs of successful pod volume detaching and unmouting:

```
I0822 09:32:31.380124   15177 rbd_util.go:334] rbd: successfully umount mountpoint /var/lib/kubelet/plugins/kubernetes.io/rbd/rbd/kube-image-kubernetes-dynamic-pvc-83bfd49e-871c-11e7-b88e-000c291fbe71
I0822 09:32:31.459867   15177 rbd_util.go:148] lock list output "2017-08-22 09:32:31.443643 7f2bb8ab53c0 -1 auth: unable to find a keyring on /etc/ceph/ceph.client.kube.keyring,/etc/ceph/ceph.keyring,/etc/ceph/keyring,/etc/ceph/keyring.bin: (2) No such file or directory\nThere is 1 exclusive lock on this image.\nLocker       ID                     Address                    \nclient.64117 kubelet_lock_magic_k8s 192.168.2.128:0/4124042516 \n"
I0822 09:32:31.595162   15177 rbd_util.go:349] rbd: successfully unmap device /dev/rbd0
```

It does not add too much logs, but admins/ops can know what RBD plugin are doing internally and exact time a RBD image is mapped, mounted or unmounted (in addition to unmapped).

**Release note**:

```release-note
NONE
```
2017-08-25 05:00:21 -07:00
zhengjiajin 357db0c39c Add kubectl set env command 2017-08-25 19:53:22 +08:00
Klaus Ma e4c58a3c02 Added test case for Predicates. 2017-08-25 19:13:41 +08:00
Kubernetes Submit Queue d7102a0f36 Merge pull request #49770 from FengyunPan/fix-GetInstanceIDFromProviderID
Automatic merge from submit-queue (batch tested with PRs 51244, 50559, 49770, 51194, 50901)

Fix the matching rule of instance ProviderID

Url.Parse() can't parse ProviderID which contains ':///'.
This PR use regexp to match ProviderID.

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

**Release note**:
```release-note
NONE
```
2017-08-25 04:11:10 -07:00
Kubernetes Submit Queue 69187e0651 Merge pull request #51244 from lichuqiang/fix_rollback
Automatic merge from submit-queue (batch tested with PRs 51244, 50559, 49770, 51194, 50901)

fix status in deployment_rollback response

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

fix status in deployment_rollback response

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
#51243
2017-08-25 04:11:05 -07:00
Dr. Stefan Schimanski 8e63473d9e admission api: cut off api from k8s.io/apiserver
This caused an import cycle: api -> apiserver -> api

Fixes https://github.com/kubernetes/kubernetes/issues/51212
2017-08-25 12:29:29 +02:00
m1093782566 ad73fe68a7 auto gen code 2017-08-25 18:28:14 +08:00
Kubernetes Submit Queue 59a63be022 Merge pull request #51213 from humblec/glusterfs-error
Automatic merge from submit-queue (batch tested with PRs 51229, 50131, 51074, 51167, 51213)

Avoid explicit mention of plugin name in error strings.
2017-08-25 03:16:11 -07:00
Kubernetes Submit Queue 7273a46630 Merge pull request #51167 from feiskyer/apparmor-validate
Automatic merge from submit-queue (batch tested with PRs 51229, 50131, 51074, 51167, 51213)

Allow remote runtimes to pass apparmor host validation

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

Allow remote runtimes to pass apparmor host validation.

**Which issue this PR fixes** : fixes #51156

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-08-25 03:16:09 -07:00
Kubernetes Submit Queue c358544e83 Merge pull request #51074 from m1093782566/util-port
Automatic merge from submit-queue (batch tested with PRs 51229, 50131, 51074, 51167, 51213)

[proxy] Clean up LocalPort related functions and structures in proxier.go

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

See, https://github.com/kubernetes/kubernetes/blob/master/pkg/proxy/iptables/proxier.go#L1694

I think RevertPorts() is independent from iptables, and would be used by other proxiers which needs to hold/close local port.

Perhaps we can move RevertPorts() from proxier.go to pkg/proxy/util package so that it can be consumed among different proxiers. And, reduce codes in proxier.go

**Which issue this PR fixes**:

fixes #51073 

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-08-25 03:16:06 -07:00
m1093782566 c355a2ac96 Paramaterize stickyMaxAgeMinutes for service in API 2017-08-25 17:44:47 +08:00
Kubernetes Submit Queue ed6efbc0b5 Merge pull request #49502 from rootfs/cephfs-pv-ns
Automatic merge from submit-queue (batch tested with PRs 50213, 50707, 49502, 51230, 50848)

Refactor CephFS PV spec

**What this PR does / why we need it**:
refactor CephFS Volume Persistent Volume Spec so CephFS PV's SecretRef allows referencing a secret from a persistent volume in any namespace. This allows locating credentials for persistent volumes in namespaces other than the one containing the PVC.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes https://github.com/kubernetes-incubator/external-storage/issues/309

**Special notes for your reviewer**:
@kubernetes/sig-storage-api-reviews 

**Release note**:

```release-note
Allow CephFS PV to specify a namespace for secret
```
2017-08-25 01:10:33 -07:00
Kubernetes Submit Queue 1d5b365ed5 Merge pull request #50213 from zhangxiaoyu-zidif/fix-comment-cronjob-utils
Automatic merge from submit-queue (batch tested with PRs 50213, 50707, 49502, 51230, 50848)

Fix comment of cronjob utils.go

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-08-25 01:10:28 -07:00
Yassine TIJANI c02aeb7ec1 handle failed mounts for fc volumes 2017-08-25 09:59:42 +02:00
Kubernetes Submit Queue 0cf928f681 Merge pull request #51222 from yujuhong/fake-addr-svc
Automatic merge from submit-queue (batch tested with PRs 51224, 51191, 51158, 50669, 51222)

Change the FakeCloudAddressService to store Alpha objects internally

The change assumes the compute Alpha object is the superset of the v1
object. By storing the Alpha objects internally in the fake, we can
convert them to Beta and v1 to test different functions.
2017-08-24 22:59:38 -07:00
Kubernetes Submit Queue 74f4fda7be Merge pull request #51223 from apelisse/openapi-reference-first-class
Automatic merge from submit-queue (batch tested with PRs 51148, 50816, 49741, 50858, 51223)

openapi: Change references to be first-class

**What this PR does / why we need it**:
References in the openapi are currently completely hidden from the
model, and just passed through as we walk the tree. The problem is that
they can have a different description and more importantly, different
extensions.

Change them to be first-class citizen, and fully part of the model. It
means that visitors have to implement one more function and decide if
something specific should be done with references. Validation is updated
to just completely ignore them and passthrough (like it was done
before).

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

**Special notes for your reviewer**:

**Release note**:
```release-note
NONE
```
2017-08-24 21:51:11 -07:00
Kubernetes Submit Queue 909a0984f1 Merge pull request #50858 from andrewsykim/49308
Automatic merge from submit-queue (batch tested with PRs 51148, 50816, 49741, 50858, 51223)

cloudprovider.Zones should support external cloud providers

**What this PR does / why we need it**:
Provides methods in cloudprovider.Zones that allows external cloud providers to set the correct zone labels to nodes. Part of https://github.com/kubernetes/kubernetes/issues/48690

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

**Special notes for your reviewer**:
Should help with getting ccm/external cloud providers to beta. 

**Release note**:
```release-note
cloudprovider.Zones should support external cloud providers
```

cc @luxas @wlan0 @thockin
2017-08-24 21:51:08 -07:00
Kubernetes Submit Queue 4f19a8fd2a Merge pull request #49741 from smarterclayton/server_printer
Automatic merge from submit-queue (batch tested with PRs 51148, 50816, 49741, 50858, 51223)

Add tests around TableConvert and server side printing

Also wire in more table printers

@fabianofranz
2017-08-24 21:51:05 -07:00
Kubernetes Submit Queue ca6348eeb7 Merge pull request #50816 from YuxiJin-tobeyjin/errdefine
Automatic merge from submit-queue (batch tested with PRs 51148, 50816, 49741, 50858, 51223)

Remove redundant err definition

**What this PR does / why we need it**:
Remove redundant err definition,err is defined by using "err :=" at line 107

**Release note**:
NONE
```release-note
```
2017-08-24 21:51:03 -07:00
andrewsykim 2cc3c33a4b Cloud Controller Manager now sets Node.Spec.ProviderID 2017-08-24 23:00:14 -04:00
Kubernetes Submit Queue 657db0eae7 Merge pull request #51258 from dixudx/fix_hostpath_fuzzer
Automatic merge from submit-queue

fix fuzzer for hostpath type that the path can be an empty string

**What this PR does / why we need it**:
It seems the path of `HostPath` generated by fuzzer can be an empty string. This is causing [pull-kubernetes-unit](https://k8s-gubernator.appspot.com/builds/kubernetes-jenkins/pr-logs/directory/pull-kubernetes-unit) failing.

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

**Special notes for your reviewer**:
/assign @thockin @luxas @ixdy 

**Release note**:

```release-note
None
```
2017-08-24 19:05:55 -07:00
hzxuzhonghu 2e0156ad83 fix validation return error 2017-08-25 10:01:21 +08:00
NickrenREN a975ee1301 Fix validation return value 2017-08-25 09:25:43 +08:00
andrewsykim bd3cc83110 cloudprovider.Zones should support external cloud providers 2017-08-24 21:05:49 -04:00
Josh Horwitz 2f1ea47c83 Add InstanceExists* methods to cloud provider interface for CCM 2017-08-24 20:41:28 -04:00
Clayton Coleman 8f41db8100
Allow bearer requests to be proxied by kubectl proxy
Use a fake transport to capture changes to the request and then surface
them back to the end user.
2017-08-24 20:16:59 -04:00
crimsonfaith91 ebdbafd2c5 statefulSet kubectl rollout command 2017-08-24 16:43:03 -07:00
Chao Xu 4928c8d1bf let resourcequota evaluator handle uninitialid pod and pvc 2017-08-24 14:50:03 -07:00
Serguei Bezverkhi 1be99dd78e Adding fsGroup check before mounting a volume
fsGroup check will be enforcing that if a volume has already been
mounted by one pod and another pod wants to mount it but has a different
fsGroup value, this mount operation will not be allowed.
2017-08-24 17:33:51 -04:00
Yassine TIJANI d433ecd6cb cleaning dettach logic since it's not needed 2017-08-24 22:22:58 +02:00
Christopher M. Luciano 02735c3fb2
IPBlock generated code
Signed-off-by: Christopher M. Luciano <cmluciano@us.ibm.com>
2017-08-24 16:20:15 -04:00
Christopher M. Luciano 54a058f792
Add networking fuzzer
Signed-off-by: Christopher M. Luciano <cmluciano@us.ibm.com>
2017-08-24 16:20:13 -04:00
Christopher M. Luciano b75dc93dd4
Add IPBlock to NetworkPolicy
Signed-off-by: Christopher M. Luciano <cmluciano@us.ibm.com>
2017-08-24 16:20:04 -04:00
Huamin Chen 9f0aad32b0 generated files
Signed-off-by: Huamin Chen <hchen@redhat.com>
2017-08-24 18:59:08 +00:00
Huamin Chen 9e65623187 refactor CephFS PV spec to use SecretReference
Signed-off-by: Huamin Chen <hchen@redhat.com>
2017-08-24 18:49:05 +00:00
Kubernetes Submit Queue 432790df88 Merge pull request #51198 from mattmoyer/rename-experimental-bootstrap-token-auth
Automatic merge from submit-queue (batch tested with PRs 50713, 47660, 51198, 51159, 51195)

kubeapiserver: rename `--experimental-bootstrap-token-auth` to `--enable-bootstrap-token-auth`.

#**What this PR does / why we need it**:
This change renames the API server `--experimental-bootstrap-token-auth` flag to `--enable-bootstrap-token-auth`. The old flag is accepted but generates a warning.

In 1.9, we will drop support for `--experimental-bootstrap-token-auth` entirely.

#### Example of the warning log:
```
$ kube-apiserver --experimental-bootstrap-token-auth --etcd-servers https://127.0.0.1:1234 --service-cluster-ip-range 10.0.1.0/24
Flag --experimental-bootstrap-token-auth has been deprecated, use --enable-bootstrap-token-auth instead.
[...]
```

**Which issue this PR fixes** fixes https://github.com/kubernetes/kubernetes/issues/50613

**Release note**:
```release-note
Renamed the API server flag `--experimental-bootstrap-token-auth` to `--enable-bootstrap-token-auth`. The old value is accepted with a warning in 1.8 and will be removed in 1.9.
```

/sig cli
/sig cluster-lifecycle

cc @luxas
2017-08-24 11:17:09 -07:00
Yecheng Fu c648505f76 RBD Plugin: Log RBD Attach/Mount/Unmout actions at logging level 3 2017-08-24 15:43:15 +00:00
Huamin Chen 8a38cf1b1b generated files
Signed-off-by: Huamin Chen <hchen@redhat.com>
2017-08-24 14:53:00 +00:00
Huamin Chen 4525446af2 azure file volume: add secret namespace api
Signed-off-by: Huamin Chen <hchen@redhat.com>
2017-08-24 14:49:58 +00:00
Yu-Ju Hong 359fc7a4f4 Change the FakeCloudAddressService to store Alpha objects internally
The change assumes the compute Alpha object is the superset of the v1
object. By storing the Alpha objects internally in the fake, we can
convert them to Beta and v1 to test different functions.
2017-08-24 07:43:29 -07:00
Kubernetes Submit Queue 2c214baefc Merge pull request #51208 from simo5/pshfatal
Automatic merge from submit-queue (batch tested with PRs 47115, 51196, 51204, 51208, 51206)

Add an OrDie version for AddPostStartHook

Simplifies usage and consolidate the error message so it is always
the same everywhere.

```release-note
NONE
```
2017-08-24 07:20:13 -07:00
Kubernetes Submit Queue 9537241702 Merge pull request #47115 from zhangxiaoyu-zidif/add-check-err-for-kubelet
Automatic merge from submit-queue (batch tested with PRs 47115, 51196, 51204, 51208, 51206)

Delete redundant err definition

**What this PR does / why we need it**:
Delete reduandant err definition
Line 307 has err definition and initialization.


**Release note**:

```release-note
NONE
```
2017-08-24 07:20:03 -07:00
Kubernetes Submit Queue 73a6ee1dcc Merge pull request #51146 from mtaufen/remove-crashloop-detection
Automatic merge from submit-queue

Remove crash loop "detection" from the dynamic kubelet config feature

**What this PR does / why we need it**:
The subfeature was a cool idea, but in the end it is very complex to
separate Kubelet restarts into crash-loops caused by config vs.
crash-loops caused by other phenomena, like admin-triggered node restarts,
kernel panics, and and process babysitter behavior. Dynamic kubelet config
will be better off without the potential for false positives here.

Removing this subfeature also simplifies dynamic configuration by
reducing persistent state:
- we no longer need to track bad config in a file
- we no longer need to track kubelet startups in a file

**Which issue this PR fixes**: fixes #50216 

**Release note**:

```release-note
NONE
```
2017-08-24 05:34:32 -07:00
Kubernetes Submit Queue 0803d108be Merge pull request #51189 from humblec/iscsi-init-printer
Automatic merge from submit-queue (batch tested with PRs 51193, 51154, 42689, 51189, 51200)

Add initiatorname in iscsi describe printer.

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


```release-note-none
```
2017-08-24 04:38:10 -07:00
Mikaël Cluseau 22d5e4810b refactor(flexvolume): simplify capabilities handling 2017-08-24 22:18:58 +11:00
Kubernetes Submit Queue 5a76d7ab63 Merge pull request #50539 from brendandburns/svc
Automatic merge from submit-queue (batch tested with PRs 51108, 51035, 50539, 51160, 50947)

Delete load balancers if the UIDs for services don't match.

An attempt to fix https://github.com/kubernetes/kubernetes/issues/43730

@thockin @djsly
2017-08-24 02:32:09 -07:00
Kubernetes Submit Queue 737ded5aeb Merge pull request #51035 from mrogers950/sa-desc-event
Automatic merge from submit-queue (batch tested with PRs 51108, 51035, 50539, 51160, 50947)

Show events when describing service accounts

**What this PR does / why we need it**:
Any events associated with service accounts should appear in the describe output.

**Which issue this PR fixes**:

**Special notes for your reviewer**:

**Release note**:

```release-note
Show events when describing service accounts
```
2017-08-24 02:32:06 -07:00
Kubernetes Submit Queue 915371cfdc Merge pull request #51108 from jsafrane/exec-iscsi
Automatic merge from submit-queue (batch tested with PRs 51108, 51035, 50539, 51160, 50947)

iscsi: Use VolumeHost.GetExec() to execute stuff in volume plugins

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

This PR updates iSCSI volume plugin to use `VolumeHost.GetExec()` to execute utilities like mkfs and lsblk instead of simple `os/exec`. This prepares the volume plugin to run these utilities in containers instead of running them on the host + makes the volume plugin more independent and less hardcoded.

See proposal in https://github.com/kubernetes/community/pull/589.

Note that this PR does **not** change place where the utilities are executed - `VolumeHost.GetExec()` still leads directly to `os/exec`. It will be changed when the aforementioned proposal is merged and implemented.

**Release note**:
```release-note
NONE
```
2017-08-24 02:32:04 -07:00
Di Xu 2fd25b6796 fix fuzzer for hostpath type that the path can be an empty string 2017-08-24 17:24:04 +08:00
lichuqiang d5a937dc20 fix status in deployment_rollback response 2017-08-24 17:09:00 +08:00
Kubernetes Submit Queue c041567b5a Merge pull request #46597 from dixudx/implement_proposal_34058
Automatic merge from submit-queue (batch tested with PRs 51113, 46597, 50397, 51052, 51166)

implement proposal 34058: hostPath volume type

**What this PR does / why we need it**:
implement proposal #34058

**Which issue this PR fixes** : fixes #46549

**Special notes for your reviewer**:
cc @thockin @luxas @euank PTAL
2017-08-23 23:16:27 -07:00
Bowei Du 1f4dc5559d Add AddAliasToInstance() to gce cloud provider
- Adds AddAliasToInstance() to the GCE cloud provider.
- Adds field "secondary-range-name" to the gce.conf configuration file.

```release-note
NONE
```
2017-08-23 23:10:20 -07:00
Kubernetes Submit Queue 3f78723427 Merge pull request #51113 from jsafrane/exec-quobyte
Automatic merge from submit-queue

quobyte: Use VolumeHost.GetExec() to execute stuff in volume plugins

**What this PR does / why we need it**:
This PR updates ~~nfs~~ quobyte volume plugin to use `VolumeHost.GetExec()` to execute utilities like mkfs and lsblk instead of simple `os/exec`. This prepares the volume plugin to run these utilities in containers instead of running them on the host + makes the volume plugin more independent and less hardcoded.

See proposal in https://github.com/kubernetes/community/pull/589.

Note that this PR does **not** change place where the utilities are executed - `VolumeHost.GetExec()` still leads directly to `os/exec`. It will be changed when the aforementioned proposal is merged and implemented.

@kubernetes/sig-storage-pr-reviews 

**Release note**:
```release-note
NONE
```
2017-08-23 23:03:47 -07:00
Kubernetes Submit Queue ef1b835220 Merge pull request #50646 from rickypai/rpai/hostalias_hostnetwork
Automatic merge from submit-queue

Support HostAlias for HostNetwork Pods

**What this PR does / why we need it**: Currently, HostAlias does not support HostNetwork pods because historically, kubelet only manages hosts file for non-HostNetwork pods. With the recent change in https://github.com/kubernetes/kubernetes/pull/49140, kubelet now manages hosts file for all Pods, which enables HostAlias support also.

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

**Special notes for your reviewer**: might be easier to review commit-by-commit

**Release note**:

```release-note
HostAlias is now supported for both non-HostNetwork Pods and HostNetwork Pods.
```

@yujuhong @hongchaodeng @thockin
2017-08-23 22:06:27 -07:00
Kubernetes Submit Queue 5cb1cccd40 Merge pull request #51138 from yujuhong/alpha-calls
Automatic merge from submit-queue

GCE: Add functions for Alpha address and forwarding rules
2017-08-23 21:17:07 -07:00
m1093782566 a7fd545d49 clean up LocalPort in proxier.go 2017-08-24 11:16:38 +08:00
Kubernetes Submit Queue c23e5b604e Merge pull request #51022 from wackxu/fixcodeanno
Automatic merge from submit-queue (batch tested with PRs 50489, 51070, 51011, 51022, 51141)

Fixed code comments that were not updated

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

The comment of the args ‘KubeReserved’ is out of date and there is no consistent  with command line messages

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


**Release note**:

```
NONE
```
2017-08-23 19:54:30 -07:00
Kubernetes Submit Queue 9b8cb7510a Merge pull request #51070 from NickrenREN/ephemeral-storage-name
Automatic merge from submit-queue (batch tested with PRs 50489, 51070, 51011, 51022, 51141)

Add ephemeral local storage resource name first

Since finally decided the ephemeral local storage resource name, send this PR to add the resource name first, and then i will rebase all my PRs about local storage isolation

**Special notes for your reviewer**:
related to: #50818 

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

/assign @jingxu97
2017-08-23 19:54:25 -07:00
Kubernetes Submit Queue aef39e6f47 Merge pull request #50489 from yujunzhang/Fix-the-typo-of-WithAnonymous
Automatic merge from submit-queue (batch tested with PRs 50489, 51070, 51011, 51022, 51141)

Fix the method name of BuiltInAuthenticationOptions.WithAnyonymous

change the BuiltInAuthenticationOptions.WithAnyonymous to
WithAnonymous would be better.



**What this PR does / why we need it**:
The BuiltInAuthenticationOptions.WithAnyonymous method name should be a meaningful name of  WithAnonymous

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

**Special notes for your reviewer**:

**Release note**:

```release-note
None
```
2017-08-23 19:54:22 -07:00
Pengfei Ni 15b9871d50 Allow remote runtimes to pass apparmor host validation 2017-08-24 09:18:46 +08:00
Kubernetes Submit Queue 83e9cadc02 Merge pull request #50578 from pwittrock/depsutils
Automatic merge from submit-queue (batch tested with PRs 51047, 48573, 50764, 51092, 50578)

Library updates to better support removing kubectl deps on kubernetes/kubernetes

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

**Which issue this PR fixes**: kubernetes/kubectl#50

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-08-23 17:56:20 -07:00
Kubernetes Submit Queue 55c601b5d8 Merge pull request #51092 from humblec/gluster-validation
Automatic merge from submit-queue (batch tested with PRs 51047, 48573, 50764, 51092, 50578)

Replace validateGlusterfs() with validateGlusterfsVolumeSource() for consistency.
2017-08-23 17:56:17 -07:00
Kubernetes Submit Queue 6bb928a3df Merge pull request #50931 from jrperritt/fix-pool-panic
Automatic merge from submit-queue

cloudprovider/openstack bug fix: don't try to append pool id if pool doesn't exist

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

This fixes a bug in the OpenStack cloud provider that could cause a panic.

Consider what will happen in the current `LbaasV2.EnsureLoadBalancerDeleted` code if `nil, ErrNotFound` is returned by `getPoolByListenerID`.
2017-08-23 16:23:29 -07:00
Kubernetes Submit Queue b973d65ccc Merge pull request #51211 from bgrant0607/api-approver
Automatic merge from submit-queue

Add liggitt as an API approver. 

@liggitt has been on the project since 2014, was a key participant of the evolution of the v1beta3 and v1 APIs, has performed many API reviews, has helped to develop the API conventions (most recently with the added guidance regarding alpha fields), and has demonstrated attention to detail and good taste. His efforts have helped keep the API sane and consistent.

Also note that bgrant0607 is an approver, but shouldn't be auto-assigned.

cc @kubernetes/api-approvers 

**Release note**:
```release-note
NONE
```
2017-08-23 14:32:39 -07:00
Kubernetes Submit Queue b75d423979 Merge pull request #51066 from vmware/MultiAttachVolumeIssueVsphere
Automatic merge from submit-queue

Allow attach of volumes to multiple nodes for vSphere

This is a fix for issue #50944 which doesn't allow a volume to be attached to a new node after the node is powered off where the volume was previously attached.

Current behaviour:
One of the cluster worker nodes was powered off in vCenter.
Pods running on this node have been rescheduled on different nodes but got stuck in ContainerCreating. It failed to attach the volume on the new node with error "Multi-Attach error for volume pvc-xxx, Volume is already exclusively attached to one node and can't be attached to another" and hence the application running in the pod has no data available because the volume is not attached to the new node. Since the volume is still attached to powered off node, any attempt to attach the volume on the new node failed with error "Multi-Attach error". It's stuck for 6 minutes until attach/detach controller forcefully tried to detach the volume on the powered off node. After the end of 6 minutes when volume is detached on powered off node, the volume is now successfully attached on the new node and application has now the data available.

What is expected to happen:
I would want the attach/detach controller to go ahead with the attach of the volume on new node where the pod got provisioned instead of waiting for the volume to be detached on the powered off node. It is ok to eventually delete the volume on the powered off node after 6 minutes. This way the application downtime is low and pods are up as soon as possible.

The current fix ignore, vSphere volumes/persistent volume to check for multi-attach scenario in attach/detach controller.

@jingxu97 @saad-ali : Can you please take a look at it.

@tusharnt @divyenpatel @rohitjogvmw @luomiao 

```release-note
Allow attach of volumes to multiple nodes for vSphere
```
2017-08-23 14:32:31 -07:00
Antoine Pelisse 5ef3516780 openapi: Change reference to be first-class
References in the openapi are currently completely hidden from the
model, and just passed through as we walk the tree. The problem is that
they can have a different description and more importantly, different
extensions.

Change them to be first-class citizen, and fully part of the model. It
means that visitors have to implement one more function and decide if
something specific should be done with references. Validation is updated
to just completely ignore them and passthrough (like it was done
before).
2017-08-23 14:11:16 -07:00
Simo Sorce 15c54ffa77 Add an OrDie version for AddPostStartHook
Simplifies usage and consolidate the error message so it is always
the same everywhere.

Signed-off-by: Simo Sorce <simo@redhat.com>
2017-08-23 16:08:27 -04:00
Brian Grant 4c34358c5e Add liggitt as an API approver. Note that bgrant0607 is an approver, but
shouldn't be auto-assigned.
2017-08-23 11:32:05 -07:00
Matthew Wong 3ed34183d0 Add volume operation metrics to operation executor and PV controller 2017-08-23 14:27:47 -04:00
Humble Chirammal 19f8bde90b Avoid explicit mention of plugin name in error strings.
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-08-23 23:45:10 +05:30
Matt Moyer 9dad15e220 kubeapiserver: rename `--experimental-bootstrap-token-auth` to `--enable-bootstrap-token-auth`.
This change renames the `--experimental-bootstrap-token-auth` flag to `--enable-bootstrap-token-auth`. The old flag is accepted but generates a warning.

In 1.9, we will drop support for `--experimental-bootstrap-token-auth` entirely.
2017-08-23 11:04:54 -05:00
Kubernetes Submit Queue 2f00e6d72c Merge pull request #51116 from huzhengchuan/fix_comment_cm
Automatic merge from submit-queue (batch tested with PRs 38947, 50239, 51115, 51094, 51116)

Fix comment and typos in node_controller

**What this PR does / why we need it**: 
1. fix comment to more accurately
2. fix typos


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

**Special notes for your reviewer**:

**Release note**:

```
NONE
```
2017-08-23 08:41:13 -07:00
Kubernetes Submit Queue 4ec38dce7e Merge pull request #51115 from jsafrane/exec-storageos
Automatic merge from submit-queue (batch tested with PRs 38947, 50239, 51115, 51094, 51116)

StorageOS: Use VolumeHost.GetExec() to execute stuff in volume plugins

Use VolumeHost.GetExec() to execute stuff in volume plugins

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

This PR updates StorageOS volume plugin to use `VolumeHost.GetExec()` to execute utilities like mkfs and lsblk instead of simple `os/exec`. This prepares the volume plugin to run these utilities in containers instead of running them on the host + makes the volume plugin more independent and less hardcoded.

See proposal in https://github.com/kubernetes/community/pull/589.

Note that this PR does **not** change place where the utilities are executed - `VolumeHost.GetExec()` still leads directly to `os/exec`. It will be changed when the aforementioned proposal is merged and implemented.

@kubernetes/sig-storage-pr-reviews 

**Release note**:
```release-note
NONE
```
2017-08-23 08:41:06 -07:00
Kubernetes Submit Queue 012e94b6be Merge pull request #50239 from FengyunPan/fix-no-exist-node
Automatic merge from submit-queue (batch tested with PRs 38947, 50239, 51115, 51094, 51116)

Mark the volumes as detached when node does not exist

If node does not exist, node's volumes will be detached
automatically and become available. So mark them detached and do not return err.

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

**Release note**:
```release-note
NONE
```
2017-08-23 08:41:04 -07:00
Kubernetes Submit Queue 7df5c63218 Merge pull request #38947 from xiangpengzhao/fix-testcase-errorf
Automatic merge from submit-queue (batch tested with PRs 38947, 50239, 51115, 51094, 51116)

Call Fatalf instead of Errorf when mounter/unmounter is nil in volume tests

If we get a nil mounter or unmounter, a panic will occur. Should call `Fatalf` instead of `Errorf`.
2017-08-23 08:41:01 -07:00
David Eads 9daf55e173 remove unnecessary field conversions 2017-08-23 10:52:22 -04:00
Jordan Liggitt 10687447cb
Print multiple node roles, remove kubeadm-specific annotation from kubectl 2017-08-23 09:34:41 -04:00
Jan Safranek bc6ad1ad9f iscsi: Use VolumeHost.GetExec() to execute stuff in volume plugins 2017-08-23 14:56:51 +02:00
Kubernetes Submit Queue 6a4203eb4b Merge pull request #51107 from jsafrane/exec-gluster
Automatic merge from submit-queue (batch tested with PRs 51105, 51097, 51110, 50843, 51107)

gluster: Use VolumeHost.GetExec() to execute stuff in volume plugins

**What this PR does / why we need it**:
This PR updates GlusterFS volume plugin to use `VolumeHost.GetExec()` to execute utilities like mkfs and lsblk instead of simple `os/exec`. This prepares the volume plugin to run these utilities in containers instead of running them on the host + makes the volume plugin more independent and less hardcoded.

See proposal in https://github.com/kubernetes/community/pull/589.

Note that this PR does **not** change place where the utilities are executed - `VolumeHost.GetExec()` still leads directly to `os/exec`. It will be changed when the aforementioned proposal is merged and implemented.

**Special notes for your reviewer**:

There are two commits:
* The first one removes unused `plugin.execCommand` (so we don't need to update it to `VolumeHost.GetExec`)
* The second one does the `VolumeHost.GetExec` trick described above.

@kubernetes/sig-storage-pr-reviews 

**Release note**:
```release-note
NONE
```
2017-08-23 05:51:31 -07:00
Kubernetes Submit Queue 4fb6c2891c Merge pull request #50843 from TerraTech/fvs-selinuxRelabel-init-1.8.x
Automatic merge from submit-queue (batch tested with PRs 51105, 51097, 51110, 50843, 51107)

FlexVolume: Add ability to control 'SupportsSELinux' during driver's init phase

**What this PR does / why we need it**:
Adds the ability to disable FlexVolume SELinux relabeling for filesystems that don't support it, e.g. fuse

**Which issue this PR fixes**:
This was reported in: https://github.com/lizardfs/lizardfs/issues/581

This is a reworked solution as per feedback from #50548 
https://github.com/kubernetes/kubernetes/pull/50548#issuecomment-322328679

**Special notes for your reviewer**:
/assign @thockin 
/cc @chakri-nelluri @verult @saad-ali 

**Release note**:

```release-note
NONE
```
2017-08-23 05:51:28 -07:00
Kubernetes Submit Queue fd31c3a5cf Merge pull request #51110 from jsafrane/exec-nfs
Automatic merge from submit-queue (batch tested with PRs 51105, 51097, 51110, 50843, 51107)

nfs: Use VolumeHost.GetExec() to execute stuff in volume plugins

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

This PR updates nfs volume plugin to use `VolumeHost.GetExec()` to execute utilities like mkfs and lsblk instead of simple `os/exec`. This prepares the volume plugin to run these utilities in containers instead of running them on the host + makes the volume plugin more independent and less hardcoded.

See proposal in https://github.com/kubernetes/community/pull/589.

Note that this PR does **not** change place where the utilities are executed - `VolumeHost.GetExec()` still leads directly to `os/exec`. It will be changed when the aforementioned proposal is merged and implemented.

@kubernetes/sig-storage-pr-reviews 

**Release note**:
```release-note
NONE
```
2017-08-23 05:51:25 -07:00
Kubernetes Submit Queue 57b1ea8b1c Merge pull request #51097 from jsafrane/exec-azure
Automatic merge from submit-queue (batch tested with PRs 51105, 51097, 51110, 50843, 51107)

azure: Use VolumeHost.GetExec() to execute stuff in volume plugins

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

This PR updates Azure volume plugin to use `VolumeHost.GetExec()` to execute utilities like mkfs and lsblk instead of simple `os/exec`. This prepares the volume plugin to run these utilities in containers instead of running them on the host + makes the volume plugin more independent and less hardcoded.

See proposal in https://github.com/kubernetes/community/pull/589.

Note that this PR does **not** change place where utilities are executed - `VolumeHost.GetExec()` still leads directly to `os/exec`. It will be changed when the aforementioned proposal is merged and implemented.

To simplify testing, `/sys/bus/scsi/devices/*/model` and `.../vendor` are read using `ioutil.ReadFile` instead of `/bin/cat` in the first commit.

```release-note
NONE
```

@kubernetes/sig-storage-pr-reviews @kubernetes/sig-azure-misc
2017-08-23 05:51:21 -07:00
Kubernetes Submit Queue ac2d24b46e Merge pull request #51105 from jsafrane/exec-fc
Automatic merge from submit-queue (batch tested with PRs 51105, 51097, 51110, 50843, 51107)

fibre channel: Remove unused exe interface

**What this PR does / why we need it**:
`execCommand` is not used anywhere, let's remove it and associated `exe` field from several structs.

@kubernetes/sig-storage-pr-reviews 

**Release note**:
```release-note
NONE
```
2017-08-23 05:51:19 -07:00
Humble Chirammal ddc99590a2 Add initiatorname in iscsi describe printer.
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-08-23 16:13:52 +05:30
Kubernetes Submit Queue 7e208befd1 Merge pull request #51084 from humblec/glusterfs-clean
Automatic merge from submit-queue (batch tested with PRs 50229, 50973, 50976, 51085, 51084)

Correct error strings in glusterfs
2017-08-23 03:36:14 -07:00
Kubernetes Submit Queue 33821862ce Merge pull request #50973 from FengyunPan/fix-legacy-floatingip
Automatic merge from submit-queue (batch tested with PRs 50229, 50973, 50976, 51085, 51084)

Fix legacy floatingip

Fix #50974
If user specify floating-network-id by annotation rather than cloud
provider file, openstack cloud provider don't delete floatingip when
deleting LoadBalancer service.

**Release note**:
```release-note
NONE
```
2017-08-23 03:36:05 -07:00