Commit Graph

22641 Commits (9a761b16c1558106800222dbc52f6ab03c40c64c)

Author SHA1 Message Date
Kubernetes Submit Queue 9e56e58647 Merge pull request #47177 from rrati/aws-additional-logging
Automatic merge from submit-queue (batch tested with PRs 49107, 47177, 49234, 49224, 49227)

Added logging to AWS api calls. #46969

Additionally logging of when AWS API calls start and end to help diagnose problems with kubelet on cloud provider nodes not reporting node status periodically.  There's some inconsistency in logging around this PR we should discuss.

IMO, the API logging should be at a higher level than most other types of logging as you would probably only want it in limited instances.  For most cases that is easy enough to do, but there are some calls which have some logging around them already, namely in the instance groups.  My preference would be to keep the existing logging as it and just add the new API logs around the API call.
2017-07-20 15:08:20 -07:00
Kubernetes Submit Queue 84f773850e Merge pull request #49107 from edevil/try_remove_old_log
Automatic merge from submit-queue (batch tested with PRs 49107, 47177, 49234, 49224, 49227)

Make sure the previous symlink file is deleted before trying to create a new one

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

It deletes possibly existing symlinks to container log files.

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

fixes #49105

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-07-20 15:08:17 -07:00
Janet Kuo 56f16346d2 Autogen
make clean && make generated_files && hack/update-all.sh
2017-07-20 14:16:43 -07:00
Kubernetes Submit Queue 6329c862ee Merge pull request #49111 from jsafrane/nsenter-path-space
Automatic merge from submit-queue

Fix findmnt parsing in containerized kubelet

NsEnterMounter should not stop parsing findmnt output on the first space but on the last one, just in case the mount point name itself contains a space.

Fixes #49106

```release-note
Fixed unmounting of vSphere volumes when kubelet runs in a container.
```

@kubernetes/sig-storage-pr-reviews
2017-07-20 14:10:31 -07:00
David Ashpole 7a23f8b018 remove deprecated flags LowDiskSpaceThresholdMB and OutOfDiskTransitionFrequency 2017-07-20 13:23:13 -07:00
Davanum Srinivas 6139f9ab89 Avoid looking up instance id until we need it
currently kube-controller-manager cannot run outside of a vm started
by openstack (with --cloud-provider=openstack params). We try to read
the instance id from the metadata provider or the config drive or the
file location only when we really need it. In the normal scenario, the
controller-manager uses the node name to get the instance id.
41541910e1/pkg/volume/cinder/attacher.go (L149)

The localInstanceID is currently used only in the test case, so let
us not read it until it is really needed.
2017-07-20 14:40:10 -04:00
ymqytw 9b393a83d4 update godep 2017-07-20 11:03:49 -07:00
ymqytw 3dfc8bf7f3 update import 2017-07-20 11:03:49 -07:00
Humble Chirammal 413380e557 The `backup-volfile-servers` mount option allows to specify more than
one server to be contacted in single mount command. With this option in place,
it is not required to iterate over all the servers in the addrlist.
A mount attempt with this option  will fetch all the servers mentioned in
the list, Reference # https://access.redhat.com/documentation/en-US/Red_Hat_Storage/3/html/Administration_Guide/sect-Native_Client.html

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-07-20 23:17:32 +05:30
Janet Kuo 7a2d31fd44 Don't enable apps/v1beta2 by default 2017-07-20 10:25:21 -07:00
Janet Kuo 767082e8e9 Add new API version apps/v1beta2
Add a new API version apps/v1beta2 and enable it by default.
apps/v1beta2 has a copy of apps/v1beta1 types, except for
ControllerRevision.
2017-07-20 10:25:21 -07:00
Kubernetes Submit Queue 3660ff466f Merge pull request #49235 from dims/allow-cinder-scenarios-without-load-balancer
Automatic merge from submit-queue (batch tested with PRs 49276, 49235)

Don't fail fast if LoadBalancer section is missing

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

We should allow scenarios where cinder can be used even if the
operator does not want to use the openstack load balancer. So
let's warn in the beginning if subnet-id is missing but fail only
if they try to use the load balancer

**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-07-20 08:18:09 -07:00
Haoran Wang f02008338f add integration testing for bootstrap token auth 2017-07-20 22:34:21 +08:00
Kubernetes Submit Queue 5529d01a22 Merge pull request #48810 from sttts/sttts-fuzzer-cleanup
Automatic merge from submit-queue (batch tested with PRs 49114, 48810)

Unify fuzzers and roundtrip tests

- reorganize apimachinery/pkg/api/testing package to avoid circular imports
- make fuzzers modular per apigroup
- add roundtrip test for meta types
- add roundtrip test for a couple of staging apigroups

Follow-up:

- split `pkg/api` tests by apigroup
2017-07-20 07:20:40 -07:00
Kubernetes Submit Queue c3a9270ed4 Merge pull request #49114 from sttts/sttts-kube-gen
Automatic merge from submit-queue (batch tested with PRs 49114, 48810)

Move generators to staging/src/k8s.io/kube-gen

Reason number one for people trying the impossible of vendoring kube: reuse of the generators.
2017-07-20 07:20:37 -07:00
Davanum Srinivas 8fd21d67a8 Don't fail fast if LoadBalancer section is missing
We should allow scenarios where cinder can be used even if the
operator does not want to use the openstack load balancer. So
let's warn in the beginning if subnet-id is missing but fail only
if they try to use the load balancer
2017-07-20 07:42:28 -04:00
Michal Fojtik 4fa9b8778a
fix mutation in statefulset sync 2017-07-20 12:33:11 +02:00
Dr. Stefan Schimanski ecc811d263 Unify fuzzers and roundtrip tests 2017-07-20 12:31:00 +02:00
Michail Kargakis e884eac6fe
Remove myself from a bunch of places
Signed-off-by: Michail Kargakis <mkargaki@redhat.com>
2017-07-20 12:10:46 +02:00
Kubernetes Submit Queue 67ec254ef3 Merge pull request #49203 from adelton/flexvolume-TestCanSupport-init-fail
Automatic merge from submit-queue (batch tested with PRs 49212, 49203, 49255)

If the init fails for whatever reason, plugin is nil and cannot be used.

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

Addressing
```
=== RUN   TestCanSupport
E0719 13:48:19.829849    2289 driver-call.go:232] init command failed, status: Successx, reason:
--- FAIL: TestCanSupport (0.00s)
	flexvolume_test.go:180: Can't find the plugin by name
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
	panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0x11fc5b5]
```

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

N/A

**Special notes for your reviewer**:

N/A

**Release note**:

```release-note
NONE
```
2017-07-20 02:35:13 -07:00
Di Xu 50bfe02fea make default values as const vars 2017-07-20 16:13:17 +08:00
Kubernetes Submit Queue acc19cafa4 Merge pull request #49231 from dims/tolerate-flavor-info-keys
Automatic merge from submit-queue

Tolerate Flavor information for computing instance type

**What this PR does / why we need it**:
Current devstack seems to return "id", and an upcoming change using
nova's microversion will be returning "original_name":
https://blueprints.launchpad.net/nova/+spec/instance-flavor-api

So let's just inspect what is present and use that to figure out
the instance type.

**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-07-20 00:33:46 -07:00
Kubernetes Submit Queue de71cc50d5 Merge pull request #49261 from heidecke/on-premises
Automatic merge from submit-queue

Fix on-premises term in error string and comments for aws provider

**What this PR does / why we need it**: fix for correct terminology of "on-premises" over "on-premise"

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

**Special notes for your reviewer**: Updated error string while doing a scrub for the incorrect term in the docs (kubernetes/kubernetes.github.io#4413).

**Release note**:

```release-note
NONE
```
2017-07-19 23:03:26 -07:00
Dr. Stefan Schimanski edfbb9aa64 Fixup go2idl references 2017-07-20 07:41:37 +02:00
Chao Xu 6b813e437d remove types.generated.go generated for internal API types 2017-07-19 22:06:11 -07:00
Kubernetes Submit Queue ea18935670 Merge pull request #45540 from edevil/azure_extra_logging
Automatic merge from submit-queue (batch tested with PRs 49083, 45540, 46862)

Add extra logging to azure API get calls

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

This PR adds extra logging for external calls to the Azure API, specifically get calls.

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

This will help troubleshoot problems arising from the usage of this cloudprovider. For example, it looks like #43516 is caused by a call to the cloudprovider taking too much time.
2017-07-19 21:18:25 -07:00
Luke Heidecke c8b6924424 Fix on-premises term in error string and comments 2017-07-20 13:04:33 +09:00
Kubernetes Submit Queue e48ad7782e Merge pull request #49230 from deads2k/quota-02-informer
Automatic merge from submit-queue (batch tested with PRs 49218, 48253, 48967, 48460, 49230)

use informers for quota evaluation of core resources where possible

Not all quota evaluators are using shared informers.  This updates them all to have the option of doing it.

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

```
resource quota uses shared informers for core types
```
2017-07-19 20:05:39 -07:00
Kubernetes Submit Queue db1956b876 Merge pull request #48460 from cosmincojocar/azure_file_cloud_environment
Automatic merge from submit-queue (batch tested with PRs 49218, 48253, 48967, 48460, 49230)

Fix the Azure file to work within different cloud environments

**What this PR does / why we need it**:
Fix the Azure file plugin to work within different cloud environments.

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

cc @rootfs @brendandburns
2017-07-19 20:05:37 -07:00
Kubernetes Submit Queue ecadada7ef Merge pull request #48967 from jackfrancis/azure-lb-backoff
Automatic merge from submit-queue (batch tested with PRs 49218, 48253, 48967, 48460, 49230)

additional backoff in azure cloudprovider

Fixes #48971

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

We want to be able to opt in to backoff retry logic for kubelet-originating request behavior: node IP address resolution and node load balancer pool membership enforcement.

**Special notes for your reviewer**:

The use-case for this is azure cloudprovider clusters with large node counts, especially during cluster installation, or other scenarios when lots of nodes come online at once and attempt to register all resources with the backend API. To allow clusters at scale more control over the API request rate in-cluster, backoff config has the ability to meaningful slow down this rate, when appropriate.

**Release note**:

```additional backoff in azure cloudprovider
```
2017-07-19 20:05:34 -07:00
Kubernetes Submit Queue 6d534b38e8 Merge pull request #48253 from CaoShuFeng/serviceaccount
Automatic merge from submit-queue (batch tested with PRs 49218, 48253, 48967, 48460, 49230)

allow impersonate serviceaccount in cli

We can impersonate four kinds of resources according to the code:
https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apiserver/pkg/endpoints/filters/impersonation.go#L83

**Release note**:

```
allow impersonate serviceaccount in cli
```
Fixes: https://github.com/kubernetes/kubernetes/issues/48260
2017-07-19 20:05:32 -07:00
Kubernetes Submit Queue 19e4fac129 Merge pull request #49218 from caesarxuchao/limit-clientset-visibility
Automatic merge from submit-queue (batch tested with PRs 49218, 48253, 48967, 48460, 49230)

Restrict the visibility of two generated packages in pkg/client/

These two packages are deprecated. Please use the client-go copy of these two packages.

Currently staging/copy.sh copied these two packages to client-go. I'll send follow-up PRs to let code-gen output to client-go directly and remove these two packages. The purpose of this PR is to prevent more imports of these packages while I refactor the codegen.
2017-07-19 20:05:29 -07:00
Kubernetes Submit Queue 25d3523359 Merge pull request #48940 from rootfs/fc-fencing
Automatic merge from submit-queue (batch tested with PRs 48377, 48940, 49144, 49062, 49148)

support fc volume attach and detach

**What this PR does / why we need it**:
Support FC volume attach and detach to enforce RWO access

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-07-19 19:10:12 -07:00
Kubernetes Submit Queue 8d26afa8a6 Merge pull request #48377 from bsalamat/priority_class
Automatic merge from submit-queue

Add PriorityClass API object under new "scheduling" API group

**What this PR does / why we need it**: This PR is a part of a series of PRs to add pod priority to Kubernetes. This PR adds a new API group called "scheduling" with a new API object called "PriorityClass". PriorityClass maps the string value of priority to its integer value.

**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**: Given the size of this PR, I will add the admission controller for the PriorityClass in a separate PR.

**Release note**:

```release-note
Add PriorityClass API object under new "scheduling" API group
```

ref/ #47604
ref/ #48646
2017-07-19 19:04:29 -07:00
ravisantoshgudimetla b01a1c3881 Build files generated 2017-07-19 18:36:12 -04:00
ravisantoshgudimetla 9dbf1a5644 Refactoring taints to reduce sprawl 2017-07-19 18:36:07 -04:00
Davanum Srinivas c197e6238d Tolerate Flavor information for computing instance type
Current devstack seems to return "id", and an upcoming change using
nova's microversion will be returning "original_name":
https://blueprints.launchpad.net/nova/+spec/instance-flavor-api

So let's just inspect what is present and use that to figure out
the instance type.
2017-07-19 16:06:53 -04:00
Brendan Burns 38b1b74f82 Fix up imds, also refactor for better testing. 2017-07-19 12:53:08 -07:00
deads2k bbd291faa7 use informers for quota evaluation of core resources where possible 2017-07-19 15:52:39 -04:00
deads2k 62157572cf tighten quota controller interface 2017-07-19 15:36:45 -04:00
Chao Xu c6f09f0c9c Restrict the visibility of two packages in pkg/client/
These two packages are deprecated. Please use the client-go copy of these two
packages.
2017-07-19 11:23:04 -07:00
Kubernetes Submit Queue 8a98983adc Merge pull request #49180 from feiskyer/seccomp
Automatic merge from submit-queue (batch tested with PRs 48981, 47316, 49180)

Add seccomp profile in sandbox security context

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

PR  #46332 adds seccomp profile to container security context, but not sandbox. This PR adds seccomp profile in sandbox security context. Without this, we couldn't honour "seccomp.security.alpha.kubernetes.io/pod" for sandbox.

**Which issue this PR fixes**

fixes #49179.

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```

/cc @yujuhong
2017-07-19 11:21:28 -07:00
Kubernetes Submit Queue c0287ce420 Merge pull request #47316 from k82cn/k8s_47315
Automatic merge from submit-queue (batch tested with PRs 48981, 47316, 49180)

Added golint check for pkg/kubelet.

**What this PR does / why we need it**:
Added golint check for pkg/kubelet, and make golint happy.

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

**Release note**:
```release-note-none
```
2017-07-19 11:21:25 -07:00
Kubernetes Submit Queue 9378daba9c Merge pull request #48981 from colemickens/acr
Automatic merge from submit-queue (batch tested with PRs 48981, 47316, 49180)

azure: acr: support MSI with preview ACR with AAD auth

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

The recently added support for Managed Identity in Azure (#48854) was incompatible with automatic ACR docker credential integration (#48980).

This PR resolves that, by leveraging a feature available in Preview regions, on new managed clusters with support for AAD `access_token` authentication.

Notes:
* This includes code copied from [Azure/acr-docker-credential-helper](https://github.com/Azure/acr-docker-credential-helper). I copied the MIT license from that project and added a copyright line for Microsoft on it. (but one of the hack/verify-* scripts requires the Kubernetes copyright header. So there are two copyright headers in the file now...)
* Eventually this should vendor  [Azure/acr-docker-credential-helper](https://github.com/Azure/acr-docker-credential-helper) when it exposes the right functionality.
* This includes a small, non-function-impacting workaround for a temporary service-side bug.


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

**Special notes for your reviewer**:
Please don't LGTM it without reviewing the `azure_acr_helper.go` file's license header...

**Release note**:
```release-note
azure: acr: support MSI with preview ACR with AAD auth
```
2017-07-19 11:21:23 -07:00
Kubernetes Submit Queue b78fc209a4 Merge pull request #49045 from ericchiang/remove-anytoken-authenticator-option
Automatic merge from submit-queue (batch tested with PRs 49058, 49072, 49137, 49182, 49045)

*: remove --insecure-allow-any-token option

~Since the authenticator is still used in e2e tests, don't remove
the actual package. Maybe a follow up?~

edit: e2e and integration tests have been switched over to the tokenfile
authenticator instead.

```release-note
The --insecure-allow-any-token flag has been removed from kube-apiserver. Users of the flag should use impersonation headers instead for debugging.
```

closes #49031

cc @kubernetes/sig-auth-pr-reviews
2017-07-19 10:27:29 -07:00
André Cruz 89012ccb23 Fix test 2017-07-19 17:14:35 +01:00
Kubernetes Submit Queue 772c352992 Merge pull request #49197 from malc0lm/master
Automatic merge from submit-queue

fix leader-elect-resource-lock's description

**What this PR does / why we need it**:
    The leader-elect-resource-lock description miss a space in pkg/client/leaderelectionconfig/config.go. It will effect other component's help document which use leader election.
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
    I think it's is needless to open a issue.
**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-07-19 08:44:08 -07:00
Kubernetes Submit Queue 575cbdf7d4 Merge pull request #45012 from xiangpengzhao/fix-delete-svc
Automatic merge from submit-queue

Remove service on termination when exec 'kubectl run' command with flags "--rm" and "--expose"

**What this PR does / why we need it**:
As the title says and issue #40504 mentioned.
cc @tanapoln

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

**Special notes for your reviewer**:
Related to: #44915

**Release note**:

```release-note
NONE
```
2017-07-19 07:59:34 -07:00
Kubernetes Submit Queue 7eb53ce85c Merge pull request #48171 from sdkfzv/master
Automatic merge from submit-queue

Improve the warning message if the rbd command is not found.

**What this PR does / why we need it**:
The previous warning msg is not correct if there is no rbd cmd.

**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-07-19 07:14:19 -07:00
malcolm lee e02fec7b21 fix leader-elect-resource-lock's description 2017-07-19 22:14:11 +08:00
Jan Pazdziora 1ebd51aa70 If the init fails for whatever reason, plugin is nil and cannot be used.
Addressing
=== RUN   TestCanSupport
E0719 13:48:19.829849    2289 driver-call.go:232] init command failed, status: Successx, reason:
--- FAIL: TestCanSupport (0.00s)
	flexvolume_test.go:180: Can't find the plugin by name
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
	panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0x11fc5b5]
2017-07-19 16:08:45 +02:00
Kubernetes Submit Queue c326cb1d94 Merge pull request #49079 from smarterclayton/restore_metrics
Automatic merge from submit-queue

Restore cAdvisor prometheus metrics to the main port

But under a new path - `/metrics/cadvisor`. This ensures a secure port still exists for metrics while getting the benefit of separating out container metrics from the kubelet's metrics as recommended in the linked issue.

Fixes #48483

```release-note-action-required
Restored cAdvisor prometheus metrics to the main port -- a regression that existed in v1.7.0-v1.7.2
cAdvisor metrics can now be scraped from `/metrics/cadvisor` on the kubelet ports.
Note that you have to update your scraping jobs to get kubelet-only metrics from `/metrics` and `container_*` metrics from `/metrics/cadvisor`
```
2017-07-19 05:16:56 -07:00
Kubernetes Submit Queue 36ade22a5a Merge pull request #49116 from sttts/sttts-authorative-api-v1-ref
Automatic merge from submit-queue (batch tested with PRs 49116, 49095)

Move pkg/api/v1/ref -> client-go/tools/reference

`pkg/api/v1/ref` is the only remaining package copied from pkg/api/v1 to client-go via staging/copy.sh.
2017-07-19 03:21:25 -07:00
Kubernetes Submit Queue 2faf7ff2bc Merge pull request #36238 from resouer/eclass-2-dev
Automatic merge from submit-queue (batch tested with PRs 48043, 48200, 49139, 36238, 49130)

Implement equivalence cache by caching and re-using predicate result

The last part of #30844, I opened a new PR instead of overwrite the old one because we changed some basic assumption by allowing invalidating equivalence cache item by individual predicate.

The idea of this PR is based on discussion in https://github.com/kubernetes/kubernetes/issues/32024

- [x]  Pods belong to same controllerRef considered to be equivalent
- [x] ` podFitsOnNode` will use cached predicate result if it's available
- [x] Equivalence cache will be updated when if a fresh new predicate is done
- [x] `factory.go` will invalid specific predicate cache(s) based on the object change
- [x] Since `schedule` and `bind` are async, we need to optimistically invalid affected cache(s) before `bind`
- [x] Fully unit test of affected files
- [x] e2e test to verify cache update/invalid workflow
- [x] performance test results

- [x] Some nits fixes related but expected to result in `needs-rebase` so they are split to: #36060 #35968 #37512

cc @wojtek-t @davidopp
2017-07-19 01:57:32 -07:00
Alexander Block 8057056d1c Support "fstype" parameter in dynamically provisioned PVs 2017-07-19 10:34:13 +02:00
Cosmin Cojocar 95cf81f833 Remove clientset from azure file test build 2017-07-19 10:18:51 +02:00
Kubernetes Submit Queue d74ac3785e Merge pull request #48950 from alexandercampbell/kubectl-deduplicate-deployment-generators
Automatic merge from submit-queue (batch tested with PRs 49120, 46755, 49157, 49165, 48950)

kubectl: deduplicate deployment generators

**What this PR does / why we need it**: See the description on https://github.com/kubernetes/kubectl/issues/44

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

**Special notes for your reviewer**: Yes, the lines added and removed are about the same. This is because I added 20+ lines of docstrings. Check the diff. You'll see I deleted a lot of duplicated logic :)

**Release note**:

```release-note
NONE
```
2017-07-19 00:06:29 -07:00
Cosmin Cojocar 7ae381207e Remove unused import after rebase 2017-07-19 08:59:32 +02:00
Cosmin Cojocar 6c3a853149 Add the fake cloud provider to azure file build 2017-07-19 08:56:12 +02:00
Cosmin Cojocar 5c4290d4f2 Add tests for other cloud providers 2017-07-19 08:56:12 +02:00
Cosmin Cojocar 4378c7ae8e Restrict the dir and file permissions of the mounted volume 2017-07-19 08:56:12 +02:00
Cosmin Cojocar 44210092c1 Fix comment to conform to golint 2017-07-19 08:56:12 +02:00
Cosmin Cojocar a3506c8e16 Fall back on Azure public cloud endpoint when no Azure cloud provider is found 2017-07-19 08:56:12 +02:00
Cosmin Cojocar 599ab98f86 Add the azure cloud provider dependency to azure file plugin 2017-07-19 08:56:12 +02:00
Cosmin Cojocar b79a7a12c8 Fix the Azure file to work within different cloud environments 2017-07-19 08:55:24 +02:00
Pengfei Ni d0205c8b9f Add seccomp profile in sandbox security context 2017-07-19 06:14:51 +00:00
Kubernetes Submit Queue 882f838a0d Merge pull request #49134 from deads2k/cli-14-tolerate-missing-template
Automatic merge from submit-queue (batch tested with PRs 49055, 49128, 49132, 49134, 49110)

make sure that the template param is the right type before using it

The CLI should attempt to make sure that the flags it uses conform to expectations instead of unconditionally killing a process.  This allows for possible re-use of the printing stack.
2017-07-18 21:54:23 -07:00
Kubernetes Submit Queue 8337bd028d Merge pull request #49132 from deads2k/cli-01-union-category
Automatic merge from submit-queue (batch tested with PRs 49055, 49128, 49132, 49134, 49110)

add a union category expander

Adds a union category expander for use when we need to combined hardcoded and non-hardcoded options.
2017-07-18 21:54:22 -07:00
Kubernetes Submit Queue 45432de47b Merge pull request #49128 from deads2k/server-29-mising-shortname
Automatic merge from submit-queue (batch tested with PRs 49055, 49128, 49132, 49134, 49110)

add svc and netpol to discovery

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

one shortname was missing entirely, the other was on a storage not actually used as storage.

@ncdc
2017-07-18 21:54:20 -07:00
Kubernetes Submit Queue 32580b89b1 Merge pull request #48871 from wanghaoran1988/do_not_close_stdin
Automatic merge from submit-queue (batch tested with PRs 48914, 48535, 49099, 48935, 48871)

do not close os.Stdin manually

**What this PR does / why we need it**:
We don't need close os.Stdin manually, it will block our read from stdin after finish the visit.
**Special notes for your reviewer**:

**Release note**:
```
None
```
2017-07-18 21:04:28 -07:00
Kubernetes Submit Queue b787acecb3 Merge pull request #49099 from xiangpengzhao/fix-healthcheck-flake
Automatic merge from submit-queue (batch tested with PRs 48914, 48535, 49099, 48935, 48871)

Fix health check node port test flake

**What this PR does / why we need it**:
- Releases the allocated HealthCheck NodePort at the end of each associated test case.
- Fixes the weird output `0` in `failed to allocate requested HealthCheck NodePort 0`

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

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

**Release note**:

```release-note
NONE
```
2017-07-18 21:04:24 -07:00
Klaus Ma 63b78a37e0 Added golint check for pkg/kubelet. 2017-07-19 11:33:06 +08:00
Kubernetes Submit Queue ccaaf5cad5 Merge pull request #48232 from caesarxuchao/move-admission-v1alph1
Automatic merge from submit-queue (batch tested with PRs 48702, 48965, 48740, 48974, 48232)

Move admission/v1alpha1 to k8s.io/api

Fix https://github.com/kubernetes/kubernetes/issues/47972
2017-07-18 20:06:21 -07:00
Kubernetes Submit Queue c1c5f8e60e Merge pull request #48974 from supereagle/cleanup-objectreference-conversion
Automatic merge from submit-queue (batch tested with PRs 48702, 48965, 48740, 48974, 48232)

Cleanup the conversion of ObjectReference

**What this PR does / why we need it**:
No need to convert ObjectReference as `k8s.io/kubernetes/pkg/api/v1` and `k8s.io/client-go/pkg/api/v1` has been consistent in `k8s.io/api/core/v1`.

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

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

**Release note**:
```release-note
NONE
```
2017-07-18 20:06:19 -07:00
Kubernetes Submit Queue a0e7114ab3 Merge pull request #48702 from FengyunPan/cloudprovider-rackspace
Automatic merge from submit-queue (batch tested with PRs 48702, 48965, 48740, 48974, 48232)

Rackspace for cloud-controller-manager

This implements the NodeAddressesByProviderID and InstanceTypeByProviderID
methods used by the cloud-controller-manager to the RackSpace provider.
The instance type returned is the flavor name, for consistency
InstanceType has been implemented too returning the same value.

This is part of #47257 cc @wlan0

**Release note**:
```release-note
NONE
```
2017-07-18 20:06:14 -07:00
xiangpengzhao abc7c4cf10 Add AzureFile,Flex,Flocker volume source to describe printer. 2017-07-19 10:42:27 +08:00
Kubernetes Submit Queue 0dff56b4d8 Merge pull request #49109 from MaciekPytel/update_hpa_owners
Automatic merge from submit-queue

Add approvers to owners file for hpa

Currently none of hpa developers or people in sig-autoscaling has the right to approve PRs to hpa, meaning it needs to be approved at pkg/controller level by people not working on autoscaling.
2017-07-18 18:19:53 -07:00
Kubernetes Submit Queue fc1d2b3be7 Merge pull request #48256 from xiangpengzhao/move-pkg-util
Automatic merge from submit-queue (batch tested with PRs 48481, 48256)

Refactor: pkg/util into sub-pkgs

**What this PR does / why we need it**:
- move code in pkg/util into sub-pkgs
- delete some unused funcs

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

**Special notes for your reviewer**:
This is the final work of #15634. It will close that issue.
/cc @thockin 

**Release note**:

```release-note
NONE
```
2017-07-18 18:19:19 -07:00
Kubernetes Submit Queue 7bd44a21be Merge pull request #48481 from fabianofranz/apply_protect_against_nil_panic
Automatic merge from submit-queue (batch tested with PRs 48481, 48256)

Protect against nil panic in apply

**What this PR does / why we need it**: `kubectl apply` has a potential panic (actually verified in OpenShift in https://github.com/openshift/origin/issues/15017) where a `patcher` calls the `runDelete` function with a nil `resource.RESTClient`, but under some conditions the client is required by that function.

**Release note**:

```release-note
NONE
```

@pwittrock @kubernetes/sig-cli-bugs
2017-07-18 18:19:17 -07:00
Bobby (Babak) Salamat e827e1ba87 autogenerated files 2017-07-18 17:47:57 -07:00
Bobby (Babak) Salamat af2e55e70e addressed reviewer comments 2017-07-18 17:47:57 -07:00
Bobby Salamat 33e6a476ba Add PriorityClass API
Add PriorityClass to pkg/registry

Add PriorityClass to pkg/master/master.go

Add PriorityClass to import_know_versions.go

Update linted packages

minor fix
2017-07-18 17:47:57 -07:00
Eric Chiang e2f2ab67f2 *: remove --insecure-allow-any-token option
e2e and integration tests have been switched over to the tokenfile
authenticator instead.

```release-note
The --insecure-allow-any-token flag has been removed from kube-apiserver. Users of the flag should use impersonation headers instead for debugging.
```
2017-07-18 16:03:15 -07:00
Cole Mickens 8e093b9e23 azure: acr: support auth to preview ACR w/ MSI+AAD 2017-07-18 15:22:34 -07:00
Chao Xu 590793f9a7 generated 2017-07-18 15:20:05 -07:00
Dr. Stefan Schimanski 5925a0a1df Move pkg/api/v1/ref -> client-go/tools/reference 2017-07-18 22:45:43 +02:00
Chao Xu 57a96ca40a move admission/v1alpha1 to k8s.io/api 2017-07-18 13:26:20 -07:00
Alexander Campbell a7c79711d5 kubectl/deployment: add BaseDeploymentGenerator to reduce duplication
BaseDeploymentGenerator performs the functionality that was common to
both of the "create deployment" generators.
2017-07-18 13:17:45 -07:00
Fabiano Franz 71cbad7cbb Flag support in kubectl plugins 2017-07-18 15:35:40 -03:00
Kubernetes Submit Queue ebf24c14a9 Merge pull request #44174 from humblec/glusterVolOption
Automatic merge from submit-queue (batch tested with PRs 46094, 48544, 48807, 49102, 44174)

Allow user to pass various gluster volume options when  glusterfs volumes are dynamically provisioned.

This patch add new storage class parameter called
`volumeoptions` which can be used to set various volume options.
for eg# if you want to enable encryption on volumes,
the values like `client.ssl on`, `server.ssl on`..etc can be passed
to `volumeoptions` parameter in storageclass.
    

Issue # https://github.com/kubernetes/kubernetes/issues/28454

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-07-18 11:20:59 -07:00
Kubernetes Submit Queue bc2e5381e9 Merge pull request #49102 from aleksandra-malinowska/kubemark-node-provider-id
Automatic merge from submit-queue (batch tested with PRs 46094, 48544, 48807, 49102, 44174)

add InstanceID to fake cadvisor (used in Kubemark)

This change is for setting Node.Spec.ProviderID field in Kubemark hollow nodes. It shouldn't affect other tests using cadvisor.Fake as field is nil by default.

cc @gmarek
2017-07-18 11:20:57 -07:00
Kubernetes Submit Queue 89a1ce2c1f Merge pull request #48807 from jsafrane/fc-describe
Automatic merge from submit-queue (batch tested with PRs 46094, 48544, 48807, 49102, 44174)

Implement kubectl describe <fibre-channel PV>

kubectl did not show any details about Fibre Channel volumes, someone just forgot to implement it.

Tested with:

```shell
$ kubectl create -f - <<EOF
apiVersion: v1
kind: PersistentVolume
metadata:
  name: myfc
spec:
  capacity:
    storage: 100Gi
  accessModes:
    - ReadWriteOnce
  persistentVolumeReclaimPolicy: Delete
  fc:
       targetWWNs: ['500a0982991b8dc5', '500a0982891b8dc5']
       lun: 2
       fsType: ext4
       readOnly: true
EOF

$ kubectl describe pv myfc
Name:		myfc
Labels:		<none>
Annotations:	<none>
StorageClass:	
Status:		Available
Claim:		
Reclaim Policy:	Delete
Access Modes:	RWO
Capacity:	100Gi
Message:	
Source:
    Type:	FC (a Fibre Channel disk)
    TargetWWNs:	500a0982991b8dc5, 500a0982891b8dc5
    LUN:	2
    FSType:	ext4
    ReadOnly:	true
Events:		<none>
```

```release-note
NONE
```
@kubernetes/sig-cli-pr-reviews
2017-07-18 11:20:54 -07:00
Kubernetes Submit Queue 5bbdfc6661 Merge pull request #48544 from sttts/sttts-typed-deepcopy-1.8
Automatic merge from submit-queue (batch tested with PRs 46094, 48544, 48807, 49102, 44174)

Static deepcopy – phase 1

This PR is the follow-up of https://github.com/kubernetes/kubernetes/pull/36412, replacing the
dynamic reflection based deepcopy with static DeepCopy+DeepCopyInto methods on API types.

This PR **does not yet** include the code dropping the cloner from the scheme and all the
porting of the calls to scheme.Copy. This will be part of a follow-up "Phase 2" PR.

A couple of the commits will go in first:
- [x] audit: fix deepcopy registration  https://github.com/kubernetes/kubernetes/pull/48599
- [x] apimachinery+apiserver: separate test types in their own packages #48601 
- [x] client-go: remove TPR example #48604
- [x] apimachinery: remove unneeded GetObjectKind() impls #48608 
- [x] sanity check against origin, that OpenShift's types are fine for static deepcopy https://github.com/deads2k/origin/pull/34

TODO **after** review here:
- [x] merge https://github.com/kubernetes/gengo/pull/32 and update vendoring commit
2017-07-18 11:20:51 -07:00
Kubernetes Submit Queue ac742fa9f2 Merge pull request #46094 from atlassian/sync-informer-run
Automatic merge from submit-queue (batch tested with PRs 46094, 48544, 48807, 49102, 44174)

Shared Informer Run blocks until all goroutines finish

**What this PR does / why we need it**:
Makes Shared Informer Run method block until all goroutines it spawned finish. See #45454.

**Which issue this PR fixes**
Fixes #45454

**Release note**:
```release-note
NONE
```
2017-07-18 11:20:48 -07:00
deads2k a67255c170 make sure that the template param is the right type before using it 2017-07-18 13:48:29 -04:00
deads2k 486d8ef229 add a union category expander 2017-07-18 13:40:22 -04:00
deads2k 8232778ffe add svc and netpol to discovery 2017-07-18 13:16:41 -04:00
Fabiano Franz 183ff5237d Protect against nil panic in apply 2017-07-18 12:55:34 -03:00
Harry Zhang 0e8517875e Update factory.go informers to update equivalence cache
Fix tombstone

Add e2e to verify equivalence cache

Addressing nits in factory,go and e2e

Update build files
2017-07-18 23:55:01 +08:00
Humble Chirammal b432854f17 This patch add new storage class parameter called
`volumeoptions` which can be used to set various volume options.
for eg# if you want to enable encryption on volumes,
the values like `client.ssl on`, `server.ssl on`..etc can be passed
to `volumeoptions` parameter in storageclass.

Issue # https://github.com/kubernetes/kubernetes/issues/28454

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-07-18 19:45:38 +05:30
André Cruz 4071a36c12 Add extra logging to azure API calls 2017-07-18 14:40:28 +01:00
Clayton Coleman f5f9893824
Restore cAdvisor prometheus metrics to the main port
But under a new path - `/metrics/cadvisor`. This ensures a secure port
still exists for metrics while getting the benefit of separating out
container metrics from the kubelet's metrics.
2017-07-18 08:58:14 -04:00
Jan Safranek 87551071a1 Fix findmnt parsing in containerized kubelet
NsEnterMounter should not stop parsing findmnt output on the first space but
on the last one, just in case the mount point name itself contains a space.
2017-07-18 13:35:44 +02:00
Maciej Pytel 78b955d312 Add approvers to owners file for hpa 2017-07-18 13:23:43 +02:00
André Cruz 9f81cf096b Make sure the previous symlink file is deleted
before trying to create a new one.
2017-07-18 12:06:31 +01:00
xiangpengzhao d765f91c1d Fix health check node port test flake 2017-07-18 19:05:40 +08:00
Aleksandra Malinowska c174625116 add InstanceID to fake cadvisor (used in Kubemark) 2017-07-18 12:10:54 +02:00
Kubernetes Submit Queue b0b0400516 Merge pull request #48983 from k82cn/set_network_inode_unknown
Automatic merge from submit-queue (batch tested with PRs 48983, 49013)

Added comments on not set node network/inode condition to unknown.

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

**Release note**:
```release-note
None
```
2017-07-18 02:23:42 -07:00
Kubernetes Submit Queue f3dcf63130 Merge pull request #48576 from caesarxuchao/fix-ExternalAdmissionHookConfigurationManager
Automatic merge from submit-queue (batch tested with PRs 48576, 49010)

make externalAdmissionHookConfigurationManager distinguish API disabled error

The externalAdmissionHookConfigurationManager does not return "DisabledErr" even if the API is disabled, so the GenericWebhook admission controller will not fail open.

The GenericWebhook admission controller is default to off, so the bug is hidden in most cases. To be safe, we should cherrypick it to 1.7.

```release-note
Fix a bug where the GenericWebhook admission plugin does not fail open when the admissionregistration API is disabled
```
2017-07-18 00:35:43 -07:00
xiangpengzhao 396c596e07
Add customresourcedefinition and its shortcut in "kubectl get" 2017-07-18 15:31:56 +08:00
Dr. Stefan Schimanski 8dd0989b39 Update generated code 2017-07-18 09:28:49 +02:00
Dr. Stefan Schimanski b7fb418a19 staging/copy.sh: don't strip tags anymore with k8s.io/api 2017-07-18 09:28:49 +02:00
Dr. Stefan Schimanski 39d95b9b06 deepcopy: add interface deepcopy funcs
- add DeepCopyObject() to runtime.Object interface
- add DeepCopyObject() via deepcopy-gen
- add DeepCopyObject() manually
- add DeepCopySelector() to selector interfaces
- add custom DeepCopy func for TableRow.Cells
2017-07-18 09:28:47 +02:00
xiangpengzhao 01daf707c5 Refactor: pkg/util into sub-pkgs 2017-07-18 14:34:08 +08:00
supereagle 73dcd79d03 cleanup the conversion of ObjectReference 2017-07-18 12:47:03 +08:00
Mikhail Mazurskiy d789615902
Shared Informer Run blocks until all goroutines finish
Fixes #45454
2017-07-18 14:05:08 +10:00
xiangpengzhao a6be3b64f8 Make "kubectl version" json output more readable. 2017-07-18 11:21:35 +08:00
Kubernetes Submit Queue 96f7788f78 Merge pull request #48797 from FengyunPan/fix-empty-cidr
Automatic merge from submit-queue (batch tested with PRs 48231, 47377, 48797, 49020, 49033)

Fix parsing empty CIDR

Fix #48795
Checking ClusterCIDR and ServiceCIDR before parsing them.

**Release note**:
```release-note
NONE
```
2017-07-17 19:37:45 -07:00
Kubernetes Submit Queue 68fcc59214 Merge pull request #48231 from jcbsmpsn/update-kubelet-to-client-go
Automatic merge from submit-queue (batch tested with PRs 48231, 47377, 48797, 49020, 49033)

Migrate kubelet and linked code from clientset_generated to client-go

Ran a script in the kubernetes repo to migrate kubelet and linked code from clientset_generated package imports to client-go imports.

**NOTE:** There are also some manual changes that were made in order to accommodate some
differences between clientset_generated and client-go. The manual changes are isolated into a
single commit titled "Manual changes."

```sh
#! /bin/bash

for file in $(find . \( -name "clientset_generated" -o -name "informers_generated" \) -prune -o -type f -name "*.go"); do

  if [[ -d $file ]]; then
    continue
  fi

  if [[ $file == "./cmd/libs/go2idl/informer-gen/main.go" ]]; then
    continue
  fi

  sed -i '
      s|"k8s.io/kubernetes/pkg/client/clientset_generated/clientset"|clientset "k8s.io/client-go/kubernetes"|;

      # Correct a couple of unique cases.
      s|clientset clientset "k8s.io/client-go/kubernetes"|clientset "k8s.io/client-go/kubernetes"|;
      s|cs clientset "k8s.io/client-go/kubernetes"|clientset "k8s.io/client-go/kubernetes"|;
      s|VersionedClientSetPackage: clientset "k8s.io/client-go/kubernetes"|VersionedClientSetPackage: "k8s.io/client-go/kubernetes"|;

      s|"k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1"|"k8s.io/client-go/kubernetes/typed/certificates/v1beta1"|;

      s|"k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1"|"k8s.io/client-go/kubernetes/typed/core/v1"|;

      s|"k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1"|"k8s.io/client-go/kubernetes/typed/extensions/v1beta1"|;

      s|"k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/autoscaling/v1"|"k8s.io/client-go/kubernetes/typed/autoscaling/v1"|;

      s|"k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1"|"k8s.io/client-go/kubernetes/typed/authentication/v1"|;

      s|"k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1"|"k8s.io/client-go/kubernetes/typed/authorization/v1beta1"|;

      s|"k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/apps/v1beta1"|"k8s.io/client-go/kubernetes/typed/apps/v1beta1"|;

      s|"k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1"|"k8s.io/client-go/kubernetes/typed/rbac/v1beta1"|;

      s|"k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake"|"k8s.io/client-go/kubernetes/fake"|;

      s|"k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake"|"k8s.io/client-go/kubernetes/typed/core/v1/fake"|;

      s|k8s.io/kubernetes/pkg/client/clientset_generated/clientset|k8s.io/client-go/kubernetes|;



      s|informers "k8s.io/kubernetes/pkg/client/informers/informers_generated/externalversions"|"k8s.io/client-go/informers"|;

      s|"k8s.io/kubernetes/pkg/client/informers/informers_generated/externalversions/core/v1"|"k8s.io/client-go/informers/core/v1"|;

      s|"k8s.io/kubernetes/pkg/client/informers/informers_generated/externalversions/apps/v1beta1"|"k8s.io/client-go/informers/apps/v1beta1"|;

      s|"k8s.io/kubernetes/pkg/client/informers/informers_generated/externalversions/extensions/v1beta1"|"k8s.io/client-go/informers/extensions/v1beta1"|;

      s|"k8s.io/kubernetes/pkg/client/informers/informers_generated/externalversions/batch/v1"|"k8s.io/client-go/informers/batch/v1"|;

      s|"k8s.io/kubernetes/pkg/client/informers/informers_generated/externalversions/autoscaling/v1"|"k8s.io/client-go/informers/autoscaling/v1"|;

      s|"k8s.io/kubernetes/pkg/client/informers/informers_generated/externalversions/policy/v1beta1"|"k8s.io/client-go/informers/policy/v1beta1"|;

      s|"k8s.io/kubernetes/pkg/client/informers/informers_generated/externalversions/certificates/v1beta1"|"k8s.io/client-go/informers/certificates/v1beta1"|;

      s|"k8s.io/kubernetes/pkg/client/informers/informers_generated/externalversions/storage/v1"|"k8s.io/client-go/informers/storage/v1"|;



      s|"k8s.io/kubernetes/pkg/client/listers/core/v1"|"k8s.io/client-go/listers/core/v1"|;

      s|"k8s.io/kubernetes/pkg/client/listers/apps/v1beta1"|"k8s.io/client-go/listers/apps/v1beta1"|;

      s|"k8s.io/kubernetes/pkg/client/listers/extensions/v1beta1"|"k8s.io/client-go/listers/extensions/v1beta1"|;

      s|"k8s.io/kubernetes/pkg/client/listers/autoscaling/v1"|"k8s.io/client-go/listers/autoscaling/v1"|;

      s|"k8s.io/kubernetes/pkg/client/listers/batch/v1"|"k8s.io/client-go/listers/batch/v1"|;

      s|"k8s.io/kubernetes/pkg/client/listers/certificates/v1beta1"|"k8s.io/client-go/listers/certificates/v1beta1"|;

      s|"k8s.io/kubernetes/pkg/client/listers/storage/v1"|"k8s.io/client-go/listers/storage/v1"|;

      s|"k8s.io/kubernetes/pkg/client/listers/policy/v1beta1"|"k8s.io/client-go/listers/policy/v1beta1"|;


  ' $file
done

hack/update-bazel.sh

hack/update-gofmt.sh
```
2017-07-17 19:37:41 -07:00
sdkfzv cb388d0c7e Merge branch 'master' into master 2017-07-18 09:37:29 +08:00
zhangningmin 01b6fc78cd Improve the warning message if the rbd command is not found. 2017-07-18 09:33:24 +08:00
Kubernetes Submit Queue e7cf03e0cf Merge pull request #45894 from tnozicka/export-base-controller-ref-manager
Automatic merge from submit-queue (batch tested with PRs 49017, 45440, 48384, 45894, 48808)

Export BaseControllerRefManager

**What this PR does / why we need it**:
It exports go struct `baseControllerRefManager`. This is needed so other distributions like OpenShift or TPR controllers can reuse that code for writing ref managers for other objects. 

**Release note**:
It is not worthy of a release note.
2017-07-17 16:26:57 -07:00
Kubernetes Submit Queue e0dcaa3409 Merge pull request #45440 from verb/nit-too-much-m
Automatic merge from submit-queue (batch tested with PRs 49017, 45440, 48384, 45894, 48808)

Fix typo in ExecCommandParam

**What this PR does / why we need it**: Makes ExecCommandParam look like all of the other "Param"s

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-07-17 16:26:53 -07:00
Jacob Simpson b565f53822 update-bazel.sh 2017-07-17 15:06:08 -07:00
Chao Xu 9d489c8504 manual changes 2017-07-17 15:05:38 -07:00
Jacob Simpson a765b8cfca Migrate api.Scheme to scheme.Scheme 2017-07-17 15:05:38 -07:00
Jacob Simpson 2c70e5df35 Manual changes. 2017-07-17 15:05:37 -07:00
Jacob Simpson 29c1b81d4c Scripted migration from clientset_generated to client-go. 2017-07-17 15:05:37 -07:00
Tomas Nozicka a887cd3434 Export BaseControllerRefManager 2017-07-17 22:36:51 +02:00
Kubernetes Submit Queue d20414e2b6 Merge pull request #48972 from ixdy/revert-pr-48933
Automatic merge from submit-queue (batch tested with PRs 48997, 48595, 48898, 48711, 48972)

Revert "Use go-ansiterm version matching docker/pkg/term/windows v1.11"

This reverts commit 72044a11a1.

**What this PR does / why we need it**: earlier this week, #47140 updated the vendored azure dependencies, which broke the windows build because the docker dependencies were too old. #48933 was merged, which reverted part of #47140 and fixed the build, but then #48308, which updated the vendored docker dependencies, broke the windows build again.

By reverting #48933, we should get back to a working build, I hope.

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

**Release note**:

```release-note
NONE
```
/release-note-none
/test pull-kubernetes-cross
/assign @brendandburns 
cc @karataliu @yguo0905 @yujuhong @dchen1107
2017-07-17 13:23:57 -07:00
Kubernetes Submit Queue 2c1c33d416 Merge pull request #48898 from portworx/fix-px-volume-calls
Automatic merge from submit-queue (batch tested with PRs 48997, 48595, 48898, 48711, 48972)

Use local PX endpoint for mount, unmount, detach and attach calls

**What this PR does / why we need it**:
This PR fixes an issue with Setup and TearDown of Portworx volumes which has side-effects such a Pod using a Portworx volume not being able to start on the minion.

**Which issue this PR fixes**: fixes #49034 
This PR addresses an issue that fails to mount, attach, unmount or detach a volume when Kubernetes sends these requests to Portworx when it's API server on that particular minion is down. 

Portworx mount, unmount, attach and detach requests need to be received on the minion where the pod is running. So these calls need to talk to the Portworx API server running locally on that node (and NOT to the Portworx k8s service since it may route the request to any node in the cluster). This PR explicitly makes such requests local only.

**Release note**:
```release-note
NONE
```
2017-07-17 13:23:52 -07:00
Kubernetes Submit Queue e7dff4fd12 Merge pull request #48595 from bonowang/master
Automatic merge from submit-queue (batch tested with PRs 48997, 48595, 48898, 48711, 48972)

remove useless code in podautoscaler

**What this PR does / why we need it**:
code optimization,remove some useless code.

**Special notes for your reviewer:**
My first Kubernetes PR,please let me know if anything wrong on this one.

**Release note**:

```release-note
NONE
```
2017-07-17 13:23:49 -07:00
Kubernetes Submit Queue aed912bf63 Merge pull request #48997 from johanneswuerbach/hpa-min
Automatic merge from submit-queue (batch tested with PRs 48997, 48595, 48898, 48711, 48972)

hpa: Prevent scaling below MinReplicas if desiredReplicas is zero

**What this PR does / why we need it**:
Prevent a HPA scaling below `minReplicas` if `desiredReplicas` is calculated as `0`.

Example events of a HPA continuously scaling between `1` and `MinReplicas`:
```
2h        59s        22    horizontal-pod-autoscaler            Normal        SuccessfulRescale    New size: 1; reason: All metrics below target
2h        29s        22    horizontal-pod-autoscaler            Normal        SuccessfulRescale    New size: 15; reason: Current number of replicas below Spec.MinReplicas
```

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

**Special notes for your reviewer**:

**Release note**:

```release-note
hpa: Prevent scaling below MinReplicas if desiredReplicas is zero
```
2017-07-17 13:23:47 -07:00
Kubernetes Submit Queue 10dc1aac61 Merge pull request #46332 from feiskyer/Seccomp
Automatic merge from submit-queue

Kubelet CRI: move seccomp from annotations to security context

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

This is the final step for #39130, which moves seccomp from annotations to linux container security context. And it also fixes #36997 by set the full seccomp profile path for node-installed profiles.

Note it doesn't include spec the seccomp profile format, which should be addressed at #39128. And a following PR is required for implementing in kuberuntime and dockershim.

**Which issue this PR fixes** 

Fixes #39130
Fixes #36997

**Special notes for your reviewer**:

**Release note**:
```release-note
Kubelet CRI: move seccomp from annotations to security context.
```
2017-07-17 10:16:52 -07:00
Kubernetes Submit Queue ce91f2ab26 Merge pull request #48909 from caesarxuchao/owners
Automatic merge from submit-queue

Add approvers to pkg/controller/garbagecollector

cc @deads2k
2017-07-17 08:49:23 -07:00
Kubernetes Submit Queue d54ab221cd Merge pull request #48991 from smarterclayton/cleanup_restclient
Automatic merge from submit-queue

Remove old, core/v1 specific constructs from RESTClient

Now that metav1 is abstracted from the APIs, RESTClient should also be agnostic to the core API.

* Remove `LabelSelectorParam` and `FieldSelectorParam` - use `VersionedParams` with `ListOptions`
* Remove `UintParam`
* Remove all legacy field selector logic from `VersionedParams` - ParameterCodec now handles that
* Remove special parameters (like `timeout`) which is no longer set by most clients
2017-07-17 06:50:18 -07:00
Klaus Ma 7e28a2cfd1 Added comments on not set node network/inode condition to unknown. 2017-07-17 21:34:28 +08:00
Jan Safranek 0eface85e4 PV controller: resync informers manually
We want relatively short resync period of PV/PVCs and at the same time we
don't want to force such short resync to all shared informer consumers.
Therefore we need to make our own periodic resync.
2017-07-17 13:39:08 +02:00
Kubernetes Submit Queue 1170b7c2a1 Merge pull request #47087 from ravisantoshgudimetla/node_controller_flake
Automatic merge from submit-queue

Changes to fix the node eviction flake

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-07-17 02:31:51 -07:00
Johannes Würbach a99d988e3b
hpa: Prevent scaling below MinReplicas if desiredReplicas is zero 2017-07-17 09:32:06 +02:00
Kubernetes Submit Queue 4b4e91977d Merge pull request #48274 from superbrothers/fix-to-override-kubectl-flags
Automatic merge from submit-queue (batch tested with PRs 48381, 48274)

Fix completions for --namespace to override kubectl flags

**What this PR does / why we need it**:
This PR fixes completions for --namespace to override kubectl flags. Due to not using __kubectl_parse_get, __kubectl_get_namespaces doesn't support to override kubectl flags.

**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-07-16 19:03:36 -07:00
Kubernetes Submit Queue 0049dd0717 Merge pull request #48381 from superbrothers/completion-kubectl-config-delete-cluster
Automatic merge from submit-queue

Support completion for kubectl config delete-cluster

**What this PR does / why we need it**:
This PR supports completion for kubectl config delete-cluster.
```
$ kubectl config delete-cluster <tab>
cluster01  minikube
```

**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
Support completion for kubectl config delete-cluster
```
2017-07-16 18:50:08 -07:00
Pengfei Ni 79a964ee1d Run hack/update-generated-runtime.sh 2017-07-17 09:49:43 +08:00
Pengfei Ni 31ac1d8e6b Move seccomp from anntations to security context 2017-07-17 09:49:43 +08:00
Kubernetes Submit Queue 8ce6378512 Merge pull request #46091 from xilabao/new-output-in-edit
Automatic merge from submit-queue (batch tested with PRs 46091, 48280)

allow output patch string in edit command

**What this PR does / why we need it**:
allow user to get the patch from edit command if user is not familiar with the patch format.

```
# ./cluster/kubectl.sh create role a --verb=get,list --resource=no
role "a" created

# ./cluster/kubectl.sh edit role a --output-patch=true
Patch: {"rules":[{"apiGroups":[""],"resources":["nodes"],"verbs":["get","list","delete"]}]}
role "a" edited

# ./cluster/kubectl.sh create role b --verb=get,list --resource=no
role "b" created

# ./cluster/kubectl.sh patch role b -p '{"rules":[{"apiGroups":[""],"resources":["nodes"],"verbs":["get","list","delete"]}]}'
role "b" patched
```
**Which issue this PR fixes**: fixes #47173

**Special notes for your reviewer**:

**Release note**:

```release-note
Could get the patch from kubectl edit command
```
2017-07-16 18:04:42 -07:00
Kubernetes Submit Queue 35794a8f2d Merge pull request #47638 from xilabao/update-hostports-log
Automatic merge from submit-queue (batch tested with PRs 47417, 47638, 46930)

update the err of hostPorts in psp

**What this PR does / why we need it**:
change `Allowed ports: [{8000 8080}]` to `Allowed ports: [8000-8080]`

**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-07-16 16:33:03 -07:00
Kubernetes Submit Queue 1cbb7b1405 Merge pull request #47417 from xilabao/print-non-existent-key
Automatic merge from submit-queue (batch tested with PRs 47417, 47638, 46930)

print non-existent key in configmap

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

**Special notes for your reviewer**:
carry from #41574
**Release note**:

```release-note
NONE
```
2017-07-16 16:33:01 -07:00
Clayton Coleman b6d9815b95
Remove use of (Label|Field)SelectorParam 2017-07-16 15:56:11 -04:00
Klaus Ma 01097dba02 Renamed nodeutil to v1node. 2017-07-16 15:11:17 +08:00
Nick Sardo 9b29f42fc5 Further removal of Gets from Creates 2017-07-15 19:41:21 -07:00
Haoran Wang c536614509 do not close os.Stdin manually 2017-07-16 09:55:08 +08:00
Kubernetes Submit Queue 86a42b8796 Merge pull request #46973 from php-coder/improve_flex_logging
Automatic merge from submit-queue (batch tested with PRs 46973, 48556)

Improve error reporting when flex driver has failed to initialize

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

This PR improves error reporting for the case when flex driver is failing to initialize. There are 2 improvements:

1) show only the plugin name instead of a full struct. This makes a message shorter and removes useless and internal information.

Before:
>E0605 16:44:59.330215   26786 plugins.go:359] Failed to load volume plugin &{k8s/nfs /usr/libexec/kubernetes/kubelet-plugins/volume/exec/k8s~nfs %!s(*kubelet.kubeletVolumeHost=&{0xc431ea5800 {{1 0} map[kubernetes.io/downward-api:0xc431ee3f20 kubernetes.io/aws-ebs:0xc431ee3eb0 kubernetes.io/git-repo:0xc431ee3ef0 kubernetes.io/host-path:0xc430e985f0 kubernetes.io/rbd:0xc42bfab840 kubernetes.io/quobyte:0xc431ee3f00 kubernetes.io/fc:0xc42bfab980 kubernetes.io/empty-dir:0xc431ee3ed0 kubernetes.io/nfs:0xc430e98640 kubernetes.io/iscsi:0xc42bfab720 kubernetes.io/glusterfs:0xc430faaba0 kubernetes.io/cinder:0xc42bfab8c0 kubernetes.io/gce-pd:0xc431ee3ee0 kubernetes.io/secret:0xc42bfab6a0 kubernetes.io/flocker:0xc431ee3f30 kubernetes.io/cephfs:0xc431ee3f10]} 0xc42698cf40}) %!s(*exec.executor=&{}) {%!s(int32=0) %!s(uint32=0)} []}, error: unexpected end of JSON input

After:
>E0605 16:59:45.520185   29041 plugins.go:359] Failed to load volume plugin k8s/nfs, error: unexpected end of JSON input

2) quote script output. In case the output was empty, messages look a bit better:

Before:
> E0605 16:44:59.330077   26786 driver-call.go:212] Failed to unmarshal output for command: init, **output: **, error: unexpected end of JSON input
> W0605 16:44:59.330170   26786 driver-call.go:140] FlexVolume: driver call failed: executable: /usr/libexec/kubernetes/kubelet-plugins/volume/exec/k8s\~nfs/nfs, args: [init], error: fork/exec /usr/libexec/kubernetes/kubelet-plugins/volume/exec/k8s\~nfs/nfs: permission denied, **output: **

After:
>E0605 16:59:45.519906   29041 driver-call.go:212] Failed to unmarshal output for command: init, **output: ""**, error: unexpected end of JSON input
>W0605 16:59:45.520109   29041 driver-call.go:140] FlexVolume: driver call failed: executable: /usr/libexec/kubernetes/kubelet-plugins/volume/exec/k8s\~nfs/nfs, args: [init], error: fork/exec /usr/libexec/kubernetes/kubelet-plugins/volume/exec/k8s\~nfs/nfs: permission denied, **output: ""**
2017-07-15 18:02:36 -07:00
Kubernetes Submit Queue a0519dfa08 Merge pull request #48030 from kargakis/revert-deployment-cleanup
Automatic merge from submit-queue (batch tested with PRs 44129, 48030, 48906)

controller: cleanup complete deployments only

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

@kubernetes/sig-apps-pr-reviews
2017-07-15 17:13:39 -07:00
Kubernetes Submit Queue c3e8bd04a9 Merge pull request #48949 from php-coder/minor_cleanup
Automatic merge from submit-queue

Fix comments and typo in the error message

**What this PR does / why we need it**:
This PR fixes outdated comments and typo in the error message.

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

CC @simo5
2017-07-15 16:04:21 -07:00
Jordan Liggitt e8f2879bfd
Allow setting service account with kubectl run 2017-07-15 12:37:10 -04:00
Kubernetes Submit Queue f736f3121f Merge pull request #48326 from karataliu/afd.dev
Automatic merge from submit-queue

Fix share name generation in azure file provisioner.

**What this PR does / why we need it**:
Azure file share name has a length limit of 63, but currently the code is using data volume's limit 75.

**Which issue this PR fixes**
With current implementation, when the cluster name is long, the resulting file share name could have a length of 75.

Also function `GenerateVolumeName` would produce double '-' when clusterName containing '-' is to be truncated.

In both cases, service would reject the creating file share request.

**Special notes for your reviewer**:
Please refer to:
https://docs.microsoft.com/en-us/rest/api/storageservices/naming-and-referencing-shares--directories--files--and-metadata#share-names

- Share names must be from 3 through 63 characters long.
- The name cannot contain two consecutive hyphens.

@rootfs @colemickens 

**Release note**:
2017-07-14 19:50:14 -07:00
Robert Rati 92f030ca24 Added logging to AWS api calls. #46969 2017-07-14 21:37:05 -04:00
Jeff Grafton 3962b5dccf Fix compilation failure in dockershim for windows 2017-07-14 18:15:26 -07:00
Jack Francis f76ef29512 backing off az.getIPForMachine in az.NodeAddresses
also rate limiting the call to az.getVirtualMachine inside az.getIPForMachine
2017-07-14 17:13:40 -07:00
Kubernetes Submit Queue 8c8f562204 Merge pull request #48872 from FengyunPan/fix-order
Automatic merge from submit-queue (batch tested with PRs 48890, 46893, 48872, 48896)

Fix the order of deletion

1. EnsureLoadBalancer can't delete pool without deleting members,
   just let EnsureLoadBalancerDeleted do it.
2. Add some friendly error message

**Release note**:
```release-note
NONE
```
2017-07-14 16:49:53 -07:00
Kubernetes Submit Queue 23e60ac9ad Merge pull request #48308 from yguo0905/docker-api
Automatic merge from submit-queue

Update Docker API in Kubelet

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

The Kubelet currently uses deprecated docker API (https://godoc.org/github.com/docker/engine-api). This PR changes it to use the new one (https://godoc.org/github.com/moby/moby/client).

This PR updated the docker package from 1.11 to 1.13.1-rc2.

**Release note**:
```
None
```

/assign @Random-Liu 
/cc @yujuhong
2017-07-14 15:30:59 -07:00
Jack Francis 2525ef9983 VirtualMachinesClient.Get backoff in lb pool logic
EnsureHostInPool() submits a GET to azure API for VM info. We’re seeing this on agent node kubelets and would like to enable configurable backoff engagement for 4xx responses to be able to slow down the rate of reconciliation, when appropriate.
2017-07-14 15:16:47 -07:00
John Millikin 4d84968413
Use $(location) to find generated output paths.
Along with the build-infra PR
https://github.com/kubernetes/repo-infra/pull/19, this allows Kubernetes
binaries (e.g. hyperkube) to be build as external dependencies in other
Bazel projects.
2017-07-14 14:36:23 -07:00
Kubernetes Submit Queue fdb3b2af70 Merge pull request #48578 from fabianofranz/run_output_message_on_container_error
Automatic merge from submit-queue (batch tested with PRs 48578, 48895, 48958)

run must output message on container error

**What this PR does / why we need it**: `kubectl run` must output a message (instead of just exiting with an error code) on container error.

**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/openshift/origin/issues/15031 found in OpenShift

**Release note**:

```release-note
NONE
```
2017-07-14 13:45:51 -07:00
Huamin Chen b887776880 add fc volume attacher
Signed-off-by: Huamin Chen <hchen@redhat.com>
2017-07-14 16:34:53 -04:00
Seth Jennings 4fed1971f6 no warning event on dns search deduplication 2017-07-14 15:27:11 -05:00
Harsh Desai 90919e3e4e Add more detailed comment for localOnly flag in getPortworxDriver function 2017-07-14 13:20:16 -07:00
Harsh Desai 7268e2e2e8 Fix logging levels in Portworx volume driver and add doc for getPortworxDriver function 2017-07-14 13:20:06 -07:00
Harsh Desai 8d0dec7078 Use local PX endpoint for mount, unmount, detach and attach calls 2017-07-14 13:20:06 -07:00
Kubernetes Submit Queue 2610b9cf52 Merge pull request #48894 from juanvallejo/jvallejo/remove-hardcoded-kubectl-in-apply-warn-msg
Automatic merge from submit-queue (batch tested with PRs 47066, 48892, 48933, 48854, 48894)

replace hardcoded use of "kubectl" in apply warning msg

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

Removes use of hardcoded "kubectl" in the `kubectl apply ...` warning message that is printed when the `last-applied-configuration` annotation is missing on a resource. This is useful for downstream wrappers around the `apply` command.

cc @stevekuznetsov @fabianofranz
2017-07-14 12:50:57 -07:00
Kubernetes Submit Queue df47592d5a Merge pull request #48854 from colemickens/msi
Automatic merge from submit-queue (batch tested with PRs 47066, 48892, 48933, 48854, 48894)

azure: msi: add managed identity field, logic

**What this PR does / why we need it**: Enables managed service identity support for the Azure cloudprovider. "Managed Service Identity" allows us to ask the Azure Compute infra to provision an identity for the VM. Users can then retrieve the identity and assign it RBAC permissions to talk to Azure ARM APIs for the purpose of the cloudprovider needs.

Per the commit text:
```
The azure cloudprovider will now use the Managed Service Identity
to retrieve access tokens for the Azure ARM APIs, rather than
requiring hard-coded, user-specified credentials.
```

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

**Special notes for your reviewer**: none

**Release note**:

```release-note
azure: support retrieving access tokens via managed identity extension
```

cc: @brendandburns @jdumars @anhowe
2017-07-14 12:50:55 -07:00
Kubernetes Submit Queue a933551aaa Merge pull request #48892 from ericchiang/client-go-canonical-import
Automatic merge from submit-queue (batch tested with PRs 47066, 48892, 48933, 48854, 48894)

client-go: add canonical import comment

Ensure users check out client-go to the correct location. The install error now reads:

```
can't load package: package github.com/kubernetes/client-go/kubernetes: code in directory /home/eric/src/github.com/kubernetes/client-go/kubernetes expects import "k8s.io/client-go/kubernetes"
```

ref https://github.com/kubernetes/client-go/issues/223

/cc @caesarxuchao @lavalamp 

```release-note
NONE
```
2017-07-14 12:50:49 -07:00
Kubernetes Submit Queue 8532cdfd69 Merge pull request #48886 from mikedanese/cleanup
Automatic merge from submit-queue

remove some people from OWNERS so they don't get reviews anymore

These are googlers who don't work on the project anymore but are still
getting reviews assigned to them:
- @bprashanth
- @rjnagal
- @vmarmol
2017-07-14 11:46:10 -07:00
Kubernetes Submit Queue 3bb2d12e80 Merge pull request #48931 from allencloud/remove-duplicated-word-file-in-error
Automatic merge from submit-queue (batch tested with PRs 48572, 48838, 48931, 48783, 47090)

remove duplicated word file in error

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



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

remove duplicated word file in error

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

**Special notes for your reviewer**:
NONE

**Release note**:

```release-note
NONE
```
2017-07-14 10:53:49 -07:00
Kubernetes Submit Queue fd619b04b2 Merge pull request #48572 from alexandercampbell/kubectl-follow-options-pattern-in-version
Automatic merge from submit-queue

cmd/version: refactor to use the -Options pattern

Refactor `kubectl version` to use the prescribed pattern in [kubectl-conventions.md](49d65710b3/contributors/devel/kubectl-conventions.md (command-implementation-conventions)).

```release-note
NONE
```

/assign @mengqiy
2017-07-14 10:49:11 -07:00
Slava Semushin ae147a737c Fix comments and typo in the error message. 2017-07-14 19:17:12 +02:00
Kubernetes Submit Queue 9e97b5249b Merge pull request #46360 from khenidak/azure-pd-final
Automatic merge from submit-queue

Azure PD (Managed/Blob)

This is exactly the same code as this [PR](https://github.com/kubernetes/kubernetes/pull/41950). It has a clean set of generated items. We created a separate PR to accelerate the accept/merge the PR

CC @colemickens 
CC @brendandburns 

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

1. Adds K8S support for Azure Managed Disks. 
2. Adds support for dedicated blob disks (1:1 to storage account) in addition to shared blob disks (n:1 to storage account). 
3. Automatically manages the underlying storage accounts. New storage accounts are created at 50% utilization. Max is 100 disks, 60 disks per storage account.    
2. Addresses the current issues with Blob Disks:
..* Significantly faster attach process. Disks are now usually available for pods on nodes under 30 sec if formatted, under a min if not formatted. 
..* Adds support to move disks between nodes.
..* Adds consistent attach/detach behavior, checks if the disk is leased/attached on a different node before attempting to attach to target nodes.
..* Fixes a random hang behavior on Azure VMs during mount/format (for both blob + managed disks).
..* Fixes a potential conflict by avoiding the use of disk names for mount paths. The new plugin uses hashed disk uri for mount path.  

The existing AzureDisk is used as is. Additional "kind" property was added  allowing the user to decide if the pd will be shared, dedicated or managed (Azure Managed Disks are used).

Due to the change in mounting paths, existing PDs need to be recreated as PV or PVCs on the new plugin.
2017-07-14 09:57:51 -07:00
Lee Verberne 786e993338 Fix typo in ExecCommandParam 2017-07-14 13:54:51 +00:00
allencloud 389cd57014 remove duplicated word file in error
Signed-off-by: allencloud <allen.sun@daocloud.io>
2017-07-14 18:01:51 +08:00
Kubernetes Submit Queue 751a0b6a4c Merge pull request #48669 from supereagle/revert-pr46246
Automatic merge from submit-queue

Revert workaround in PR 46246 as APIs have been consistent

**What this PR does / why we need it**:
No need to convert v1.ObjectReference as APIs have been consistent in `k8s.io/api/core/v1`.

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

**Special notes for your reviewer**:
/assign @derekwaynecarr @caesarxuchao

**Release note**:
```release-note
NONE
```
2017-07-14 00:32:09 -07:00
Khaled Henidak & Andy Zhang 677e593d86 Add Azure managed disk support 2017-07-14 14:09:44 +08:00
Kubernetes Submit Queue a014cea392 Merge pull request #48815 from dixudx/mountpath_should_be_absolute
Automatic merge from submit-queue (batch tested with PRs 48082, 48815, 48901, 48824)

mountpath should be absolute

**What this PR does / why we need it**:
Should validate the mountpath before mounting to container. Docker forbids mounting to a relative path inside the container. 

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

**Special notes for your reviewer**:

**Release note**:

```release-note
MountPath should be absolute
```
2017-07-13 22:43:56 -07:00
Kubernetes Submit Queue d58d29d99d Merge pull request #48082 from ravisantoshgudimetla/kubectl_drain_node_conversion
Automatic merge from submit-queue (batch tested with PRs 48082, 48815, 48901, 48824)

Changes for typecasting node in drain

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

**Special notes for your reviewer**:
Precursor to #44944

**Release note**:

```release-note
kubectl drain now uses PATCH instead of PUT to update the node. The node object is now of type v1 instead of using internal api.
```
2017-07-13 22:43:54 -07:00
Kubernetes Submit Queue 6d69f18f5b Merge pull request #46845 from zhangxiaoyu-zidif/change-fatalf
Automatic merge from submit-queue

Use t.Fatalf instead

**What this PR does / why we need it**:
we can use t.Fatalf to take place of t.Errorf + t.FailNow()


**Release note**:

```release-note
NONE
```
2017-07-13 21:26:07 -07:00
Kubernetes Submit Queue 7deb49ecd8 Merge pull request #48203 from cmluciano/cml/addgpuowners
Automatic merge from submit-queue

Add OWNERS file to kubelet gpu package

GPU support is ramping up and we do not have a lot of reviewers that
are familiar with the codebase. I added myself as a reviewer and
copied a few people from the kubelet OWNERS file as approvers.

Signed-off-by: Christopher M. Luciano <cmluciano@us.ibm.com>

**Release note**:
```
NONE
```
2017-07-13 18:51:04 -07:00
Kubernetes Submit Queue 87cc1ddba5 Merge pull request #48407 from k82cn/testapi_lint
Automatic merge from submit-queue

Updated comments of func in testapi.

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

**Special notes for your reviewer**:

**Release note**:

```release-note-none
```
2017-07-13 18:50:27 -07:00
Chao Xu 503852a1b5 add approvers to pkg/controller/garbagecollector 2017-07-13 15:16:17 -07:00
Cole Mickens 931002ec1f azure: acr docker cred provider reuses auth 2017-07-13 14:27:37 -07:00
Cole Mickens 8f55afd0cb azure: refactor azure.go to make auth reusable 2017-07-13 14:27:37 -07:00
Cole Mickens 4521c2312c azure: msi: add managed identity field, logic
The azure cloudprovider will now use the Managed Service Identity
to retrieve access tokens for the Azure ARM APIs, rather than
requiring hard-coded, user-specified credentials.
2017-07-13 14:27:37 -07:00
Minhan Xia a471140e13 fix gce cloud provider projects api 2017-07-13 14:00:02 -07:00
juanvallejo f28ffdb5e9
replace hardcoded use of "kubectl" in apply warning msg 2017-07-13 16:19:19 -04:00
Eric Chiang 90a555545e client-go: add canonical import comment 2017-07-13 13:03:12 -07:00
Yang Guo bf2ced837c Updates Docker Engine API 2017-07-13 12:55:07 -07:00
Jing Xu bb1920edcc Fix issues for local storage allocatable feature
This PR fixes the following issues:
1. Use ResourceStorageScratch instead of ResourceStorage API to represent
local storage capacity
2. In eviction manager, use container manager instead of node provider
(kubelet) to retrieve the node capacity and reserved resources. Node
provider (kubelet) has a feature gate so that storagescratch information
may not be exposed if feature gate is not set. On the other hand,
container manager has all the capacity and allocatable resource
information.
2017-07-13 12:06:19 -07:00
Mike Danese c201553f27 remove some people from OWNERS so they don't get reviews anymore
These are googlers who don't work on the project anymore but are still
getting reviews assigned to them:
- bprashanth
- rjnagal
- vmarmol
2017-07-13 10:02:21 -07:00
gmarek afe1a2c71b Revert "Merge pull request #48560 from nicksardo/gce-network-project"
This reverts commit d4881dd491, reversing
changes made to b5c4346130.
2017-07-13 18:34:24 +02:00
FengyunPan a1be23679c Fix the order of deletion
1. EnsureLoadBalancer can't delete pool without deleting members,
   just let EnsureLoadBalancerDeleted do it.
2. Add some friendly error message
2017-07-13 21:10:23 +08:00
FengyunPan dfc8b667a2 Fix parsing empty CIDR
Fix #48795
Checking ClusterCIDR and ServiceCIDR before parsing them.
2017-07-13 21:08:43 +08:00
Kubernetes Submit Queue 74f1943774 Merge pull request #48849 from nicksardo/gce-panic-fix
Automatic merge from submit-queue (batch tested with PRs 48555, 48849)

GCE: Fix panic when service loadbalancer has static IP address

Fixes #48848 

```release-note
Fix service controller crash loop when Service with GCP LoadBalancer uses static IP (#48848, @nicksardo)
```
2017-07-12 23:59:03 -07:00
Kubernetes Submit Queue 009858f18d Merge pull request #48555 from redbaron/hostPath-and-subPath-symlink
Automatic merge from submit-queue

Fix subPath existence check to not follow symlink

**What this PR does / why we need it**:
Volume mounting logic introduced in #43775 and #45623 checks
for subPath existence before attempting to create a directory,
should subPath not be present.

This breaks if subPath is a dangling symlink, os.Stat returns
"do not exist" status, yet `os.MkdirAll` can't create directory
as symlink is present at the given path.

This patch makes existence check to use os.Lstat which works for
normal files/directories as well as doesn't not attempt to follow
symlink, therefore it's "do not exist" status is more reliable when
making a decision whether to create directory or not.

subPath symlinks can be dangling in situations where kubelet is
running in a container itself with access to docker socket, such
as CoreOS's kubelet-wrapper script

**Release note**:
```release-note
Fix pods failing to start when subPath is a dangling symlink from kubelet point of view, which can happen if it is running inside a container
```
2017-07-12 23:43:12 -07:00
Nick Sardo 98368d974e Remove address getter from CreateAddress(Region and Global) 2017-07-12 20:06:18 -07:00
ravisantoshgudimetla db120eb8ca Changes for converting node to v1 in drain 2017-07-12 21:36:29 -04:00
Kubernetes Submit Queue 3c080e83c7 Merge pull request #48642 from freehan/gce-api-endpint
Automatic merge from submit-queue

Support GCE alpha/beta api endpoint override

fixes: https://github.com/kubernetes/kubernetes/issues/48568
2017-07-12 18:23:37 -07:00
Kubernetes Submit Queue b31d1db4f4 Merge pull request #48831 from enisoc/resource-filter-test
Automatic merge from submit-queue (batch tested with PRs 46738, 48827, 48831)

Add test for kubectl resource filter.

This should prevent regression of the bug fixed in #48786.
2017-07-12 16:00:12 -07:00
Kubernetes Submit Queue 30e865e456 Merge pull request #48829 from vmware/vsphere-ByProviderID
Automatic merge from submit-queue (batch tested with PRs 48781, 48817, 48830, 48829, 48053)

vSphere for cloud-controller-manager

**What this PR does / why we need it**:
This is to implement the `NodeAddressesByProviderID` and `InstanceTypeByProviderID` methods for cloud-controller-manager for vSphere cloud provider.

Currently vSphere cloud provider only supports VMs in the same folder.
Thus `NodeAddressesByProviderID` is similar to `NodeAddresses` with a simple ProviderID to NodeName translation.

`InstanceTypeByProviderID`  returns nil as same as `InstanceType`.

**Which issue this PR fixes**
Part of Issue https://github.com/kubernetes/kubernetes/issues/47257

**Release note**:
```NONE
```
2017-07-12 15:11:14 -07:00
Minhan Xia 3e8b4a27c4 use overrided api endpoint in gce cloud provider 2017-07-12 15:10:13 -07:00
Kubernetes Submit Queue d230956280 Merge pull request #48243 from brendandburns/imds
Automatic merge from submit-queue (batch tested with PRs 48594, 47042, 48801, 48641, 48243)

Add initial support for the Azure instance metadata service.

Part of fixing #46632

@colemickens @rootfs @jdumars @kris-nova
2017-07-12 14:08:13 -07:00
Kubernetes Submit Queue 77b6b126cb Merge pull request #48641 from smarterclayton/refactor_exec
Automatic merge from submit-queue (batch tested with PRs 48594, 47042, 48801, 48641, 48243)

Prepare to introduce websockets for exec and portforward

Refactor the code in remotecommand to better represent the structure of
what is common between portforward and exec.

Ref #48633
2017-07-12 14:08:10 -07:00
Kubernetes Submit Queue 5ed8734649 Merge pull request #48801 from FengyunPan/fix-panic
Automatic merge from submit-queue (batch tested with PRs 48594, 47042, 48801, 48641, 48243)

Fix panic of DeleteRoute()

Fix #48800
It should be 'addr_pairs', not 'routes'.

**Release note**:
```release-note
NONE
```
2017-07-12 14:08:07 -07:00
Kubernetes Submit Queue 0a44e5b5c7 Merge pull request #47042 from gyliu513/event-count
Automatic merge from submit-queue (batch tested with PRs 48594, 47042, 48801, 48641, 48243)

Validated expected event numbers for damoncontroller test.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
none
```
2017-07-12 14:08:04 -07:00
Minhan Xia 811597926a support GCE alpha beta API override 2017-07-12 13:46:52 -07:00
Kubernetes Submit Queue aeb326e9bc Merge pull request #48704 from FengyunPan/remove-dead-code
Automatic merge from submit-queue

Remove dead code for OpenStack provider

**Release note**:
```release-note
NONE
```
2017-07-12 13:06:04 -07:00
Kubernetes Submit Queue 6d6b93986c Merge pull request #47952 from k82cn/k8s_47791
Automatic merge from submit-queue (batch tested with PRs 48279, 48566, 48319, 48794, 47952)

Added pod evictors for new zone.

**What this PR does / why we need it**:
Added pod evictors for new zone which was added manually.

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

**Release note**:
```release-note-none
```
2017-07-12 11:52:23 -07:00
Anthony Yeh bbe3ac9f95
Add test for kubectl resource filter. 2017-07-12 11:44:28 -07:00
Miao Luo d327ac6c76 vSphere for cloud-controller-manager
Implement NodeAddressesByProviderID and InstanceTypeByProviderID for vsphere cloud provider.
2017-07-12 11:35:16 -07:00
Kubernetes Submit Queue 8c52c8f15c Merge pull request #48635 from dcbw/userspace-proxy-silence-loadbalancerrr-message
Automatic merge from submit-queue (batch tested with PRs 48425, 41680, 48457, 48619, 48635)

proxy/userspace: suppress "LoadBalancerRR: Removing endpoints" message

Don't print it when there aren't any endpoints getting removed.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1468420
Fixes: https://github.com/kubernetes/kubernetes/issues/48816

```release-note
NONE
```

@eparis @thockin @kubernetes/rh-networking
2017-07-12 10:57:21 -07:00
Kubernetes Submit Queue 494ffa4650 Merge pull request #48457 from cofyc/rbd_error
Automatic merge from submit-queue (batch tested with PRs 48425, 41680, 48457, 48619, 48635)

"rbd: image xxx is locked by other nodes" is misleading

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

For RWO PV, RBD plugin tries to fence it first, but there are many situations which may cause lock to fail, e.g.

- userSecret is incorrect
- monitor addresses are incorrect or node cannot access ceph cluster temporarily
- image is locked by other nodes
- maybe more...

So, original "image xxx is locked by other nodes" is incorrect in some cases and misleading in diagnosis.

This PR change the error to be correct and not misleading first. We may add detail error descriptions later.

**Special notes for your reviewer**:

New FailedMount event example if RBD plugin cannot lock image:

```
...		FailedMount		MountVolume.SetUp failed for volume "pvc-ee37a9c8-608e-11e7-b3a7-000c291fbe71" : rbd: failed to lock image kubernetes-dynamic-pvc-ee3b9911-608e-11e7-97b6-000c291fbe71 (maybe locked by other nodes), error exit status 22
```

**Release note**:

```release-note
NONE
```
2017-07-12 10:57:17 -07:00
Kubernetes Submit Queue 2a23d8bb43 Merge pull request #41680 from gyliu513/pod-update
Automatic merge from submit-queue (batch tested with PRs 48425, 41680, 48457, 48619, 48635)

Improved code coverage for pkg/kubelet/types/pod_update

The test coverage for pod_update.go was imprved from 36% to 100%.



**What this PR does / why we need it**:
This fixed part of #40780
**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-07-12 10:57:15 -07:00
Kubernetes Submit Queue 9e22353929 Merge pull request #48757 from codablock/fix_flake_46244
Automatic merge from submit-queue (batch tested with PRs 48672, 47140, 48709, 48786, 48757)

Fix flaky test Test_Run_OneVolumeAttachAndDetachMultipleNodesWithReadWriteMany

Only relying on the NewAttacher/Detacher call counts is not enough as they
happen in parallel to the testing/verification code and thus the actual
attaching/detaching may not be done yet, resulting in flaky test results.

Fixes #46244
2017-07-12 09:03:00 -07:00
Kubernetes Submit Queue b996d8abce Merge pull request #48786 from janetkuo/show-all-fix
Automatic merge from submit-queue (batch tested with PRs 48672, 47140, 48709, 48786, 48757)

Correctly filter terminated pods in kubectl

We shouldn't use `Status.Reason` to determine whether the pod has terminated or not.
2017-07-12 09:02:57 -07:00
Kubernetes Submit Queue f5f9894efc Merge pull request #48709 from jsafrane/gluster-autumount
Automatic merge from submit-queue (batch tested with PRs 48672, 47140, 48709, 48786, 48757)

glusterfs: retry without auto_unmount only when it's not supported

GlusterFS volume plugin should not blindly retry all failed mounts without
auto_unmount, it should retry them only when we are sure that auto_unmount
was the reason the first attempt failed.

@kubernetes/sig-storage-pr-reviews 
/assign @humblec 

```release-note
NONE
```
2017-07-12 09:02:55 -07:00
Kubernetes Submit Queue 345d71977e Merge pull request #47140 from brendandburns/godep
Automatic merge from submit-queue (batch tested with PRs 48672, 47140, 48709, 48786, 48757)

Update Azure SDK.

Updates to the Azure SDK to pick up new APIs.
2017-07-12 09:02:53 -07:00
Kubernetes Submit Queue 65b48aaec1 Merge pull request #48672 from dixudx/resolve_hard_coded_path_sep_atomic
Automatic merge from submit-queue (batch tested with PRs 48672, 47140, 48709, 48786, 48757)

use built-in path separator instead of hard coded

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

We should use built-in path separator to avoid hard coded strings.

**Which issue this PR fixes** :

**Special notes for your reviewer**:

**Release note**:

```release-note
None
```
2017-07-12 09:02:51 -07:00
Di Xu 8d86bd1c64 mountpath should be absolute 2017-07-12 23:37:51 +08:00
Alexander Campbell 43c83d47d8 cmd/version: refactor to use the -Options pattern
This pattern is described in
49d65710b3/contributors/devel/kubectl-conventions.md (command-implementation-conventions)
2017-07-12 08:37:01 -07:00
Kubernetes Submit Queue fa72912897 Merge pull request #48742 from yujuhong/rm-unused
Automatic merge from submit-queue (batch tested with PRs 48405, 48742, 48748, 48571, 48482)

dockershim: clean up unused security context code

Most of the code in the `dockershim/securitycontext` package are
unused and can be removed. This PR migrates the rest of the code,
cleans it up (e.g., remove references to kubernetes API objects),
and removes the package entirely.
2017-07-12 08:05:15 -07:00
Brendan Burns 29a0c6f56a Code updates for new SDK. 2017-07-12 06:09:31 -07:00
Kubernetes Submit Queue 0e461035cb Merge pull request #48734 from tallclair/namechange
Automatic merge from submit-queue (batch tested with PRs 48698, 48712, 48516, 48734, 48735)

Name change: s/timstclair/tallclair/

I changed my name, and I'm migrating my user name to be consistent.
2017-07-12 04:56:32 -07:00
Kubernetes Submit Queue 215e8fab58 Merge pull request #48516 from freehan/shared-iptables
Automatic merge from submit-queue (batch tested with PRs 48698, 48712, 48516, 48734, 48735)

share iptables util client within kubenet

reduce the number of goroutine waiting for dbus.
2017-07-12 04:56:30 -07:00
Kubernetes Submit Queue 3ade1a155d Merge pull request #47593 from fgimenez/cloudprovider-openstack-byid
Automatic merge from submit-queue (batch tested with PRs 47948, 48631, 48693, 48549, 47593)

OpenStack for cloud-controller-manager

**What this PR does / why we need it**:
This implements the `NodeAddressesByProviderID` and `InstanceTypeByProviderID` methods used by the cloud-controller-manager to the OpenStack provider. The instance type returned is the flavor name, for consistency `InstanceType` has been implemented too returning the same value.

```release-note
NONE
```

This is part of #47257 cc @wlan0
2017-07-12 04:04:00 -07:00
Kubernetes Submit Queue e152e67092 Merge pull request #48631 from smarterclayton/unify_proxy
Automatic merge from submit-queue (batch tested with PRs 47948, 48631, 48693, 48549, 47593)

Unify generic proxy code in apimachinery
2017-07-12 04:03:55 -07:00
Kubernetes Submit Queue 2b03c2e6df Merge pull request #47948 from allencloud/remove-unused-code-in-loadSystemLanguage
Automatic merge from submit-queue

fix system language judging bug in loadSystemLanguage

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



**What this PR does / why we need it**:
This PR removes some unused code in loadSystemLanguage. Since in code `pieces := strings.Split(langStr, ".")`, even `langStr` is an empty string, `piece` is a slice with one element of empty string, so there is no chance that len(pieces) == 0.

According to these, I think it is OK to remove the unused code in loadSystemLanguage.

According to the discuss we had, finally we decided to use a more accurate way to change the code, using `if len(pieces) != 1` to make the decision. 

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

**Special notes for your reviewer**:
NONE

**Release note**:

```release-note
NONE
```
2017-07-12 03:42:10 -07:00
Jan Safranek 09e241294f Implement kubectl describe <fibre-channel PV> 2017-07-12 12:34:43 +02:00
Kubernetes Submit Queue de30789bf5 Merge pull request #48598 from gmarek/metrics
Automatic merge from submit-queue (batch tested with PRs 46865, 48661, 48598, 48658, 48614)

Move metrics_grabbert to test/e2e

cc @aleksandra-malinowska
2017-07-12 03:02:19 -07:00
FengyunPan cd29146317 Fix panic of DeleteRoute()
Fix #48800
It should be 'addr_pairs', not 'routes'.
2017-07-12 17:28:58 +08:00
Di Xu edeea36a43 fix pdb validation bug on spec 2017-07-12 16:44:28 +08:00
Guangya Liu 9ca1351edf Improved code coverage for pkg/kubelet/types/pod_update
The test coverage for pod_update.go was imprved from 36% to 100%.
2017-07-12 16:21:42 +08:00
Kubernetes Submit Queue b66be98174 Merge pull request #39173 from caesarxuchao/include-leaderelection
Automatic merge from submit-queue (batch tested with PRs 47232, 48625, 48613, 48567, 39173)

Include leaderelection in client-go; 

Fix #39117
Fix https://github.com/kubernetes/client-go/issues/28

This PR:
* includes the leaderelection to the staging client-go
* to avoid conflict with golang's testing package, renames package /testing to /testutil, and renames cache/testing to cache/testframework

```release-note
client-go now includes the leaderelection package
```
2017-07-12 00:10:20 -07:00
Kubernetes Submit Queue dbb42838db Merge pull request #48567 from jingxu97/July/getcapacity
Automatic merge from submit-queue (batch tested with PRs 47232, 48625, 48613, 48567, 39173)

Fix issue when setting fileysystem capacity in container manager

In Container manager, we set up the capacity by retrieving information
from cadvisor. However unlike machineinfo, filesystem information is
available at a later unknown time. This PR uses a go routine to keep
retriving the information until it is avaialble or timeout.
This PR fixes issue #48452
2017-07-12 00:10:18 -07:00
Kubernetes Submit Queue 923ef03d05 Merge pull request #48613 from dcbw/userspace-proxy-host-ip
Automatic merge from submit-queue (batch tested with PRs 47232, 48625, 48613, 48567, 39173)

proxy/userspace: honor listen IP address as host IP if given

Allows the proxier to be used on an interface that's not the default route,
otherwise hostIP gets set to the default route interface even if that's
not what the user intended.

If listen IP isn't given, falls back to previous behavior.

```release-note
To allow the userspace proxy to work correctly on multi-interface hosts when using the non-default-route interface, you may now set the `bindAddress` configuration option to an IP address assigned to a network interface.  The proxy will use that IP address for any required NAT operations instead of the IP address of the interface which has the default route.
```

@kubernetes/sig-network-misc @thockin @wojtek-t
2017-07-12 00:10:16 -07:00
Kubernetes Submit Queue a3430ad0c3 Merge pull request #47232 from gyliu513/remove-mesos-cp
Automatic merge from submit-queue

Removed mesos as cloud provider from Kubernetes.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
Move Mesos Cloud Provider out of Kubernetes Repo
```
2017-07-12 00:08:20 -07:00
Kubernetes Submit Queue b07581e60f Merge pull request #47719 from xilabao/fix-set-selector-1
Automatic merge from submit-queue (batch tested with PRs 48196, 42783, 48507, 47719, 46138)

fix parse resource in setting selector

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

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-07-11 23:09:13 -07:00
Kubernetes Submit Queue d68e7378f4 Merge pull request #48322 from k82cn/k8s_47867
Automatic merge from submit-queue (batch tested with PRs 48402, 47203, 47460, 48335, 48322)

Added case on 'terminated-but-not-yet-deleted' for Admit.

**What this PR does / why we need it**:
Added case on 'terminated-but-not-yet-deleted' for Admit.

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

**Release note**:

```release-note-none
```
2017-07-11 21:01:39 -07:00
Kubernetes Submit Queue cd3f8c3963 Merge pull request #47460 from mengqiy/fix_env
Automatic merge from submit-queue (batch tested with PRs 48402, 47203, 47460, 48335, 48322)

fix kubectl run --env flag

fixes: kubernetes/kubectl#19

cc: @ddcprg

```release-note
`kubectl run --env` no longer supports CSV parsing. To provide multiple env vars, use the `--env` flag multiple times instead of having env vars separated by commas. E.g. `--env ONE=1 --env TWO=2` instead of `--env ONE=1,TWO=2`.
```
2017-07-11 21:01:35 -07:00
Kubernetes Submit Queue 03360d7b65 Merge pull request #48402 from ianchakeres/local-storage-teardown-fix
Automatic merge from submit-queue

Local storage teardown fix

**What this PR does / why we need it**: Local storage uses bindmounts and the method IsLikelyNotMountPoint does not detect these as mountpoints. Therefore, local PVs are not properly unmounted when they are deleted.

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

**Special notes for your reviewer**:

You can use these e2e tests to reproduce the issue and validate the fix works appropriately https://github.com/kubernetes/kubernetes/pull/47999

The existing method IsLikelyNotMountPoint purposely does not check mountpoints reliability (4c5b22d4c6/pkg/util/mount/mount_linux.go (L161)), since the number of mountpoints can be large. 4c5b22d4c6/pkg/util/mount/mount.go (L46)

This implementation changes the behavior for local storage to detect mountpoints reliably, and avoids changing the behavior for any other callers to a UnmountPath.

**Release note**:

```
Fixes bind-mount teardown failure with non-mount point Local volumes (issue https://github.com/kubernetes/kubernetes/issues/48331).
```
2017-07-11 20:35:29 -07:00
Kubernetes Submit Queue 3e89fe241d Merge pull request #47829 from CaoShuFeng/Warning-Warningf
Automatic merge from submit-queue (batch tested with PRs 44412, 44810, 47130, 46017, 47829)

Use glog.*f when a format string is passed

ref:
https://godoc.org/github.com/golang/glog

I use the following commands to search all the invalid usage:
$ grep "glog.Warning(" * -r | grep %
$ grep "glog.Info(" * -r | grep %
$ grep "glog.Error(" * -r | grep %
$ grep ").Info(" * -r | grep % | grep glog.V(

**Release note**:

```
NONE
```
2017-07-11 20:00:26 -07:00
Kubernetes Submit Queue a9aabd76e7 Merge pull request #46017 from xilabao/fix-print-of-generic-resources
Automatic merge from submit-queue (batch tested with PRs 44412, 44810, 47130, 46017, 47829)

fix self link error of generic resources in describe command

**What this PR does / why we need it**:
fix Self Link error
```
./cluster/kubectl.sh describe clusterrole system:controller:ttl-controller
Name:		system:controller:ttl-controller
Namespace:	
Labels:		kubernetes.io/bootstrapping=rbac-defaults
Annotations:	rbac.authorization.kubernetes.io/autoupdate=true
API Version:	rbac.authorization.k8s.io/v1alpha1
Kind:		ClusterRole
Metadata:
  Creation Timestamp:	2017-05-18T06:42:02Z
  Resource Version:	80
  Self Link:		/apis/rbac.authorization.k8s.io/v1alpha1/clusterroles/system%!A(MISSING)controller%!A(MISSING)ttl-controller
  UID:			19a705a4-3b95-11e7-9d55-7427ea6f0fe3
Rules:
  API Groups:
    
  Resources:
    nodes
  Verbs:
    list
    patch
    update
    watch
  API Groups:
    
  Resources:
    events
  Verbs:
    create
    patch
    update
Events:	<none>
```

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-07-11 20:00:23 -07:00
Kubernetes Submit Queue 3f1776e07d Merge pull request #44412 from StackPointCloud/recheck-pvc-phase
Automatic merge from submit-queue (batch tested with PRs 44412, 44810, 47130, 46017, 47829)

recheck pod volumes before marking pod as processed

This PR allows a pod's volumes to be re-checked until all are added correctly.  There's a limited amount of time when a persistent volume claim is still in the Pending phase, and if a pod is created in that time, the volume will not be added.  The issue is not uncommon with helm charts that create all objects in close succession, particularly when using aws-ebs volumes.

fixes #28962
2017-07-11 20:00:14 -07:00
Janet Kuo 5a94b45d8b Correctly filter terminated pods in kubectl 2017-07-11 17:32:56 -07:00