Commit Graph

22169 Commits (f32b390cf08a9afd9f9899e0d97a90eb162b32a8)

Author SHA1 Message Date
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
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
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
Ian Chakeres 2b18d3b6f7 Fixes bind-mount teardown failure with non-mount point Local volumes
Added IsNotMountPoint method to mount utils (pkg/util/mount/mount.go)
Added UnmountMountPoint method to volume utils (pkg/volume/util/util.go)
Call UnmountMountPoint method from local storage (pkg/volume/local/local.go)
IsLikelyNotMountPoint behavior was not modified, so the logic/behavior for UnmountPath is not modified
2017-07-11 17:19:58 -04:00
Jing Xu 9606a54049 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.
2017-07-10 16:43:18 -07:00
Tim Allclair a2f2e1d491 Name change: s/timstclair/tallclair/ 2017-07-10 14:05:46 -07:00
Cao Shufeng 0c577c47d5 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("
2017-07-10 19:04:03 +08:00
Guangya Liu 498b034492 Removed mesos as cloud provider from Kubernetes. 2017-07-09 21:54:57 -04:00
Clayton Coleman c73622108c
generated: bazel / godeps 2017-07-09 15:23:34 -04:00
Dr. Stefan Schimanski da3322c2d9 apimachinery: remove unneeded GetObjectKind() impls 2017-07-08 18:37:37 +02:00
Kubernetes Submit Queue a2e463f6d0 Merge pull request #48546 from deads2k/tpr-19-ripples
Automatic merge from submit-queue (batch tested with PRs 48497, 48604, 48599, 48560, 48546)

remove dead code

This removes the dead code cruft since we stopped serving TPRs.

ref #48152
2017-07-08 07:09:38 -07:00
Kubernetes Submit Queue d4881dd491 Merge pull request #48560 from nicksardo/gce-network-project
Automatic merge from submit-queue (batch tested with PRs 48497, 48604, 48599, 48560, 48546)

GCE: Use network project id for firewall/route mgmt and zone listing

- Introduces a new environment variable for plumbing the network project id which will be used for firewall and route management. fixes #48515
- onXPN is determined by metadata if config is not specified
- Split `if` conditions: fixes #48521
- Remove `getNetworkNameViaAPICall` which was used as a last resort for the `networkURL` (if empty) which was previously filled with the metadata network project & name.

**Release note**:
```release-note
NONE
```
2017-07-08 07:09:36 -07:00
Kubernetes Submit Queue af3dde34a6 Merge pull request #48497 from shiywang/move
Automatic merge from submit-queue (batch tested with PRs 48497, 48604, 48599, 48560, 48546)

Move pkg/apimachinery/test to apimachinery

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

for circular dependency reason, all the test file contain both `"k8s.io/apimachinery/pkg/apis/meta/v1"` and `"k8s.io/apimachinery/pkg/runtime"` is hard to move to a ideal location, so I create a separated test package for those files

I also bump the example package :https://github.com/kubernetes/kubernetes/tree/master/staging/src/k8s.io/apiserver/pkg/apis/example here for apimachinery, @sttts told me it's ok if to bump file if only for test   EDIT: seems it's no need to bump, will update soon
```
NONE
```
2017-07-08 07:09:31 -07:00
Kubernetes Submit Queue 9fcb8b847e Merge pull request #48336 from FengyunPan/fix-delete-empty-monitors
Automatic merge from submit-queue

Fix deleting empty monitors

Fix #48094
When create-monitor of cloud-config is false, pool has not monitor
and can not delete empty monitor.

**Release note**:
```release-note
NONE
```
2017-07-08 06:02:45 -07:00
Kubernetes Submit Queue 4361b4d9be Merge pull request #46798 from nikhiljindal/servicesReaper
Automatic merge from submit-queue

Deleting kubectl.ServiceReaper since there is no special service deletion logic

Ref https://github.com/kubernetes/kubernetes/pull/46471 #42594

ServiceReaper does not have any special deletion logic so we dont need it. The generic deletion logic should be enough.
By removing this reaper, service deletion also gets the new wait logic from https://github.com/kubernetes/kubernetes/pull/46471

cc @kubernetes/sig-cli-misc
2017-07-08 05:16:33 -07:00
Kubernetes Submit Queue 954c356dc5 Merge pull request #48348 from FengyunPan/check-openstack-Opts
Automatic merge from submit-queue (batch tested with PRs 47234, 48410, 48514, 48529, 48348)

Check opts of cloud config file

Fix #48347
Check opts when register OpenStack CloudProvider rather than
returning error when use opts to create/use cloud resource.

**Release note**:
```release-note
NONE
```
2017-07-07 23:53:40 -07:00
Kubernetes Submit Queue 1edd4462e3 Merge pull request #48529 from mengqiy/kubectl_kubelet
Automatic merge from submit-queue (batch tested with PRs 47234, 48410, 48514, 48529, 48348)

eliminate kubectl dependency on kubelet

```
ConfigMirrorAnnotationKey    = v1.MirrorPodAnnotationKey
```
`k8s.io/kubernetes/pkg/kubelet/types.ConfigMirrorAnnotationKey` is defined as `k8s.io/api/core/v1.MirrorPodAnnotationKey`

partially addresses: kubernetes/community#598

```release-note
NONE
```

/assign @monopole @apelisse
2017-07-07 23:53:38 -07:00
Kubernetes Submit Queue 22550b62a6 Merge pull request #48514 from freehan/iptables-lock
Automatic merge from submit-queue (batch tested with PRs 47234, 48410, 48514, 48529, 48348)

expose error lock release failure from iptables util

ref: https://github.com/kubernetes/kubernetes/issues/48107
2017-07-07 23:53:36 -07:00
Kubernetes Submit Queue 6cd6d89d40 Merge pull request #48410 from xiangpengzhao/remove-empty-util-dir
Automatic merge from submit-queue (batch tested with PRs 47234, 48410, 48514, 48529, 48348)

Remove unused sub-pkgs in pkg/util

**What this PR does / why we need it**:
Remove no longer used sug-pkgs in pkg/util

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

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

**Release note**:

```release-note
NONE
```
2017-07-07 23:53:34 -07:00
Chao Xu 65cedeeb43 update bazel 2017-07-07 19:04:26 -07:00
Shiyang Wang da4a875ef8 Move pkg/apimachinery/test to apimachinery 2017-07-08 08:48:38 +08:00
Kubernetes Submit Queue 62ba00e4e7 Merge pull request #47123 from danwinship/networkpolicy-update
Automatic merge from submit-queue

Allow NetworkPolicy.spec updates

ValidateNetworkPolicyUpdate currently prohibits changes to `spec` in an existing NetworkPolicy. We were going to fix this for 1.7 but I forgot to submit this PR after the main PR merged. Too late for 1.7? @thockin @caseydavenport @cmluciano 

This only changes networking.NetworkPolicy validation at the moment... Should I change extensions.NetworkPolicy validation too?

Fixes #35911

We should add a test to the e2e NetworkPolicy test for this too if this is going to merge.

**Release note**:
```release-note
As part of the NetworkPolicy "v1" changes, it is also now
possible to update the spec field of an existing
NetworkPolicy. (Previously you had to delete and recreate a
NetworkPolicy if you wanted to change it.)
```
2017-07-07 17:45:41 -07:00
Chao Xu 24d5279c59 move leaderelection package to client-go 2017-07-07 17:01:04 -07:00
Kubernetes Submit Queue f0964b2063 Merge pull request #48524 from freehan/udp-service-flush
Automatic merge from submit-queue (batch tested with PRs 48374, 48524, 48519, 42548, 48615)

flush conntrack for udp service when # of backend changes from 0

fixes: #48370
2017-07-07 14:48:29 -07:00
Clayton Coleman edc12aafe2
Unify generic proxy code in apimachinery
Make the utility package truly generic, consolidate all generic proxy in
apimachinery.
2017-07-07 16:26:29 -04:00
Dan Williams 8a58f62fe0 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.
2017-07-07 11:17:17 -05:00
deads2k 0801ded425 remove dead code 2017-07-07 09:12:29 -04:00
gmarek 55880e6b4b Move metrics_grabbert to test/e2e 2017-07-07 13:13:44 +02:00
FengyunPan d2ebb60438 Check opts of cloud config file
Fix #48347
Check opts when register OpenStack CloudProvider rather than
returning error when use opts to create/use cloud resource.
2017-07-07 17:05:21 +08:00
xilabao 0ba41e7285 fix parse resource in setting selector 2017-07-07 10:36:29 +08:00
Nick Sardo 62d13f1379 Use API that utilizes networkProjectId 2017-07-06 18:13:02 -07:00
Kubernetes Submit Queue a9bf44101b Merge pull request #48539 from dims/volunteer-openstack-provider
Automatic merge from submit-queue

Volunteer to help with OpenStack provider reviews

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

I'd like to help with keeping the OpenStack cloud provider up-to-date

**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-06 17:41:34 -07:00
Nick Sardo 06e328627c Use network project id for firewall/route mgmt and zone listing 2017-07-06 16:58:27 -07:00
Minhan Xia 68a2749b28 fix unit tests 2017-07-06 16:01:03 -07:00
Minhan Xia 46d3e83caf refactor updateEndpointMap and updateServiceMap results 2017-07-06 16:00:57 -07:00