Commit Graph

23547 Commits (ff471913f9073e8c69dd5c5e87fee95857a20aba)

Author SHA1 Message Date
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
Kubernetes Submit Queue 9cecb3b358 Merge pull request #50229 from tcharding/kubectl-portforward
Automatic merge from submit-queue (batch tested with PRs 50229, 50973, 50976, 51085, 51084)

Remove duplicate command example

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

`kubectl port-forward --help` currently contains a duplicate example. This PR removes the duplicate.

```release-note
/release-note Remove duplicate command example from `kubectl port-forward --help`
```

/sig cli
/kind cleanup
/kind documentation
2017-08-23 03:36:03 -07:00
Kubernetes Submit Queue d2af141105 Merge pull request #51077 from zjj2wry/log-selector
Automatic merge from submit-queue (batch tested with PRs 50257, 50247, 50665, 50554, 51077)

fix issue(51027)kubect logs --selector ignoring --tail=-1

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

**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
Fix kubect logs --selector ignoring --tail=-1
```
2017-08-23 02:35:14 -07:00
Kubernetes Submit Queue 617dc79311 Merge pull request #50554 from zhangxiaoyu-zidif/refactor-factory-test
Automatic merge from submit-queue (batch tested with PRs 50257, 50247, 50665, 50554, 51077)

Refactor kubectl factory 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.

**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 02:35:11 -07:00
Kubernetes Submit Queue 178a5ff314 Merge pull request #50665 from xiangpengzhao/hardcode-to-const
Automatic merge from submit-queue (batch tested with PRs 50257, 50247, 50665, 50554, 51077)

Replace hard-code "cpu" and "memory" to consts

**What this PR does / why we need it**:
There are many places using hard coded "cpu" and "memory" as resource name. This PR replace them to consts.

**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**:
/kind cleanup

**Release note**:

```release-note
NONE
```
2017-08-23 02:35:09 -07:00
Kubernetes Submit Queue 443f7e2af4 Merge pull request #50247 from tcharding/kubectl-explain
Automatic merge from submit-queue (batch tested with PRs 50257, 50247, 50665, 50554, 51077)

Add whitespace to improve error msg clarity

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

Currently when `kubectl explain` is called without a resource the error message is tacked onto the end of the list of valid resources. The error is clearer if there is a new line after the valid resource list, this also causes the error to be left aligned instead of indented level with the valid resource list.

```release-note
NONE
```

/sig cli
/kind cleanup
2017-08-23 02:35:06 -07:00
Di Xu 504f89e3ac auto-gen 2017-08-23 15:23:34 +08:00
Luca Berton 1044b0df00 Italian translation 2017-08-23 08:45:26 +02:00
Kubernetes Submit Queue f354857bfb Merge pull request #51020 from dunjut/master
Automatic merge from submit-queue (batch tested with PRs 50980, 46902, 51051, 51062, 51020)

fix confusion in service_controller

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

Fix code and comment confusion in `service_controller`.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-08-22 23:14:07 -07:00
Kubernetes Submit Queue 57ab7c6a64 Merge pull request #51062 from alrs/fix-statefulset-test-swallowed-errors
Automatic merge from submit-queue (batch tested with PRs 50980, 46902, 51051, 51062, 51020)

Fix swallowed errors in statefulset tests

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

```release-note NONE
```
2017-08-22 23:14:05 -07:00
Kubernetes Submit Queue 3a724ccdb3 Merge pull request #51051 from janetkuo/fix-sts-validation
Automatic merge from submit-queue (batch tested with PRs 50980, 46902, 51051, 51062, 51020)

Fix StatefulSet update validation

StatefulSet update validation did not allow change to number of containers in pod template. Fix this bug so that it's possible to make this kind of change. 

Found it when suggesting test-cmd changes in https://github.com/kubernetes/kubernetes/pull/49674.

@kubernetes/sig-apps-pr-reviews @smarterclayton 

/approve no-issue
2017-08-22 23:14:02 -07:00
Di Xu 021d4de36c run nsenter in host namespace for containerized kubelet 2017-08-23 14:05:21 +08:00
Di Xu d0a4af133b set default HostPathType to empty 2017-08-23 14:05:21 +08:00
Di Xu 5c45db564f implement proposal 34058: hostPath volume type 2017-08-23 14:05:21 +08:00
Connor Doyle 515d86faa0 Add CPUSetBuilder, make CPUSet immutable. 2017-08-22 22:33:04 -07:00
Kubernetes Submit Queue 625eb9ab7a Merge pull request #51106 from jsafrane/humblec-approver
Automatic merge from submit-queue

Add Humble as GlusterFS approver.

@humblec has shown his commitment into GlusterFS by number of commits there
and by support on sig-storage slack channel.

@kubernetes/sig-storage-misc 

```release-note
NONE
```
2017-08-22 22:14:15 -07:00
Connor Doyle e686ecb6ea Renamed CPUSet.AsSlice() => CPUSet.ToSlice() 2017-08-22 21:21:26 -07:00
Kubernetes Submit Queue e2de110e26 Merge pull request #50467 from freehan/local-cloud-provider
Automatic merge from submit-queue (batch tested with PRs 51039, 50512, 50546, 50965, 50467)

add alpha api gate at gce cloud provider

**What this PR does / why we need it**:
Add a flag in gce.conf to gate alpha api. Related wrapper function can choose to examine corresponding gate. 
Currently, there is no new alpha api wrapper funciton being introduced. So there is no supported alpha api.


**Release note**:
```release-note
None
```

cc: @yujuhong @saad-ali @MrHohn
2017-08-22 21:16:16 -07:00
Kubernetes Submit Queue 49c36f4b33 Merge pull request #50546 from apelisse/plumb-openapi-validation
Automatic merge from submit-queue (batch tested with PRs 51039, 50512, 50546, 50965, 50467)

Kubectl: Plumb openapi validation (disabled by default)

**What this PR does / why we need it**: Creates a new flag '--openapi' and plumb in the validation code so that it can be used by default to validate objects against the openapi schema.

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

**Special notes for your reviewer**:

This is not complete, the name of the variable must change for example.

**Release note**:
```release-note
Kubectl uses openapi for validation. If OpenAPI is not available on the server, it defaults back to the old Swagger.
```
2017-08-22 21:16:11 -07:00
Kubernetes Submit Queue 601b6d3e02 Merge pull request #50438 from dixudx/kubectl_show_node_roles
Automatic merge from submit-queue (batch tested with PRs 50806, 48789, 49922, 49935, 50438)

kubectl show node role if defined

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

**Special notes for your reviewer**:
/assign @justinsb @luxas @jbeda @philips
/cc @qrevel

**Release note**:

```release-note
kubectl show node role if defined
```
2017-08-22 19:45:37 -07:00
Kubernetes Submit Queue d5ab597eb3 Merge pull request #49935 from xiangpengzhao/remove-dep-alias
Automatic merge from submit-queue (batch tested with PRs 50806, 48789, 49922, 49935, 50438)

Remove deprecated kubectl command aliases

**What this PR does / why we need it**:
These command aliases have been deprecated for more than two years. It's time to remove them.

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

**Special notes for your reviewer**:
/sig cli

**Release note**:

```release-note
Remove deprecated kubectl command aliases `apiversions, clusterinfo, resize, rollingupdate, run-container, update`
```
2017-08-22 19:45:34 -07:00
Kubernetes Submit Queue 43fd8eebf0 Merge pull request #49922 from riverzhang/volume-cephfs
Automatic merge from submit-queue (batch tested with PRs 50806, 48789, 49922, 49935, 50438)

Fix Getpath() description

Modify the description of the word error



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

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-08-22 19:45:32 -07:00
Kubernetes Submit Queue d235fa3f1c Merge pull request #48789 from mtanino/issue/47311
Automatic merge from submit-queue (batch tested with PRs 50806, 48789, 49922, 49935, 50438)

iSCSI volume plugin: iSCSI initiatorname support

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

This PR adds iSCSI initiatorname parameter to ISCSIVolumeSource to enable automatic configuration of initiator name per volume. This would allow for more fine grained configuration, and remove the need to configure the initiator name on the host by administrator.

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

**Special notes for your reviewer**:

/cc @rootfs @jsafrane @msau42

**Release note**:

```
iSCSI volume plugin: Support customization of iSCSI initiator name per volume
```
2017-08-22 19:45:29 -07:00
Kubernetes Submit Queue 70632276bb Merge pull request #50806 from verult/VolumeNotYetAttached
Automatic merge from submit-queue (batch tested with PRs 50806, 48789, 49922, 49935, 50438)

On AttachDetachController node status update, do not retry when node …

…doesn't exist but keep the node entry in cache.



**What this PR does / why we need it**: An alternative fix for https://github.com/kubernetes/kubernetes/issues/42438 which also fixes #50721.

Instead of removing the node entry entirely from the node status update cache (which prevents the node from ever being updated even when it recovers), here the node status updater does nothing, so that there won't be an update retry until the node is re-added, where the cache entry is set to true.

Will cherry pick to prior versions after this is merged.

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

**Release Note**:
``` release-note
On AttachDetachController node status update, do not retry when node doesn't exist but keep the node entry in cache.
```

/assign @jingxu97 
/cc @saad-ali 
/sig storage
/release-note
2017-08-22 19:45:27 -07:00
xiangpengzhao 35b45d60b2 Use Fatalf instead of Errorf when mounter/unmounter if nil in volume tests 2017-08-23 10:29:30 +08:00
Yu-Ju Hong 0d1efd5e78 GCE: add a new label "version" for metrics 2017-08-22 17:37:50 -07:00
Eric Paris 2b08d1e5a1 Merge pull request #51144 from joelsmith/skip-endpoints-update
Fix unready endpoints bug introduced in #50934
2017-08-22 19:56:17 -04:00
Yu-Ju Hong 84c9c25edf GCE: Add functions for Alpha address and forwarding rules 2017-08-22 16:37:36 -07:00
Joel Smith d6aa7fb716 Fix unready endpoints bug introduced in #50934
A pod status change of unready -> ready results in a move from
the endpoint's unready endpoint addresses to its ready addresses
so if a pod update contains an unready -> ready status change,
the endpoint needs to be updated.
2017-08-22 13:46:11 -06:00
Michael Taufen 76c41a252c Remove crash loop detection from the dynamic kubelet config feature
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
2017-08-22 12:37:22 -07:00
Kubernetes Submit Queue 336e38bd4d Merge pull request #51044 from kow3ns/sts-immutable-network-id
Automatic merge from submit-queue (batch tested with PRs 51102, 50712, 51037, 51044, 51059)

fix #51043

**What this PR does / why we need it**: The StatefulSet controller no longer attempts to mutate "hostname" or "subdomain" fields of the "pod.spec" to enforce the network identity of Pods in a StatefeulSet. Since these fields are set upon creation and immutable thereafter setting the annotations is no longer necessary. 
fixes: #51043
2017-08-22 12:28:06 -07:00
Kubernetes Submit Queue 09bb8d367a Merge pull request #50712 from dims/create-cadvisor-directory-if-necessary
Automatic merge from submit-queue (batch tested with PRs 51102, 50712, 51037, 51044, 51059)

Create the directory for cadvisor if needed

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

In 6c7245d464, code was added to
bail out if the directory that cadvisor monitored did not exist.

However, this breaks the earlier assumption that kubelet created
directories when needed in pkg/kubelet/kubelet.go's setupDataDirs()
method. setupDataDirs() happens much later, so basically kubelet
exits now.

So since cadvisor really needs this directory, let us just create
it

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

Fixes #50709

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-08-22 12:27:59 -07:00
Connor Doyle 8f38abb350 Add cpuset helper library. 2017-08-22 11:42:01 -07:00
Minhan Xia c04ba4eab5 add alpha api gate at gce cloud provider 2017-08-22 11:05:06 -07:00
Kubernetes Submit Queue c6980e7247 Merge pull request #51033 from mtaufen/revert-51008-revert-50789-fix-scheme
Automatic merge from submit-queue (batch tested with PRs 50967, 50505, 50706, 51033, 51028)

Revert "Merge pull request #51008 from kubernetes/revert-50789-fix-scheme"

I'm spinning up a cluster right now to test this fix, but I'm pretty sure this was the problem.
There doesn't seem to be a way to confirm from logs, because AFAICT the logs from the hollow kubelet containers are not collected as part of the kubemark test.

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

This reverts commit f4afdecef8, reversing
changes made to e633a1604f.

This also fixes a bug where Kubemark was still using the core api scheme
to manipulate the Kubelet's types, which was the cause of the initial
revert.

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

**Release note**:

```release-note
NONE
```

/cc @shyamjvs @wojtek-t
2017-08-22 10:48:21 -07:00
Kubernetes Submit Queue e2685d800d Merge pull request #50706 from freehan/cloud-provider-op-v2
Automatic merge from submit-queue (batch tested with PRs 50967, 50505, 50706, 51033, 51028)

teach gce cloud to handle alpha/beta operations v2

Alternative to #50704 

This one feels cleaner. BUT, type assertion problems cannot be exposed at compile time. 

Please let me know what you think. This will set the precedence for consuming GCE alpha/beta API. 

cc: @thockin @yujuhong @saad-ali @MrHohn 

```release-note
NONE
```
2017-08-22 10:48:18 -07:00
zhengchuan hu 05f52c6f22 Fix comment to more accurately 2017-08-22 22:08:46 +08:00
Jan Safranek bf296b3e31 StorageOS: Use VolumeHost.GetExec() to execute stuff in volume plugins 2017-08-22 15:57:08 +02:00
Jan Safranek 73b101c14b rbd: Use VolumeHost.GetExec() to execute stuff in volume plugins 2017-08-22 15:49:21 +02:00
Jan Safranek 3eb9b9dfee quobyte: Use VolumeHost.GetExec() to execute stuff in volume plugins 2017-08-22 15:24:20 +02:00
Jan Safranek 85495bd102 nfs: Use VolumeHost.GetExec() to execute stuff in volume plugins 2017-08-22 15:17:07 +02:00
Jan Safranek 3636c0a4e2 gluster: Use VolumeHost.GetExec() to execute stuff in volume plugins 2017-08-22 14:58:00 +02:00
Jan Safranek 51b33e8abe gluster: Remove unused exe interface 2017-08-22 14:53:25 +02:00
Jan Safranek 36cb25fbfc Add Humble as GlusterFS approver.
@humblec has shown his commitment into GlusterFS by number of commits there
and by support on sig-storage slack channel.
2017-08-22 14:41:51 +02:00
FengyunPan 9bdf2cc0e7 Support for specifying external LoadBalancerIP on openstack
Fix #50851
Add ServiceAnnotationLoadBalancerInternal annotation to distinguish
between internal LoadBalancerIP and external LoadBalancerIP.
2017-08-22 20:40:56 +08:00
Kubernetes Submit Queue a4b719dcab Merge pull request #50640 from yujuhong/check-ips
Automatic merge from submit-queue (batch tested with PRs 50893, 50913, 50963, 50629, 50640)

gce external LB: add a function to verify the requested IP address

Factor out the logic for verifying the user-requested IP for better
readability and testing. Also rename a few variables for clarity.
2017-08-22 05:31:15 -07:00
Jan Safranek f744b12ee9 fibre channel: Remove unused exe interface 2017-08-22 14:28:10 +02:00
du c9941ff4d2 fix confusion in service_controller
remove worthless comment line
2017-08-22 20:14:18 +08:00
zhangxiaoyu-zidif e4ac711dfc Refactor kuberuntime test case with sets.String 2017-08-22 19:43:18 +08:00
fisherxu 28880ee0eb add UT for pkg/apis/autoscaling/v2alpha1/defaults.go 2017-08-22 19:34:30 +08:00
Jan Safranek 158017cef7 ScaleIO: Use VolumeHost.GetExec() to execute utilities
This prepares volume plugins to run things in containers instead of running
them on the host.

As consequence, a mount.Exec interface needs to be passed from VolumeHost
down to SioClient.
2017-08-22 13:27:59 +02:00
Jan Safranek dbaf41e92a ScaleIO: use a fresh mounter for every SetUp/TearDown
A volume plugin should not cache Mounter for a long time, it can get a
different one with each SetUp/TearDown call.
2017-08-22 13:25:09 +02:00
Henrik Schmidt 80156474cf Always check if default labels on node need to be updated in kubelet 2017-08-22 12:54:07 +02:00
core 07cfade1fc FlexVolume: Add capability to disable SELinux Relabeling during the driver's init phase
Reference:  https://github.com/lizardfs/lizardfs/issues/581  (SELinux relabeling support)
2017-08-22 03:31:34 -07:00
Humble Chirammal 55ce429620 Replace validateGlusterfs() with validateGlusterfsVolumeSource
for consistency.

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-08-22 14:47:02 +05:30
Humble Chirammal 7755286f48 Correct error strings in glusterfs
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-08-22 14:27:46 +05:30
Jan Safranek 96827de948 azure: Use VolumeHost.GetExec() to execute stuff in volume plugins
This prepares volume plugins to run things in containers instead of running
them on the host.
2017-08-22 10:21:44 +02:00
Jan Safranek 9484d243ab azure: Don't exec 'cat' to read files. 2017-08-22 10:01:33 +02:00
NickrenREN 82ce7eccba Add ephemeral local storage resource name first 2017-08-22 13:53:37 +08:00
zhengjiajin 28746831e1 fix issue(51027)kubect logs --selector ignoring --tail=-1 2017-08-22 12:26:38 +08:00
zhangxiaoyu-zidif e83e799d1d fix-review 2017-08-22 10:57:48 +08:00
Kubernetes Submit Queue bf00190037 Merge pull request #47698 from fabriziopandini/kubeadm308
Automatic merge from submit-queue (batch tested with PRs 46458, 50934, 50766, 50970, 47698)

kubeadm: Warn in preflight checks if KubernetesVersion is of a newer branch than kubeadm

**What this PR does / why we need it**:
see https://github.com/kubernetes/kubeadm/issues/307

**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/kubeadm/issues/307

**Special notes for your reviewer**:

**Release note**:
2017-08-21 18:11:28 -07:00
Kubernetes Submit Queue aa41ff26d0 Merge pull request #50934 from joelsmith/skip-endpoints-update
Automatic merge from submit-queue (batch tested with PRs 46458, 50934, 50766, 50970, 47698)

Skip non-update endpoint updates

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

On large clusters, a large percentage of endpoint updates are actually non-updates that occur as a result of a change in an associated pod. This results in endpoint updates where the only field that has changed is the `TargetRef.ResourceVersion` in the endpoint address associated with the changed pod. Given enough of these non-updates, the endpoint controller's queue rate limit can be overwhelmed and legitimate updates can be delayed, resulting in (temporarily) broken services. We have clusters where we've seen endpoint updates take 9 minutes.

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

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

**Release note**:
```release-note
Prevent unneeded endpoint updates
```
2017-08-21 18:11:19 -07:00
Kubernetes Submit Queue 198e83588b Merge pull request #46458 from jsafrane/mount-prep
Automatic merge from submit-queue (batch tested with PRs 46458, 50934, 50766, 50970, 47698)

Prepare VolumeHost for running mount tools in containers

This is the first part of implementation of https://github.com/kubernetes/features/issues/278 - running mount utilities in containers.

It updates `VolumeHost` interface:

*  `GetMounter()` now requires volume plugin name, as it is going to return different mounter to different volume plugings, because mount utilities for these plugins can be on different places.
* New `GetExec()` method that should volume plugins use to execute any utilities. This new `Exec` interface will execute them on proper place.
* `SafeFormatAndMount` is updated to the new `Exec` interface.

This is just a preparation, `GetExec` right now leads to simple `os.Exec` and mount utilities are executed on the same place as before. Also, the volume plugins will be updated in subsequent PRs (split into separate PRs, some plugins required lot of changes).

```release-note
NONE
```

@kubernetes/sig-storage-pr-reviews 
@rootfs @gnufied
2017-08-21 18:11:16 -07:00
Balu Dontu cfdff1ae46 Multi-Attach volume fix for vSphere 2017-08-21 18:06:29 -07:00
Lars Lehtonen 9f8d57a2d4
Fix swallowed errors in statefulset tests 2017-08-21 17:12:36 -07:00
Phillip Wittrock bc94cd5807 More PR comments 2017-08-21 16:06:48 -07:00
Kubernetes Submit Queue 0f8eaa45dd Merge pull request #49976 from aveshagarwal/master-pod-affinities-topology-key
Automatic merge from submit-queue (batch tested with PRs 50531, 50853, 49976, 50939, 50607)

Do not allow empty topology key for pod affinities.

**What this PR does / why we need it**:
This PR do not allow empty topology key for all 4 pod affinities.

**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
Affinity in annotations alpha feature is no longer supported in 1.8. Anyone upgrading from 1.7 with AffinityInAnnotation feature enabled must ensure pods (specifically with pod anti-affinity PreferredDuringSchedulingIgnoredDuringExecution) with empty TopologyKey fields must be removed before upgrading to 1.8.
```
@kubernetes/sig-scheduling-bugs  @bsalamat @davidopp
2017-08-21 15:46:20 -07:00
Kubernetes Submit Queue 0b6bd601ae Merge pull request #50853 from dcbw/cni-conf
Automatic merge from submit-queue (batch tested with PRs 50531, 50853, 49976, 50939, 50607)

cni: print better error when a CNI .configlist is put into a .config

If the admin mistakenly puts a CNI configlist into a "conf" file, that's not correct, but kubelet will still read the config file and then fail to start the pod because "type=".  Be a bit smarter about that.  Should also be fixed in CNI, which I'm doing a PR for as well.

@squeed @thockin @freehan
2017-08-21 15:46:17 -07:00
Janet Kuo ad0c6b66b5 Fix StatefulSet update validation 2017-08-21 15:28:08 -07:00
Kubernetes Submit Queue 990395d5ea Merge pull request #47506 from zhangxiaoyu-zidif/replace-sliceequal-by-deepequal
Automatic merge from submit-queue (batch tested with PRs 50693, 50831, 47506, 49119, 50871)

Use reflect.DeepEqual to replace slicesEqual

**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/50952

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-08-21 14:30:00 -07:00
Kubernetes Submit Queue aa31d19310 Merge pull request #50693 from allencloud/fix-typos-in-quobyte
Automatic merge from submit-queue (batch tested with PRs 50693, 50831, 47506, 49119, 50871)

fix two typos in quobyte error message

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



**What this PR does / why we need it**:
fix two typos in quobyte error message

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

**Special notes for your reviewer**:
NONE

**Release note**:

```release-note
NONE
```
2017-08-21 14:29:55 -07:00
Kenneth Owens a6473d82dc StatefulSet controller no longer attempts to mutate v1.PodSpec.Hostname or v1.PodSpec.Subdomain 2017-08-21 13:08:31 -07:00
fabriziopandini 35f6b12e79 adding version.Components(), .Major(), .Minor() .Patch() etc. 2017-08-21 22:04:32 +02:00
Michael Taufen a90d81620b Revert "Merge pull request #51008 from kubernetes/revert-50789-fix-scheme"
This reverts commit f4afdecef8, reversing
changes made to e633a1604f.

This also fixes a bug where Kubemark was still using the core api scheme
to manipulate the Kubelet's types, which was the cause of the initial
revert.
2017-08-21 11:28:05 -07:00
Minhan Xia 25f8c946f5 teach gce cloud to handle alpha/beta operations 2017-08-21 10:58:10 -07:00
Matt Rogers c42c43a13f Show events when describing service accounts
Signed-off-by: Matt Rogers <mrogers@redhat.com>
2017-08-21 13:54:12 -04:00
mtanino b0d4664a27 Autogenerated files 2017-08-21 12:29:32 -04:00
Antoine Pelisse 37aacf30b5 openapi validation: Ignore unknown types
This follows the exact same logic as swagger.
2017-08-21 09:08:31 -07:00
Antoine Pelisse a950afecdc openapi-validation: Handle List special case 2017-08-21 09:08:31 -07:00
Antoine Pelisse 4e87d2d572 openapi: Handle properly empty/null fileds 2017-08-21 09:08:31 -07:00
Antoine Pelisse aa1c79f32b openapi: Use "group" to look for resources 2017-08-21 09:08:31 -07:00
Antoine Pelisse b7b5457050 Validate against OpenAPI schema (if available) 2017-08-21 08:58:42 -07:00
Yu-Ju Hong afcb948385 gce external LB: add a function to verify the requested IP address 2017-08-21 08:42:11 -07:00
Mitsuhiro Tanino a6e523f2e7 iSCSI volume plugin: iSCSI initiatorname support
This PR adds iSCSI initiatorname parameter to ISCSIVolumeSource
to enable automatic configuration of initiator name per volume.
This would allow for more fine grained configuration, and remove
the need to configure the initiator name on the host by
administrator.

fixes: #47311
2017-08-21 11:26:56 -04:00
Kubernetes Submit Queue f3c2324af3 Merge pull request #50620 from juanvallejo/jvallejo/update-kubectl-top-validation
Automatic merge from submit-queue (batch tested with PRs 47896, 50678, 50620, 50631, 51005)

allow heapster option defaults to be set - kubectl top node|pod

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

Allows downstream / outside consumers of `NewCmdTopNode` and `NewCmdTopPod` commands to set project or case-specific heapster option defaults.

Related downstream PR: https://github.com/openshift/origin/pull/15764

cc @fabianofranz
2017-08-21 08:26:23 -07:00
Kubernetes Submit Queue 5c351c282a Merge pull request #50678 from xiangpengzhao/remove-cm-flag
Automatic merge from submit-queue (batch tested with PRs 47896, 50678, 50620, 50631, 51005)

Remove deprecated lookup cache flags.

**What this PR does / why we need it**:
Remove deprecated lookup cache flags: `replication-controller-lookup-cache-size, replicaset-lookup-cache-size, daemonset-lookup-cache-size`

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

**Special notes for your reviewer**:
/cc @enisoc

**Release note**:

```release-note
The following deprecated flags have been removed from `kube-controller-manager`: `replication-controller-lookup-cache-size`, `replicaset-lookup-cache-size`, and `daemonset-lookup-cache-size`. Make sure you no longer attempt to set them.
```
2017-08-21 08:26:20 -07:00
xswack 7bc8411f62 Fixed code comments that were not updated 2017-08-21 20:19:59 +08:00
Shyam JVS 5591914d62 Revert "Don't register the kubeletconfig group with the default Scheme" 2017-08-21 11:15:27 +02:00
FengyunPan e8fe9b65c5 Support ServiceAnnotationLoadBalancerFloatingNetworkId for LB v1 2017-08-21 07:48:07 +08:00
FengyunPan e5b7f0e7ba Fix legacy floatingip
If user specify floating-network-id by annotation rather than cloud
provider file, openstack cloud provider don't delete floatingip when
deleting LoadBalancer service.
2017-08-21 07:45:52 +08:00
Seth Jennings a06236dd72 Factor out endpoint address generation, skip unneeded endpoint updates
Also add unit tests for new endpoint helpers related to updatePod
2017-08-20 06:26:25 -06:00
Davanum Srinivas ca2d5178aa Create the directory for cadvisor if needed
In 6c7245d464, code was added to
bail out if the directory that cadvisor monitored did not exist.

However, this breaks the earlier assumption that kubelet created
directories when needed in pkg/kubelet/kubelet.go's setupDataDirs()
method. setupDataDirs() happens much later, so basically kubelet
exits now.

So since cadvisor really needs this directory, let us just create
it

Fixes #50709
2017-08-19 20:42:50 -04:00
Kubernetes Submit Queue e633a1604f Merge pull request #50789 from mtaufen/fix-scheme
Automatic merge from submit-queue

Don't register the kubeletconfig group with the default Scheme

See https://github.com/kubernetes/kubernetes/pull/49051#discussion_r132527078
2017-08-19 12:15:48 -07:00
Kubernetes Submit Queue b59ad9cbff Merge pull request #50146 from gmarek/deepcopyinto
Automatic merge from submit-queue (batch tested with PRs 46512, 50146)

Make metav1.(Micro)?Time functions take pointers

Is there any reason for those functions not to be on pointers?
2017-08-19 11:28:15 -07:00
jrperritt 21ce3de326 don't try to add pool id if pool doesn't exist 2017-08-19 07:36:38 -05:00
zhengjiajin 1a1b940ecb fix issue(#50937)Fix kubectl get pvc lose volume name 2017-08-19 17:02:58 +08:00
Kubernetes Submit Queue 2ab7ad14b4 Merge pull request #47991 from ncdc/fix-initial-exec-terminal-dimensions
Automatic merge from submit-queue

Fix initial exec terminal dimensions

**What this PR does / why we need it**:
Delay attempting to send a terminal resize request to docker until after
the exec has started; otherwise, the initial resize request will fail.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-08-18 14:47:11 -07:00
Christoph Blecker 0153f8de1a
Update help/example for kubectl completion 2017-08-18 14:29:42 -07:00
Christoph Blecker 70b942d663
Allow zsh completion to be autoloaded by compinit 2017-08-18 14:29:26 -07:00
Michael Taufen 0af9f756cd Don't register the kubeletconfig group with the default Scheme 2017-08-18 13:51:39 -07:00
Kubernetes Submit Queue 5cc3cda03d Merge pull request #50490 from liyinan926/master
Automatic merge from submit-queue

Use CollisionCount for collision avoidance in StatefulSet controller

**What this PR does / why we need it**:
This PR uses the newly added `CollisionCount` in `StatefulSetStatus` for name collision avoidance when the `StatefulSet` controller creates `ControllerRevision`s. The `CreateControllerRevision` method of the `ControllerHistory` interface was augmented to use a user-specified `collisionCount` instead of the internal probe that always starts with 0. The `StatefulSet` controller uses the `CreateControllerRevision` to create `ControllerRevision`s and when it calls it, it passes in the `CollisionCount` of the `StatefulSet` it manipulates. 
  
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #49909.

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

**Release note**:
```release-note
Use CollisionCount for collision avoidance when creating ControllerRevisions in StatefulSet controller
```
2017-08-18 11:14:08 -07:00
Kubernetes Submit Queue 9553e89a19 Merge pull request #50860 from wlan0/master
Automatic merge from submit-queue

Proposal to add @wlan0 to appropriate owner files

@thockin @luxas
2017-08-18 10:24:20 -07:00
Yinan Li 46c6aea1cf Use CollisionCount for collision avoidance in StatefulSet controller 2017-08-18 06:49:02 -07:00
David Eads 53348c0531 add diff details to pod validation error 2017-08-18 09:01:13 -04:00
Kubernetes Submit Queue afabd09889 Merge pull request #50876 from enj/enj/f/owners_reviewer
Automatic merge from submit-queue

Add enj as reviewer to OWNERS

Adding myself as a reviewer for the following areas:

- API
- auth
- registry
- storage (etcd)

Signed-off-by: Monis Khan <mkhan@redhat.com>

**Release note**:

```release-note
NONE
```

@kubernetes/sig-api-machinery-pr-reviews
@kubernetes/sig-auth-pr-reviews
2017-08-18 05:42:07 -07:00
Kubernetes Submit Queue c3a39f763e Merge pull request #48263 from CaoShuFeng/useless_argument
Automatic merge from submit-queue

remove useless argument "name"

**Release note**:

```
NONE
```
2017-08-18 05:41:45 -07:00
Kubernetes Submit Queue c573d8192f Merge pull request #50255 from mattlandis/aws-duplicate-subnets
Automatic merge from submit-queue (batch tested with PRs 50255, 50885)

AWS: Arbitrarily choose first (lexicographically) subnet in AZ

When there is more than one subnet for an AZ on AWS choose arbitrarily
chose the first one lexicographically for consistency.



**What this PR does / why we need it**:
If two subnets were to be used appear in the same aws az which one is chosen is currently not consistent.  This could lead to difficulty in diagnosing issues.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-08-18 05:21:57 -07:00
Kubernetes Submit Queue 4e4168121a Merge pull request #50856 from shyamjvs/save-route-controller-memory
Automatic merge from submit-queue (batch tested with PRs 50303, 50856)

Make route-controller list only relevant routes instead of all of them

Ref https://github.com/kubernetes/kubernetes/issues/50854 (somewhat related issue)

IIUC from the code, route-controller memory is mainly being used in storing routes and nodes (also CIDRs, but that's not much).
This should help reduce that memory usage (particularly when running in a project with large no. of routes), by moving filtering to server-side.
For e.g in kubernetes-scale project we have ~5000 routes (each about 600B) => 3 MB of routes

This doesn't help with reducing time to list the routes as filtering is also linear.

cc @kubernetes/sig-scalability-misc @wojtek-t @gmarek
2017-08-18 03:37:53 -07:00
Kubernetes Submit Queue 2c6cb24e8a Merge pull request #50303 from zouyee/newb
Automatic merge from submit-queue

delete ineffectual assginment

**What this PR does / why we need it**:
delete ineffectual assignment
**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**:
2017-08-18 02:46:09 -07:00
Kubernetes Submit Queue d543a7c7ce Merge pull request #50765 from sttts/sttts-kube-gen-rename
Automatic merge from submit-queue

Rename k8s.io/{kube-gen -> code-generator}
2017-08-18 01:06:45 -07:00
Kubernetes Submit Queue e553d6eb5b Merge pull request #50575 from dixudx/CollisionCount_int64_to_int32
Automatic merge from submit-queue

CollisionCount should have type int32 across controllers that use it for collision avoidance

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

**Special notes for your reviewer**:
/cc @liyinan926
/assign @kow3ns @thockin @janetkuo 

**Release note**:

```release-note
Change CollisionCount from int64 to int32 across controllers
```
2017-08-17 23:21:11 -07:00
Kubernetes Submit Queue 4564f3d810 Merge pull request #49993 from mathspanda/master
Automatic merge from submit-queue

verify pkg/util contains no code

**What this PR does / why we need it**:
verify util packages contain no go codes

related issue: #49923
2017-08-17 22:32:13 -07:00
Di Xu 58669f6f1d support fieldSelector spec.schedulerName 2017-08-18 13:32:09 +08:00
Kubernetes Submit Queue 89abb48f7e Merge pull request #50823 from zjj2wry/set-image
Automatic merge from submit-queue (batch tested with PRs 50277, 50823, 50376, 50867)

fix issue(#50821)Add image check, if image not changed, transform false

**What this PR does / why we need it**:
closes #50821 
**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-17 22:24:23 -07:00
xilabao 42c41a07c8 validate nonResourceURL in create clusterrole 2017-08-18 13:03:38 +08:00
Di Xu b36320beb1 auto-gen 2017-08-18 11:07:35 +08:00
Kubernetes Submit Queue 075d209ea4 Merge pull request #50218 from dixudx/fix_GPU_resource_zero_limit_validation
Automatic merge from submit-queue

fix GPU resource validation that incorrectly allows zero limits

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

The validation logic for GPUs is not run if limits is not set for GPUs.
We need to check limits equals requests even if just request is set for GPUs.

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

**Special notes for your reviewer**:
/assign @vishh 
/cc @jiayingz 

**Release note**:

```release-note
fix GPU resource validation that incorrectly allows zero limits
```
2017-08-17 19:57:40 -07:00
Di Xu 85602fd542 CollisionCount should have type int32 across controllers that use it for collision avoidance 2017-08-18 10:48:12 +08:00
Kubernetes Submit Queue d490e2cf83 Merge pull request #50176 from Random-Liu/set-exec-timeout
Automatic merge from submit-queue (batch tested with PRs 50536, 50809, 50220, 50399, 50176)

Set ExecSync timeout in liveness prober.

Although Dockershim doesn't actually support `ExecSync` timeout (see [here](https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/dockershim/exec.go#L137)), we should set the timeout, so that the other runtime which supports the timeout could work properly.

Fixes #50389.

/cc @yujuhong @timstclair @feiskyer
2017-08-17 18:12:22 -07:00
Kubernetes Submit Queue 821445e127 Merge pull request #50399 from caesarxuchao/update-admission-plugin
Automatic merge from submit-queue (batch tested with PRs 50536, 50809, 50220, 50399, 50176)

Make admission plugin handle mutating spec of uninitialized pods

Address https://github.com/kubernetes/kubernetes/issues/47837#issuecomment-321323243.

Updated to handle mutating pod spec of uninitialized pods:
* InitialResources
* PodNodeSelector
* PodTolerationRestriction
* ServiceAccount


Doesn't change:
* NodeRestriction: this plugin only cares about the mirror pods created by nodes, and mirror pods are exempted from initializers, so no modification required
* PersistentVolumeLabel, DefaultStorageClass: It only cares about PersistentVolume. We can revisit when we relax its validation.
* InitialResource: deprecated according to https://github.com/kubernetes/kubernetes/issues/47837#issuecomment-321388879
2017-08-17 18:12:20 -07:00
Kubernetes Submit Queue f0066597ca Merge pull request #50220 from zhangxiaoyu-zidif/delete-statefulset-test-redundant-sort
Automatic merge from submit-queue (batch tested with PRs 50536, 50809, 50220, 50399, 50176)

Refactor statefulset test with sets.String

**What this PR does / why we need it**:
Delete redundant sort. These string slices only own one element.
There is no necessary to sort them.

**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-17 18:12:06 -07:00
Kubernetes Submit Queue f7dd477155 Merge pull request #50536 from crimsonfaith91/mark-deprecated
Automatic merge from submit-queue (batch tested with PRs 50536, 50809, 50220, 50399, 50176)

mark created-by annotation as deprecated

**What this PR does / why we need it**: This PR marks created-by annotation as deprecated in code comments.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
The `kubernetes.io/created-by` annotation is now deprecated and will be removed in v1.9. Use [ControllerRef](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/controller-ref.md) instead to determine which controller, if any, owns an object.
```
2017-08-17 18:12:02 -07:00
Monis Khan dd06794bc2
Add enj as reviewer to OWNERS
Adding myself as a reviewer for the following areas:

- API
- auth
- registry
- storage (etcd)

Signed-off-by: Monis Khan <mkhan@redhat.com>
2017-08-17 20:42:46 -04:00
Kubernetes Submit Queue d958a35ab9 Merge pull request #50834 from zjj2wry/fix_validation_expose_port
Automatic merge from submit-queue (batch tested with PRs 50281, 50747, 50347, 50834, 50852)

fix kubectl issue(#52)kubectl run --expose continues after error (mis…

…sing port)



**What this PR does / why we need it**:
https://github.com/kubernetes/kubectl/issues/52
**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-17 16:56:25 -07:00
Kubernetes Submit Queue 804c17766c Merge pull request #50747 from m1093782566/proxy-util
Automatic merge from submit-queue (batch tested with PRs 50281, 50747, 50347, 50834, 50852)

[proxy] Move IsLocalIP() and ShouldSkipService() to pkg/proxy/util

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

Move function `IsLocalIP()` and `ShouldSkipService()` to pkg/proxy/util package so that they can be consumed among different proxiers. 

Besides, add some UTs for `ShouldSkipService()`.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-08-17 16:56:19 -07:00
Kubernetes Submit Queue 7c13d65134 Merge pull request #50281 from FengyunPan/mark-detached-vsphere
Automatic merge from submit-queue

Mark volume as detached when node does not exist for vsphere

If node does not exist, node's volumes will be detached
automatically and become available. So mark them detached and
return false without error.
Fix #50266

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

**Release note**:
```release-note
NONE
```
2017-08-17 16:33:26 -07:00
juanvallejo c969079f49
add tests 2017-08-17 18:08:26 -04:00
Clayton Coleman da5265d19a
Enable server side printers for converted types 2017-08-17 17:41:34 -04:00
Clayton Coleman 6366f93d10
Clear collections between each test of TestList 2017-08-17 17:41:29 -04:00
Lantao Liu ef29b836c0 Set ExecSync timeout in liveness prober. 2017-08-17 21:09:45 +00:00
Kubernetes Submit Queue 8404244d7d Merge pull request #50671 from zjj2wry/selector
Automatic merge from submit-queue

fix issue(#49883) Add selector example

**What this PR does / why we need it**:
fixes #49883

**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-17 13:41:07 -07:00
Chao Xu bf6155b08c make admission plugins handle mutating spec of uninitialized pods 2017-08-17 12:51:09 -07:00
Phillip Wittrock 32c5d938eb Update with PR comments 2017-08-17 12:18:57 -07:00
Kubernetes Submit Queue e86f43bcab Merge pull request #50796 from yguo0905/hc
Automatic merge from submit-queue (batch tested with PRs 50563, 50698, 50796)

Disable Docker's health check until we officially support it

Ref: https://github.com/kubernetes/kubernetes/issues/50703

Tested locally.

Without this PR:

```
CONTAINER ID        IMAGE                                                  COMMAND                  CREATED             STATUS                     PORTS               NAMES
afdd796ddddc        gcr.io/ygg-gke-dev/nginx-healthcheck                   "nginx -g 'daemon ..."   5 minutes ago       Up 5 minutes (healthy)                       k8s_test-container_test-pod_default_8a1ad225-82bf-11e7-becb-480fcf514648_0
```

With this PR:
```
e3fb2437555f        gcr.io/ygg-gke-dev/nginx-healthcheck                   "nginx -g 'daemon ..."   10 seconds ago      Up 9 seconds                            k8s_test-container_test-pod_default_de82e83c-82c0-11e7-b3fc-480fcf514648_0
```

**Release note**:

```
Disable Docker's health check until we officially support it.
```

/assign @yujuhong 
/assign @dchen1107
2017-08-17 12:18:33 -07:00
Kubernetes Submit Queue 9d302ecffa Merge pull request #50698 from liyinan926/cr-v1beta2
Automatic merge from submit-queue (batch tested with PRs 50563, 50698, 50796)

Add ControllerRevision to apps/v1beta2

**What this PR does / why we need it**:
This PR added `ControllerRevision` currently in `apps/v1beta1` to `apps/v1beta2`.

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

**Special notes for your reviewer**:
@kow3ns @janetkuo 

**Release note**:
```release-note
Add ControllerRevision to apps/v1beta2
```
2017-08-17 12:18:29 -07:00
Shyam Jeedigunta 0b1d548879 Make route-controller list only relevant routes instead of all of them 2017-08-17 20:39:59 +02:00
wlan0 92415f7dd7 Proposal to add @wlan0 to appropriate owner files 2017-08-17 11:37:51 -07:00
Dan Williams c19965c740 cni: print better error when a CNI .configlist is put into a .config 2017-08-17 11:01:05 -05:00
Dr. Stefan Schimanski e3a3d108fb Fixup after k8s.io/{kube-gen -> code-generator} rename 2017-08-17 17:55:12 +02:00
juanvallejo 5b8b1eb2eb
allow default option values - kube top node|pod 2017-08-17 11:24:29 -04:00
zhengjiajin 43e3044b73 fix issue(#49883) Add selector example 2017-08-17 20:27:11 +08:00
zhengjiajin 1d7328a290 fix issue(#49695)kubectl set image deployment is ignoring --selector 2017-08-17 19:56:25 +08:00
Kubernetes Submit Queue 9aa04c755f Merge pull request #50826 from huzhengchuan/fix/delete-deadcode
Automatic merge from submit-queue

remove unused function in openstack cloud provider

**What this PR does / why we need it**:
List function not used in openstack cloud provider, and useless, I think need remove it.

**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-17 04:45:56 -07:00
Kubernetes Submit Queue a4acc38c96 Merge pull request #50550 from atlassian/cleanup-configz
Automatic merge from submit-queue (batch tested with PRs 50550, 50768)

Cleanup locking in configz

**What this PR does / why we need it**:
- Reduce scope of lock in `write()` method
- Use the read lock in `write()` method

**Release note**:
```release-note
NONE
```
/kind cleanup

@mikedanese 

p.s. looks like the `Set()` method could be removed if the value is accepted as an argument to `New()`. I.e. looks like to code re-sets the value.
2017-08-17 03:13:57 -07:00
gmarek 0504cfbc25 Make metav1.(Micro)?Time functions take pointers 2017-08-17 11:24:28 +02:00
Kubernetes Submit Queue 402e48b072 Merge pull request #50583 from liggitt/endpoints-empty-noop
Automatic merge from submit-queue (batch tested with PRs 49869, 47987, 50211, 50804, 50583)

Make endpoints controller update based on semantic equality

Fixes #50828
Split from https://github.com/kubernetes/kubernetes/pull/45294 for separate review

Currently, endpoints objects containing no subsets are decoded by the go client as subsets:[] (when requested individually) or as subsets:null (when requested in a list of endpoints).

Because the endpoints controller is fed via a lister/watcher, it gets the `subsets:null` version fed to it. The subsets computation then returns an empty slice, which fails reflect.DeepEqual, which triggers a write attempt.

This PR makes the comparison use semantic.DeepEqual to avoid spurious writes.

https://github.com/kubernetes/kubernetes/pull/45294 would remove the inconsistency between lists and individual gets.
2017-08-17 01:32:25 -07:00
Kubernetes Submit Queue c8cfc5f723 Merge pull request #50211 from NuxiNL/util-freebsd
Automatic merge from submit-queue (batch tested with PRs 49869, 47987, 50211, 50804, 50583)

Make socket address parsing work on FreeBSD.

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

I am currently in the process of porting Kubernetes to work on FreeBSD. What is interesting is that I am not interested in using Kubernetes to run Docker containers in this case. I happen to be the author of CloudABI, a sandboxing framework that is available on FreeBSD (and other systems). I want to have a cluster management tool for scheduling these sandboxed processes.

Anyway, right now `kubelet` crashes on startup when passing in CRI command line flags, for the reason that it's not able to parse `unix:...` socket addresses. This change fixes this by making the respective Linux-only source file work on FreeBSD as well.
2017-08-17 01:32:21 -07:00
Kubernetes Submit Queue 9c8f74e45c Merge pull request #47987 from wongma7/reclaimpolicy
Automatic merge from submit-queue (batch tested with PRs 49869, 47987, 50211, 50804, 50583)

Add ReclaimPolicy field to StorageClass

fix https://github.com/kubernetes/kubernetes/issues/38192, enough people want this imo so going ahead and adding it according to initial suggested design

some considerations:
* No Recycle allowed, Retain (& Delete) only.
* Do we need to gate the field.
* E2E test where a Retain PV is dynamically provisioned is TODO if we agree we want this & this is the way to do it.
* Need a feature repo issue to track docs and stuff for 1.8

**Release note**:

```release-note
StorageClass has a new field to configure reclaim policy of dynamically provisioned PVs.
```
2017-08-17 01:32:18 -07:00
Di Xu 75258b2763 update testcase err msg 2017-08-17 15:42:05 +08:00
Di Xu fc0bdb5622 auto-gen 2017-08-17 15:42:05 +08:00
Di Xu a8742a0643 fix GPU resource validation incorrectly allows zero limits 2017-08-17 15:41:59 +08:00
mathspanda 0e441494e7 verify pkg/util contains no code 2017-08-17 15:28:27 +08:00
m1093782566 992f618343 move IsLocalIP() and ShouldSkipService() to pkg/proxy/util 2017-08-17 14:32:05 +08:00
zhengjiajin c11a9fc95d fix kubectl issue(#52)kubectl run --expose continues after error (missing port) 2017-08-17 14:30:46 +08:00
Kubernetes Submit Queue ccc40f49ee Merge pull request #49342 from RenaudWasTaken/protobufapionly
Automatic merge from submit-queue (batch tested with PRs 49342, 50581, 50777)

Device Plugin Protobuf API

**What this PR does / why we need it:**
This implements the Device Plugin API

- Design document: kubernetes/community#695
- PR tracking: [kubernetes/features#368](https://github.com/kubernetes/features/issues/368#issuecomment-321625420)

Special notes for your reviewer:

First proposal submitted to the community repo, please advise if something's not right with the format or procedure, etc.
@vishh @derekwaynecarr

**Release note:**
```
NONE
```
2017-08-16 23:08:08 -07:00
zhengchuan hu 05d3e9c5f3 Delete useless code 2017-08-17 13:38:17 +08:00
Yinan Li 3b4f263b67 Added auto-generated changes 2017-08-16 21:29:03 -07:00
Yinan Li 975257633b Add ControllerRevision to apps/v1beta2 2017-08-16 20:49:01 -07:00
zhengjiajin 68bd8d2584 fix issue(#50821)Add image check, if image not changed, transform false 2017-08-17 11:19:14 +08:00
Kubernetes Submit Queue 4bfe9b1a56 Merge pull request #47599 from yujuhong/restart-init
Automatic merge from submit-queue (batch tested with PRs 46317, 48922, 50651, 50230, 47599)

Rerun init containers when the pod needs to be restarted

Whenever pod sandbox needs to be recreated, all containers associated
with it will be killed by kubelet. This change ensures that the init
containers will be rerun in such cases.

The change also refactors the compute logic so that the control flow of
init containers act is more aligned with the regular containers. Unit
tests are added to verify the logic.

This fixes #36485
2017-08-16 19:50:22 -07:00
Kubernetes Submit Queue 3f44fe8884 Merge pull request #50230 from jianglingxia/jlx080714
Automatic merge from submit-queue (batch tested with PRs 46317, 48922, 50651, 50230, 47599)

fix the typo of errorf info

**What this PR does / why we need it**:
fix the error message of stateful_pod_control_test.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-16 19:50:19 -07:00
Kubernetes Submit Queue 7a58f55423 Merge pull request #50651 from itowlson/log-azure-share-name
Automatic merge from submit-queue (batch tested with PRs 46317, 48922, 50651, 50230, 47599)

Log name if Azure file share cannot be created

**What this PR does / why we need it**: If the Azure storage provider fails to create a file share, it logs and error message 'failed to create share in account _foo_: _error-msg_'.  A user on the Slack azure-sig channel reported an error of "The specified resource name length is not within the permissible limits".  This PR adds logging of the name so that this error can be diagnosed in future.

**Which issue this PR fixes**: This was raised on Slack and has not been created as a GitHub issue.

**Special notes for your reviewer**: None

**Release note**:

```release-note
Changed the error log format when creating an Azure file share to include the name of the share.
```
2017-08-16 19:50:17 -07:00
Kubernetes Submit Queue ce1485c626 Merge pull request #48922 from ConnorDoyle/integer-resources-as-default
Automatic merge from submit-queue (batch tested with PRs 46317, 48922, 50651, 50230, 47599)

Resources outside the `*kubernetes.io` namespace are integers and cannot be over-committed.

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

Fixes #50473 

Rationale: since the scheduler handles all resources except CPU as integers, that could just be the default behavior for namespaced resources.

cc @RenaudWasTaken @vishh 

**Release note**:

```release-note
Resources outside the `*kubernetes.io` namespace are integers and cannot be over-committed.
```
2017-08-16 19:50:15 -07:00
Kubernetes Submit Queue 225b9119d6 Merge pull request #46317 from monopole/kubectlValidator
Automatic merge from submit-queue

Remove kubectl's dependence on schema file in pkg/api/validation.

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

Makes functions in validation/schema.go private to kubectl,
further isolating kubectl.  This move revealed a "hidden" dependence
(a dependence not expressed in a BUILD or make file) from a feature
level test in /hack/make-rules on a kubectl test data file.  So this
PR also adds some BUILD rules around the relevant hack targets, to make the
dependence official.  A later PR will move the kubectl aspect of this "hack"
test into a kubectl test directory.  Leaving it in place for now after establishing 
and "official" dependency, since moving the test beyond PR scope.  The
test also depends on a small sh file in //cluster, which makes no sense.

**Which issue this PR fixes**

Part of a series of PRs to address kubernetes/community#598

**Release note**:
```release-note
NONE
```
2017-08-16 19:06:17 -07:00
YuxiJin-tobeyjin f579e395b5 Remove redundant err definition 2017-08-17 10:05:23 +08:00
Kubernetes Submit Queue 427d763a3f Merge pull request #50643 from kow3ns/enableappsv1beta2
Automatic merge from submit-queue

Enables the v1beta2 version of the apps API group by default

**What this PR does / why we need it**: Enables the v1beta2 version of the apps API group by default

fixes # #50641

```release-note
apps/v1beta2 is enabled by default. DaemonSet, Deployment, ReplicaSet, and StatefulSet have been moved to this group version.
```
2017-08-16 18:07:35 -07:00
Jeffrey Regan dbc22ad6fd Remove kubectl's dependence on schema file in pkg/api/validation.
**What this PR does / why we need it**:

Makes functions in validation/schema.go private to kubectl,
further isolating kubectl.

**Which issue this PR fixes**

Part of a series of PRs to address kubernetes/community#598

**Release note**:
```release-note
NONE
```
2017-08-16 16:38:28 -07:00
Kubernetes Submit Queue 929f138319 Merge pull request #50756 from sttts/sttts-deepcopy-calls-kubectl
Automatic merge from submit-queue (batch tested with PRs 41901, 50762, 50756)

kubectl: simplify deepcopy calls
2017-08-16 16:25:23 -07:00
Yang Guo fe06c7ec64 Disables Docker's health check 2017-08-16 16:12:09 -07:00
Kubernetes Submit Queue 4032896ef1 Merge pull request #41901 from soltysh/cronjobs_beta
Automatic merge from submit-queue

Promote CronJobs to batch/v1beta1 - just the API

This PR promotes CronJobs to beta.

@erictune @kubernetes/sig-apps-api-reviews @kubernetes/api-approvers ptal

This builds on top of #41890 and needs #40932 as well

```release-note
Promote CronJobs to batch/v1beta1.
```
2017-08-16 15:59:46 -07:00
Cheng Xing 1234d2f500 On AttachDetachController node status update, do not retry when node doesn't exist but keep the node entry in cache 2017-08-16 15:42:15 -07:00
Renaud Gaubert 04bc27231b Generated files
Signed-off-by: Renaud Gaubert <rgaubert@nvidia.com>
2017-08-16 15:36:51 -07:00
Connor Doyle 630af5422b OIR predicate includes namespaced resources. 2017-08-16 15:29:24 -07:00
Yu-Ju Hong 152d8b9d96 Re-run init containers if the pod sandbox needs to be recreated
Whenever pod sandbox needs to be recreated, all containers associated
with it will be killed by kubelet. This change ensures that the init
containers will be rerun in such cases.

The change also refactors the compute logic so that the control flow of
init containers act is more aligned with the regular containers. Unit
tests are added to verify the logic.
2017-08-16 15:27:18 -07:00
zhangxiaoyu-zidif 3393cf4718 fix-review 2017-08-17 06:00:02 +08:00
Kubernetes Submit Queue 5c558ddb18 Merge pull request #50722 from vmware/longVmName
Automatic merge from submit-queue (batch tested with PRs 50061, 48580, 50779, 50722)

Fix for Policy based volume provisioning failure due to long VM Name in vSphere cloud provider

Dummy VM is used for SPBM policy based provisioning feature of vSphere cloud provider.
Dummy VM name is generated based on kubernetes cluster name and pv name. It can easily go beyond 
vSphere's limitation of 80 characters for vmName.

To solve the long VM name failure hash is used instead of vSphere-k8s-clusterName-PvName

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

**Release note:**
```release-note
None
```

@BaluDontu @divyenpatel @luomiao @tusharnt
2017-08-16 14:57:31 -07:00
Kubernetes Submit Queue d6c381d5c6 Merge pull request #50779 from apelisse/update-pkg-watch-build
Automatic merge from submit-queue (batch tested with PRs 50061, 48580, 50779, 50722)

Remove BUILD reference to removed files: Fix bazel build

**What this PR does / why we need it**:
Bazel build is broken because a pull-request has removed some go files, but not the BUILD references to these file. Update the go files. I've also created an issue in test-infra(https://github.com/kubernetes/test-infra/issues/4083) as this should have been detected earlier

**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-16 14:57:26 -07:00
Kubernetes Submit Queue 8a6aa958dd Merge pull request #48580 from mengqiy/kubectl_i18n
Automatic merge from submit-queue (batch tested with PRs 50061, 48580, 50779, 50722)

move i18n to kubectl/util

Move `pkg/util/i18n` to `pkg/kubectl/util/i18n` per https://github.com/kubernetes/kubernetes/issues/48209#issuecomment-311730681.
This affects kubectl and kubeadm. It should be fine that `kubeadm` depends on `kubectl`.

partially addresses: kubernetes/community#598

```release-note
NONE
```

/assign @apelisse @monopole
2017-08-16 14:57:24 -07:00
Kubernetes Submit Queue 504b76c130 Merge pull request #50061 from m1093782566/kubectl-fix
Automatic merge from submit-queue (batch tested with PRs 50061, 48580, 50779, 50722)

Add UTs for pkg/kubectl/generate_test.go

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

Fix  pkg/kubectl [ParseLabels](https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/generate.go#L176) & [ParseProtocols](https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/generate.go#L147) bugs and add some UTs

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-08-16 14:57:21 -07:00
Phillip Wittrock aca62a1741 Address PR comments 2017-08-16 14:22:32 -07:00
Kenneth Owens 8a466ec47b generated code 2017-08-16 12:30:26 -07:00
Kenneth Owens aa321b4915 enables apps/v1beta2 and removes WIP comments from documentation 2017-08-16 12:30:07 -07:00
ymqytw b776df8a20 move i18n to kubectl/util 2017-08-16 12:27:36 -07:00
Kubernetes Submit Queue 6430b1002c Merge pull request #50710 from enj/enj/r/rbac_auth_builders
Automatic merge from submit-queue (batch tested with PRs 46927, 50664, 50710)

Refactor RBAC authorizer entry points

This change refactors various RBAC authorizer functions to be more flexible in their inputs.  This makes it easier to reuse the various components that make up the authorizer.

Signed-off-by: Monis Khan <mkhan@redhat.com>

```release-note
NONE
```
2017-08-16 11:54:27 -07:00
Kubernetes Submit Queue 4ac725a5ed Merge pull request #50664 from lichuqiang/b0815
Automatic merge from submit-queue (batch tested with PRs 46927, 50664, 50710)

fix typo(code annotation) in resouce_analyzer of kubelet
2017-08-16 11:54:25 -07:00
Kubernetes Submit Queue 0439695ee8 Merge pull request #46927 from shiywang/delete
Automatic merge from submit-queue (batch tested with PRs 46927, 50664, 50710)

Remove deprecated command 'kubectl stop'

Fixes https://github.com/kubernetes/kubernetes/issues/11384
I think this is the final step @kubernetes/sig-cli-pr-reviews  @kargakis
2017-08-16 11:54:21 -07:00
Antoine Pelisse f8a85d0fa0 Remove BUILD reference to removed files 2017-08-16 11:22:37 -07:00
Kubernetes Submit Queue e76ecd634a Merge pull request #50739 from FengyunPan/auto-get-subnet-id
Automatic merge from submit-queue (batch tested with PRs 50769, 50739)

Support autoprobing subnet-id for openstack cloud provider

Currently if user doesn't specify subnet-id or specify a unsafe
subnet-id, openstack cloud provider can't create a correct LoadBalancer
service.
Actually we can get it automatically. This patch do a improvement.
This is a part of #50726

**Special notes for your reviewer**:
/assign @dims 
/assign @anguslees 

**Release note**:
```release-note
NONE
```
2017-08-16 09:24:54 -07:00
Kubernetes Submit Queue e8bd71174c Merge pull request #50769 from bskiba/rem
Automatic merge from submit-queue (batch tested with PRs 50769, 50739)

Make removing nodes public for Kubemark controller

The ability to remove a specific node is needed by Cluster Autoscaler to work.

**Release note**:
```
NONE
```
2017-08-16 09:24:53 -07:00
Monis Khan 8e7893e541
Refactor RBAC authorizer entry points
This change refactors various RBAC authorizer functions to be more
flexible in their inputs.  This makes it easier to reuse the various
components that make up the authorizer.

Signed-off-by: Monis Khan <mkhan@redhat.com>
2017-08-16 11:43:39 -04:00
Kubernetes Submit Queue d2cf96d6ef Merge pull request #48057 from NickrenREN/fix-validateNodeAllocatable
Automatic merge from submit-queue (batch tested with PRs 50758, 48057)

Fix node allocatable resource validation

GetNodeAllocatableReservation gets all the reserved resource value
Allocatable resource = capacity - reservation


**Release note**:

```release-note
NONE
```
2017-08-16 07:57:24 -07:00
zhengchuan hu 938bffcb04 Delete "hugetlb" from whitelistControllers 2017-08-16 22:52:56 +08:00
Beata Skiba 6f236695bf Make removing nodes public for Kubemark controller 2017-08-16 15:51:20 +02:00
Kubernetes Submit Queue 49bee177b2 Merge pull request #49115 from CaoShuFeng/audit_beta
Automatic merge from submit-queue (batch tested with PRs 49115, 47480)

Upgrade advanced audit to version v1beta1

This change does nothing but only upgrades advanced audit to version v1beta1.
There will be following up changes which does real effect to advanced audit feature.

After this change audit policy file should contain apiVersion and kind and has such format:
```
apiVersion: audit.k8s.io/v1alpha1
kind: Policy
rules:
  - level: None
```
or use the v1beta1 policy:
```
apiVersion: audit.k8s.io/v1beta1
kind: Policy
rules:
  - level: None
```
Updates #48561

**Release note**:

```
Upgrade advanced audit to version v1beta1.
```
2017-08-16 06:27:25 -07:00
Kubernetes Submit Queue 02ad43917c Merge pull request #50727 from CaoShuFeng/leaked_socket_file
Automatic merge from submit-queue (batch tested with PRs 50692, 50727)

remove leaked socket file after unit test

Before this change:
```
$ make test WHAT=k8s.io/kubernetes/pkg/master
+++ [0816 11:19:03] Running tests without code coverage
ok  	k8s.io/kubernetes/pkg/master	27.953s
$ find -type s
./pkg/master/127.0.0.1:2100324511
./pkg/master/127.0.0.1:2100424511
./pkg/master/localhost:8235197834378812860
./pkg/master/localhost:82351978343788128600
./pkg/master/127.0.0.1:2100524511
./pkg/master/127.0.0.1:2100624511
./pkg/master/localhost:1155389051645284688
./pkg/master/localhost:11553890516452846880
```
**Release note**:

```
NONE
```
2017-08-16 05:33:58 -07:00
Kubernetes Submit Queue 7acff7e180 Merge pull request #50558 from xiangpengzhao/remove-pkg
Automatic merge from submit-queue (batch tested with PRs 50589, 50558)

Remove packages which aren't relied on by heapster anymore.

**What this PR does / why we need it**:
Do the TODO:
```
// TODO apimachinery remove this empty package.  Godep fails without this because heapster relies
// on this package.  This will allow us to start splitting packages, but will force
// heapster to update on their next kube rebase.
```

These packages aren't relied on by heapster anymore. This PR removes them. This is a followup of #48410.

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

**Special notes for your reviewer**:
/cc @deads2k 
/kind cleanup

**Release note**:

```release-note
NONE
```
2017-08-16 04:29:22 -07:00
Kubernetes Submit Queue 47605e148f Merge pull request #50589 from jinzhejz/jinzhejz_commentsrefine
Automatic merge from submit-queue (batch tested with PRs 50589, 50558)

remove useless comments

**What this PR does / why we need it**:
remove useless comments

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

**Release note**:
```release-note
None
```
2017-08-16 04:29:19 -07:00
Cao Shufeng 0410221c3f run hack/update-all.sh 2017-08-16 19:25:11 +08:00
Kubernetes Submit Queue 49ed2a3115 Merge pull request #50204 from smarterclayton/move_list_to_metav1
Automatic merge from submit-queue (batch tested with PRs 50711, 50742, 50204)

Move List (the type) into metav1 but preserve the exposed type

Make a list something that other components can use without depending on the core API. This does not change the public API exposure of `List` (it is still in `v1`) but makes the interface common across both.
2017-08-16 02:50:26 -07:00
Kubernetes Submit Queue 4fa4471e64 Merge pull request #50711 from oomichi/fix-comment
Automatic merge from submit-queue (batch tested with PRs 50711, 50742, 50204)

Fix comment of limitranges

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

The comment of limitrages' API seems to be copied from
pkg/registry/autoscaling/horizontalpodautoscaler/storage/storage.go
with the other implementation code.
It is a little difficult to understand what is the API, then this
PR fixes it.
2017-08-16 02:50:21 -07:00
Dr. Stefan Schimanski c0dbe9a900 kubectl: simplify deepcopy calls 2017-08-16 10:58:51 +02:00
xiangpengzhao 1c4dbcf5ca Replace hard-code "cpu" and "memory" to consts 2017-08-16 16:37:50 +08:00
Maciej Szulik 025de6a35a
Generated changes for CronJobs in batch/v1beta1 2017-08-16 08:42:21 +02:00
Maciej Szulik 43b8715d82
Promote CronJobs to batch/v1beta1 2017-08-16 08:42:21 +02:00
FengyunPan 8d4949c5f3 Support autoprobing subnet-id for openstack cloud provider
Currently if user doesn't specify subnet-id or specify a unsafe
subnet-id, openstack cloud provider can't create a correct LoadBalancer
service.
Actually we can get it automatically. This patch do a improvement.
This is a part of #50726
2017-08-16 14:21:49 +08:00
Kubernetes Submit Queue 1d633b7fdd Merge pull request #50116 from MrHohn/fix-healthcheck-nodeport-allocation
Automatic merge from submit-queue

Use nodePortOp for allocating healthCheck nodePort

**What this PR does / why we need it**: Allocate healthCheck nodePort via nodePortOp so that we won't leak port on failure.

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

**Special notes for your reviewer**:
/assign @xiangpengzhao @thockin 


**Release note**:

```release-note
NONE
```
2017-08-15 21:03:38 -07:00
jianglingxia 2d132ed61a update it 2017-08-16 11:49:52 +08:00
Cao Shufeng 1bb55993fc remove leaked socket file after unit test
Before this change:
$ make test WHAT=k8s.io/kubernetes/pkg/master
+++ [0816 11:19:03] Running tests without code coverage
ok  	k8s.io/kubernetes/pkg/master	27.953s
$ find -type s
./pkg/master/127.0.0.1:2100324511
./pkg/master/127.0.0.1:2100424511
./pkg/master/localhost:8235197834378812860
./pkg/master/localhost:82351978343788128600
./pkg/master/127.0.0.1:2100524511
./pkg/master/127.0.0.1:2100624511
./pkg/master/localhost:1155389051645284688
./pkg/master/localhost:11553890516452846880
2017-08-16 11:20:16 +08:00
Clayton Coleman 1b3836d5df
Move List (the type) into metav1 but preserve the exposed type 2017-08-15 22:30:40 -04:00