Commit Graph

24640 Commits (cd25bbee468fe00c2bc6ea7eefc7de7e6846e526)

Author SHA1 Message Date
Kubernetes Submit Queue e51e714ae3 Merge pull request #47621 from danehans/ipallocator
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Updates RangeSize error message and tests for IPv6.

**What this PR does / why we need it**:
Updates the RangeSize function's error message and tests for IPv6. Converts RangeSize unit test to a table test and tests for success and failure cases. This is needed to support IPv6. Previously, it was unclear whether RangeSize supported IPv6 CIDRs. These updates make IPv6 support explicit.

**Which issue this PR fixes**
Partially fixes Issue #1443

**Special notes for your reviewer**:
/area ipv6

**Release note**:
```NONE
```
2017-10-13 01:19:26 -07:00
WanLinghao b1f85e2dfe This patch improve kubectl cp command from two aspects
A.support soft link better
before this patch
  "kubectl cp" command will copy the soft link to destination as an empty regular file
after this patch
  "kubectl cp" command will behave the same as tar command
  this patch improves it on both from container and to container

B.fix some bugs
1.from container to host
  a.when copy a file ends with '/', it will cause a panic.
    for example, container gakki has a regular file /tmp/test, then run command
    kubectl cp gakki:/tmp/test/ /tmp
    panic happens
  b.when copy a file which does not exist in container, the command ends up without
    any error information

2.from host to container
  a.when run command like
    kubectl cp "" gakki:/tmp
    it will try cp current directory to container, in other words, this command works
    the same as kubectl cp . gakki:/tmp
  b.current cp command will omit an empty directory

modified:   pkg/kubectl/cmd/cp.go
modified:   pkg/kubectl/cmd/cp_test.go
2017-10-13 13:51:53 +08:00
Kubernetes Submit Queue 7c75723867 Merge pull request #52383 from dixudx/quote_field_valid_string
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

quote valid strings for field validation

**What this PR does / why we need it**:
Some of the declared const vars are empty string `""`, such as

* [`NamespaceAll`, `NamespaceNone`](https://github.com/kubernetes/kubernetes/blob/master/pkg/api/types.go#L197-L200)
* [`HostPathUnset`](https://github.com/kubernetes/kubernetes/blob/master/pkg/api/types.go#L631)

When validating such supported fields, empty string will be printed without quotes, which is kind of ugly.

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

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

**Release note**:

```release-note
None
```
2017-10-12 20:25:10 -07:00
Kubernetes Submit Queue 2743d0ba22 Merge pull request #53776 from houjun41544/20171012
Automatic merge from submit-queue (batch tested with PRs 53776, 53786, 53352, 51567). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Delete redundant defination

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

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

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-10-12 19:27:31 -07:00
Kubernetes Submit Queue 53241b931c Merge pull request #53771 from dixudx/update_cluster_printer
Automatic merge from submit-queue (batch tested with PRs 53749, 53642, 53813, 53771, 53762). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

update cluster printer to enable --show-labels

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

**Special notes for your reviewer**:

**Release note**:

```release-note
update cluster printer to enable --show-labels
```
2017-10-12 18:22:40 -07:00
jianglingxia 573a89eeb0 defer func of kubelet volume testing 2017-10-13 09:21:54 +08:00
Di Xu 7508afedd3 quote valid strings for field validation 2017-10-13 07:52:16 +08:00
Kubernetes Submit Queue 4548a07c0e Merge pull request #53781 from sttts/sttts-kill-pkg-api-util
Automatic merge from submit-queue (batch tested with PRs 47039, 53681, 53303, 53181, 53781). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Get rid of pkg/api/util

Old helpers we can replace with apimachinery tools.
2017-10-12 15:45:31 -07:00
Kubernetes Submit Queue dc404d49d4 Merge pull request #53303 from liggitt/discovery-logging
Automatic merge from submit-queue (batch tested with PRs 47039, 53681, 53303, 53181, 53781). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Avoid fetching entire discovery tree when possible

For specific commands, we use discovery to determine whether a particular resource is available.

We should avoid fetching the entire discovery tree to check a single resource group version. As the number of groups grows, the performance hit and potential to encounter an error also grows.

```release-note
NONE
```
2017-10-12 15:45:26 -07:00
Kubernetes Submit Queue ab56f37100 Merge pull request #47039 from zjj2wry/crb_test
Automatic merge from submit-queue (batch tested with PRs 47039, 53681, 53303, 53181, 53781). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

RBAC: Add test for create clusterrolebindding

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

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-10-12 15:45:22 -07:00
Hemant Kumar 68d417d7d8 Fix possibly flake in multiattach unit test
It is possible that by the time we check for multiattach
error on node, the reconciler loop may not have processed second
volume and hence we are going to retry for multiattach error
on node before giving up and marking the test as failed.
2017-10-12 16:27:54 -04:00
David Ashpole 539fddb49d kubelet evictions take priority into account 2017-10-12 13:15:05 -07:00
Shyam Jeedigunta c279a53ca0 Optimize random string generator to avoid multiple locks & use bitmasking 2017-10-12 19:13:17 +02:00
Kubernetes Submit Queue 03adf92aa9 Merge pull request #53753 from derekwaynecarr/log-spam
Automatic merge from submit-queue (batch tested with PRs 53119, 53753, 53795, 52981). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Reduce log spam in qos container manager

**What this PR does / why we need it**:
excessive log stmts make it hard to debug actual problems.

**Release note**:
```release-note
NONE
```
2017-10-12 08:28:36 -07:00
Dr. Stefan Schimanski a6f0cd01ee Get rid of pkg/api/util 2017-10-12 16:36:32 +02:00
Kubernetes Submit Queue efe6180806 Merge pull request #53752 from lookuptable/comment
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Update comments in pkg/kubeapiserver/authenticator/config.go

**What this PR does / why we need it**:
Make the comments consistent with the function signatures

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

**Special notes for your reviewer**:

**Release note**:

```
NONE
```
2017-10-12 06:36:25 -07:00
yanxuean 8adb2181eb remove redundancy code in setCPUCgroupConfig
Signed-off-by: yanxuean <yan.xuean@zte.com.cn>
2017-10-12 18:42:18 +08:00
houjun 80c3d2df14 Fix errors in cephfs_test.go 2017-10-12 15:06:01 +08:00
Di Xu 5a9313e10b update cluster printer to enable --show-labels 2017-10-12 14:05:58 +08:00
Kubernetes Submit Queue 4ff6ef4a37 Merge pull request #49361 from xiangpengzhao/svc-test
Automatic merge from submit-queue (batch tested with PRs 53606, 49361). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Release NodePorts at the end of test cases

**What this PR does / why we need it**:
#49098 reported a flake of HealthCheck NodePort leak and #49099 fixed it. I don't know why I forgot to check other Node Ports in the test cases. Though I haven't encountered such flake yet, it'd be good to release those Node Ports at the end of test cases to avoid flake.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #49548
Thanks @kargakis for reporting #49548!

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

**Release note**:

```release-note
NONE
```
2017-10-11 22:41:31 -07:00
Kubernetes Submit Queue 87bd30a142 Merge pull request #53606 from juanvallejo/jvallejo/add-approx-pod-template-factory-method
Automatic merge from submit-queue (batch tested with PRs 53606, 49361). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

add ApproximatePodTemplateForObject factory method

Makes it possible to get at a pod spec template even if an object is scaled to zero, for use with commands that care about pod templates.

**Release note**:

```release-note
NONE
```

Related downstream patch and use-case: https://github.com/openshift/origin/pull/16379

cc @smarterclayton
2017-10-11 22:41:29 -07:00
Kubernetes Submit Queue f60b92a26a Merge pull request #50836 from FengyunPan/auto-get-NodeSecurityGroupID
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Support autoprobing node-security-group for openstack cloud provider

1. Support autoprobing node-security-group
2. Support multiple Security Groups for cluster's nodes
3. Fix recreating Security Group for cluster's nodes

This is a part of #50726

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

**Release note**:
```release-note
Support autoprobing node-security-group for openstack cloud provider, Support multiple Security Groups for cluster's nodes.
```
2017-10-11 21:40:16 -07:00
Jordan Liggitt 59c4d7fdf3
Avoid fetching entire discovery tree when possible 2017-10-12 00:27:42 -04:00
Kubernetes Submit Queue 0515895c08 Merge pull request #53684 from dashpole/feature_gate_allocatable_eviction
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Add feature gate for allocatable disk eviction

Issue: #52336 
This PR adds the local storage feature gate to local storage allocatable eviction.

cc @kubernetes/sig-node-bugs 
/assign @jingxu97 @dchen1107 

we should target this for 1.7 if possible.

```release-note
fix a bug where disk pressure could trigger prematurely
```
2017-10-11 20:39:32 -07:00
Kubernetes Submit Queue cea1af38e2 Merge pull request #53714 from FengyunPan/fix-SecurityGroupName
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

The Securty Group name must be unique

Currently the service's name is not unique, and the Securty Group
name is not unique too. openstack cloud provider will delete the
Securty Group of other loadbalancer service when do a deletion.

OpenStack cloud provider get the ID of Securty Group by name, so the Securty Group name must be unique.
https://github.com/kubernetes/kubernetes/blob/master/pkg/cloudprovider/providers/openstack/openstack_loadbalancer.go#L1262

**Release note**:
```release-note
NONE
```
2017-10-11 18:49:21 -07:00
Kubernetes Submit Queue eabc7a3553 Merge pull request #53700 from euank/swapReader
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

kubelet/cm: remove unneeded fork of 'cat'

Reading a file in Go is perfectly possible without invoking cat.

I also removed an outdated comment.

This is meant to be a trivial/minor code cleanup, nothing more.

```release-note
NONE
```
2017-10-11 17:54:08 -07:00
Di Xu f2f88204f4 fix azureDisk warns about disk format failure 2017-10-12 08:07:51 +08:00
Kubernetes Submit Queue 7e384479d7 Merge pull request #51215 from juanvallejo/jvallejo/preserve-specified-destination-path
Automatic merge from submit-queue (batch tested with PRs 53668, 53624, 52639, 53581, 51215). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

preserve specified destination path

**Release note**:
```release-note
"kubectl cp" updated to honor destination names 
```

**Before**
```
$ kubectl cp foo_dir pod_name:/tmp/bar_dir
$ kubectl exec pod_name -it -- /bin/sh
sh-4.2$
sh-4.2$ ls /tmp
sh-4.2$ foo_dir
```

**After**
```
$ kubectl cp foo_dir pod_name:/tmp/bar_dir
$ kubectl exec pod_name -it -- /bin/sh
sh-4.2$
sh-4.2$ ls /tmp
sh-4.2$ bar_dir
```


**Notable changes to `kubectl cp` After This Patch**
- Copying a directory `bar_dir` to an existing directory in the pod will copy the directory itself, rather than just the file contents:

```bash
*Before*
> remote-pod-shell$ ls /tmp
                    existing_remote_dir              

$ kubectl cp ./my/local/awesome_dir mypod:/tmp/existing_remote_dir
> remote-pod-shell$ ls /tmp
                    existing_remote_dir
                    awesome_dir
```
```bash
*After*
> remote-pod-shell$ ls /tmp
                    existing_remote_dir              

$ kubectl cp ./my/local/awesome_dir mypod:/tmp/existing_remote_dir
> remote-pod-shell$ ls /tmp
                    existing_remote_dir
> remote-pod-shell$ ls /tmp/existing_remote_dir
                    awesome_dir
```

```
*Before*: Directory contents were merged if a local and remote directory shared the same name
*After*:  A new name will be honored for the copied local directory on the remote pod.
          If a new name was not specified for the local directory being copied, and it shares the
          same name as an already-existing directory on the pod, current behavior will follow and
          its contents will be added to those of the already-existing directory.
```

```
*Before*: If a trailing slash (e.g. kubectl cp ./local/dir pod:/tmp) was not added to a directory
          name in the destination path (...:/tmp vs /tmp/...), when copying to a pod, `kubectl`
          would attempt to copy the local directory under the parent of the remote directory
          rather than inside of it.
*After*:  Slashes do not alter the behavior of the command, or destination of the intended 
          source file or directory. With a command such as (kubectl cp ./local_dir pod:/tmp),
          `local_dir` would be copied inside of <pod:/tmp> (an error is returned if pod:/tmp is
           a file).
```

Related downstream bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1469411

@fabianofranz @kubernetes/sig-cli-misc
2017-10-11 17:00:08 -07:00
Derek Carr 328a12d160 Reduce log spam in qos container manager 2017-10-11 19:47:40 -04:00
Kubernetes Submit Queue 7db90f8b87 Merge pull request #53088 from mtaufen/remove-experimental-deprecated-kubeletconfig
Automatic merge from submit-queue (batch tested with PRs 53204, 53364, 53559, 53589, 53088). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Mulligan: Remove deprecated and experimental fields from KubeletConfiguration

Revert "Merge pull request #51857 from kubernetes/revert-51307-kc-type-refactor"

This reverts commit 9d27d92420, reversing
changes made to 2e69d4e625.

See original: #51307

We punted this from 1.8 so it could go through an API review. The point
of this PR is that we are trying to stabilize the kubeletconfig API so
that we can move it out of alpha, and unblock features like Dynamic
Kubelet Config, Kubelet loading its initial config from a file instead
of flags, kubeadm and other install tools having a versioned API to rely
on, etc.

We shouldn't rev the version without both removing all the deprecated
junk from the KubeletConfiguration struct, and without (at least
temporarily) removing all of the fields that have "Experimental" in
their names. It wouldn't make sense to lock in to deprecated fields.
"Experimental" fields can be audited on a 1-by-1 basis after this PR,
and if found to be stable (or sufficiently alpha-gated), can be restored
to the KubeletConfiguration without the "Experimental" prefix.

Related issue: https://github.com/kubernetes/kubernetes/issues/53084

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

/cc @kubernetes/api-reviewers
2017-10-11 15:14:47 -07:00
Kubernetes Submit Queue 3aff54f345 Merge pull request #53589 from sttts/sttts-pkg-api-testing
Automatic merge from submit-queue (batch tested with PRs 53204, 53364, 53559, 53589, 53088). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

pkg/api: move *_test.go -> pkg/api/testing

Cleaning up pkg/api, one little step towards pkg/apis/core.
2017-10-11 15:14:45 -07:00
Yang Guan 6860628b46 Update comments in pkg/kubeapiserver/authenticator/config.go
Make the comments consistent with the function signatures
2017-10-11 21:44:00 +00:00
Kubernetes Submit Queue a69e6fb9b3 Merge pull request #53724 from davidstack/master
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

update wrong comments
2017-10-11 12:36:31 -07:00
Kubernetes Submit Queue efd6e6a50d Merge pull request #53517 from andrewsykim/improve-ccm-logging
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Log when node is initialized in cloud controller manager

**What this PR does / why we need it**:
Always logs when a node is successfully initialized and raises log level for adding node labels to new nodes. This is useful since the only way to know if CCM is working properly is to check for the taint `node.cloudprovider.kubernetes.io/uninitialized`. 

**Release note**:

```release-note
Log when node is successfully initialized by Cloud Controller Manager
```

cc @luxas @wlan0 @jhorwit2
2017-10-11 10:43:58 -07:00
David Ashpole 8659676408 feature gate local storage allocatable eviction 2017-10-11 09:53:56 -07:00
Michael Taufen 8180536bed Mulligan: Remove deprecated and experimental fields from KubeletConfiguration
Revert "Merge pull request #51857 from kubernetes/revert-51307-kc-type-refactor"

This reverts commit 9d27d92420, reversing
changes made to 2e69d4e625.

See original: #51307

We punted this from 1.8 so it could go through an API review. The point
of this PR is that we are trying to stabilize the kubeletconfig API so
that we can move it out of alpha, and unblock features like Dynamic
Kubelet Config, Kubelet loading its initial config from a file instead
of flags, kubeadm and other install tools having a versioned API to rely
on, etc.

We shouldn't rev the version without both removing all the deprecated
junk from the KubeletConfiguration struct, and without (at least
temporarily) removing all of the fields that have "Experimental" in
their names. It wouldn't make sense to lock in to deprecated fields.
"Experimental" fields can be audited on a 1-by-1 basis after this PR,
and if found to be stable (or sufficiently alpha-gated), can be restored
to the KubeletConfiguration without the "Experimental" prefix.
2017-10-11 09:52:39 -07:00
Kubernetes Submit Queue df072ca97e Merge pull request #53025 from mtaufen/feature-gate-map
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Make feature gates loadable from a map[string]bool

Command line flag API remains the same. This allows ComponentConfig             
structures (e.g. KubeletConfiguration) to express the map structure             
behind feature gates in a natural way when written as JSON or YAML.             
                                                                                
For example:                                                                    
                                                                                
KubeletConfiguration Before:
```
apiVersion: kubeletconfig/v1alpha1
kind: KubeletConfiguration
featureGates: "DynamicKubeletConfig=true,Accelerators=true"
```

KubeletConfiguration After:
```
apiVersion: kubeletconfig/v1alpha1
kind: KubeletConfiguration
featureGates:
  DynamicKubeletConfig: true
  Accelerators: true
```

Fixes: #53024

```release-note
The Kubelet's feature gates are now specified as a map when provided via a JSON or YAML KubeletConfiguration, rather than as a string of key-value pairs.
```

/cc @mikedanese @jlowdermilk @smarterclayton
2017-10-11 09:05:33 -07:00
Kubernetes Submit Queue 93b3469a1f Merge pull request #53690 from mattjmcnaughton/mattjmcnaughton/53670-fix-hpa-scaling-above-max-replicas
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fix hpa scaling above max replicas w/ scaleUpLimit

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

Fix a bug where `desiredReplicas` could be greater than `maxReplicas`
if the original value for `desiredReplicas > scaleUpLimit` and
`scaleUpLimit > maxReplicas`. Previously, when that happened, we would
scale up to `scaleUpLimit`, and then in the next auto-scaling run, scale
down to `maxReplicas`. Address this issue and introduce a regression
test.

**Which issue this PR fixes**

fixes #53670

**Release note**:
```release-note
Address a bug which allowed the horizontal pod autoscaler to allocate `desiredReplicas` > `maxReplicas` in certain instances.
```
2017-10-11 08:53:01 -07:00
Kubernetes Submit Queue 40e6a6b7ad Merge pull request #51677 from itowlson/azure-cloud-provider-vet
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fix format specifiers in Azure cloud provider

**What this PR does / why we need it**: Fixes invalid/mismatched format specifiers in Azure cloud provider logging statements (`glog...Infof(...)`) that would cause information to be lost in logging output, as flagged by `go vet`.

**Which issue this PR fixes**: None

**Special notes for your reviewer**: None

**Release note**:

```release-note
NONE
```
2017-10-11 08:41:07 -07:00
Kubernetes Submit Queue bd5eeb1073 Merge pull request #52765 from lichen2013/chenli
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Using assertions in Unit tests

Using assertions:

1. cmd/kube-controller-manager/app/controller_manager_test.go
2. pkg/controller/bootstrap/jws_test.go
3. pkg/controller/cloud/node_controller_test.go
4. pkg/controller/controller_utils_test.go

Partially fix https://github.com/kubernetes/kubernetes/issues/43788
2017-10-11 07:42:45 -07:00
Damon Wang 67a50ce918 update wrong comments
update wrong comments
2017-10-11 22:16:03 +08:00
Dr. Stefan Schimanski 9488150762 SimpleNameGenerator: unify to use k8s.io/apiserver/pkg/storage/names 2017-10-11 16:05:52 +02:00
Dr. Stefan Schimanski b926ca40de pkg/api: move *_test.go -> pkg/api/testing 2017-10-11 16:04:50 +02:00
Kubernetes Submit Queue 7810eb8da0 Merge pull request #52402 from yastij/nodecontroller-clean-backwards
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

cleaning node controller from code for unsupported versions

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

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

**Special notes for your reviewer**:

**Release note**:

```release-note
None
```
2017-10-11 06:10:54 -07:00
mattjmcnaughton 75c38777ad Fix hpa scaling above max replicas w/ scaleUpLimit
Fix #53670

Fix a bug where `desiredReplicas` could be greater than `maxReplicas`
if the original value for `desiredReplicas > scaleUpLimit` and
`scaleUpLimit > maxReplicas`. Previously, when that happened, we would
scale up to `scaleUpLimit`, and then in the next auto-scaling run, scale
down to `maxReplicas`. Address this issue and introduce a regression
test.
2017-10-11 08:35:31 -04:00
FengyunPan 5af6a0b4de The Securty Group name should be unique
Currently the service's name is not unique, and the Securty Group
name is not unique too. openstack cloud provider will delete the
Securty Group of other loadbalancer service when do a deletion.
2017-10-11 19:20:36 +08:00
Kubernetes Submit Queue 82869c59ab Merge pull request #50223 from tcharding/kubectl-run-dup
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Remove duplicate code fixing empty name error

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

Removes two helper functions which have duplicate code; code can be safely added to the calling function. This does add an extra parameter to calls. Since the helpers are file local functions with only two call sites it is trivial to see that this PR maintains current logic.

**Special notes for your reviewer**:

The diff is a bit convoluted since this PR [re]moves lines in consecutive functions.

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

/sig cli
/kind cleanup
2017-10-11 03:14:33 -07:00
Kubernetes Submit Queue 494be59fda Merge pull request #50478 from leblancd/v6_iptables_cmds
Automatic merge from submit-queue (batch tested with PRs 52520, 52033, 53626, 50478). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fix kube-proxy to use proper iptables commands for IPv6 operation

For iptables save and restore operations, kube-proxy currently uses
the IPv4 versions of the iptables save and restore utilities
(iptables-save and iptables-restore, respectively). For IPv6 operation,
the IPv6 versions of these utilities need to be used
(ip6tables-save and ip6tables-restore, respectively).

Both this change and PR #48551 are needed to get Kubernetes services
to work in an IPv6-only Kubernetes cluster (along with setting
'--bind-address ::0' on the kube-proxy command line. This change
was alluded to in a discussion on services for issue #1443.

fixes #50474



**What this PR does / why we need it**:
This change modifies kube-proxy so that it uses the proper commands for iptables save and
iptables restore for IPv6 operation. Currently kube-proxy uses 'iptables-save' and 'iptables-restore'
regardless of whether it is being used in IPv4 or IPv6 mode. This change fixes kube-proxy so
that it uses 'ip6tables-save' and 'ip6tables-restore' commands when kube-proxy is being run
in IPv6 mode.

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

**Special notes for your reviewer**:

**Release note**:

```release-note NONE
```
2017-10-11 01:41:42 -07:00
Kubernetes Submit Queue 7f418a011f Merge pull request #52033 from aanm/50395-removing-max-prefix-length-ipv6-cidr
Automatic merge from submit-queue (batch tested with PRs 52520, 52033, 53626, 50478). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Removed the IPv6 prefix size limit for cluster-cidr

Fixes #50395

/sig network
/area ipv6

cc @rpothier
2017-10-11 01:41:37 -07:00
xiangpengzhao 3ca253a993 Release NodePorts at the end of test cases 2017-10-11 16:25:47 +08:00
Kubernetes Submit Queue 02187a0ea7 Merge pull request #53630 from m1093782566/ippart
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Move endpoints IPPart function to util

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

Clean up proxier.go

Move endpoints IPPart function to util so that it can be consumed by different proxiers.

BTW, the newer `IPPart()` supports IPV6, we need to update it in `ipvs/proxier.go`

**Which issue this PR fixes**:

 closes #53632

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```

/sig network
/area kube-proxy
2017-10-11 00:11:30 -07:00
Kubernetes Submit Queue e57accbd03 Merge pull request #51072 from hchenxa/hchenxa_typoFix
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

fix minor typo

**What this PR does / why we need it**:
Typo error
**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-10-10 22:21:06 -07:00
Euan Kemp 7aa88b5103 kubelet/cm: remove unneeded fork of 'cat'
Reading a file in Go is perfectly possible without invoking cat.

I also removed an outdated comment.
2017-10-10 21:53:35 -07:00
Chen Li fb9b29dbb1 Using assertions
Using assertions for unit tests:

1. cmd/kube-controller-manager/app/controller_manager_test.go
2. pkg/controller/bootstrap/jws_test.go
3. pkg/controller/cloud/node_controller_test.go
4. pkg/controller/controller_utils_test.go
2017-10-10 22:44:12 -05:00
Kubernetes Submit Queue 24cf4a8b5c Merge pull request #53441 from apelisse/completely-remove-swagger
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

kubectl: Remove swagger 1.2 entirely.

**What this PR does / why we need it**:
Remove dead code since nothing is using swagger 1.2 anymore. This doesn't change any feature, it's just removing unused code.

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

**Special notes for your reviewer**:

**Release note**:
```release-note
NONE
```
2017-10-10 20:43:27 -07:00
chenguoyan01 b88cf9435e add instrumented serivce unit test of version
Change-Id: I21b65cd3a03528a1ea14a77d71feb7d2bf7b097e
2017-10-11 11:31:29 +08:00
andyzhangx 6920141e4f fix avset nil issue in azure loadbalancer 2017-10-11 03:10:55 +00:00
m1093782566 d96409178b consume endpoints IPPart function in util 2017-10-11 09:51:58 +08:00
m1093782566 1ed1200143 move ippart() to util 2017-10-11 09:47:24 +08:00
Kubernetes Submit Queue f3b6fb7add Merge pull request #53682 from gnufied/fix-lock-usage-desired-state-world
Automatic merge from submit-queue (batch tested with PRs 53678, 53677, 53682, 53673). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Make sure we use rwlocks not just RLock

We need to use of rwlock for updating the desired state of world. I think `-race` flag doesn't detects this consistently.

Fixes #53590
2017-10-10 18:36:05 -07:00
Kubernetes Submit Queue 23cc4dc50a Merge pull request #52949 from smarterclayton/enable_paging
Automatic merge from submit-queue (batch tested with PRs 52354, 52949, 53551). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Enable API chunking and promote to beta for 1.9

All list watchers default to using chunking.  The server by default fills pages to avoid low cardinality filters from making excessive numbers of requests.  Fix an issue with continuation tokens where a `../` could be used if the feature was enabled.

```release-note
API chunking via the `limit` and `continue` request parameters is promoted to beta in this release.  Client libraries using the Informer or ListWatch types will automatically opt in to chunking.
```
2017-10-10 15:45:29 -07:00
juanvallejo 2371accf0c
preserve specified destination path 2017-10-10 18:16:10 -04:00
Hemant Kumar 414c3104ca Make sure we use rwlocks not just RLock 2017-10-10 17:52:55 -04:00
Kubernetes Submit Queue 9bf83135ab Merge pull request #52354 from crimsonfaith91/rs-unit
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

remove replicaset unit tests that are converted to integration tests

**What this PR does / why we need it**:
This PR revamps existing replicaset unit tests by removing the tests that have been converted to integration tests.

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

**Release note**:

```release-note
NONE
```
2017-10-10 14:51:14 -07:00
Antoine Pelisse d1ce36371e kubectl: Remove swagger 1.2 entirely. 2017-10-10 14:50:56 -07:00
Kubernetes Submit Queue ec116fdc73 Merge pull request #53328 from intelsdi-x/lscpu_fix
Automatic merge from submit-queue (batch tested with PRs 53297, 53328). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Cpu Manager - make CoreID's platform unique

**What this PR does / why we need it**:
Cpu Manager uses topology from cAdvisor(`/proc/cpuinfo`) where coreID's are socket unique - not platform unique - this causes problems on multi-socket platforms.

All code assumes unique coreID's (on platform) -  `Discovery` function has been changed to assign CoreID as the lowest cpuID from all cpus belonging to the same core. This can be expressed as:
`CoreID=min(cpuID's on the same core)`

Since cpuID's are platform unique - above gives us guarantee that CoreID's will also be platform unique.



**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #53323
2017-10-10 11:20:37 -07:00
Kubernetes Submit Queue b543f67fc8 Merge pull request #53297 from x1957/code_format
Automatic merge from submit-queue (batch tested with PRs 53297, 53328). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

format some code in dockershim

**What this PR does / why we need it**:
format some code in dockershim

**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-10-10 11:20:34 -07:00
Yassine TIJANI c446aa0e63 cleaning node controller from code that ensures backward compatibility for unsupported versions 2017-10-10 19:15:40 +02:00
Kubernetes Submit Queue 5f57dc8847 Merge pull request #53614 from dims/fix-npe-replicas-set-to-zero
Automatic merge from submit-queue (batch tested with PRs 53477, 53614). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fix potential problem when scaling --replicas=0

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

We have defensive code for checking if newRS != nil for
DeploymentProgressing and DeploymentTimedOut but not for
DeploymentComplete. Let's add the check here as well as
this problem was seen in the wild.

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

Fixes #53613 

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-10-10 10:01:41 -07:00
Kubernetes Submit Queue 6154a9e16c Merge pull request #53477 from caesarxuchao/genenic-initializer
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Move initializer plugin to the generic apiserver

* Moves `k8s.io/kuberentes/plugin/pkg/admission/initialization` to `k8s.io/apiserver/pkg/admission/plugin/initialization`
* Moves `k8s.io/kubernetes/pkg/kubeapiserver/admission/configuration` to `k8s.io/apiserver/pkg/admission/configuration`
* The initializer plugin used to depend on `k8s.io/kubernetes` because it does a type assertion of `api.Pod`. It tries to skip mirror pod. I converted that code to use the generic accessor pattern.
2017-10-10 09:46:00 -07:00
Michael Taufen 131b419596 Make feature gates loadable from a map[string]bool
Command line flag API remains the same. This allows ComponentConfig
structures (e.g. KubeletConfiguration) to express the map structure
behind feature gates in a natural way when written as JSON or YAML.

For example:

KubeletConfiguration Before:
```
apiVersion: kubeletconfig/v1alpha1
kind: KubeletConfiguration
featureGates: "DynamicKubeletConfig=true,Accelerators=true"
```

KubeletConfiguration After:
```
apiVersion: kubeletconfig/v1alpha1
kind: KubeletConfiguration
featureGates:
  DynamicKubeletConfig: true
  Accelerators: true
```
2017-10-10 09:37:51 -07:00
Kubernetes Submit Queue aaf14d4619 Merge pull request #53525 from sttts/sttts-scheme-copier-romoval
Automatic merge from submit-queue (batch tested with PRs 53525, 53652). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

apimachinery: remove ObjectCopier interface(s)

The big commit is a mechanical, transitive removal of the copier interfaces in all structs and function calls.
2017-10-10 08:31:41 -07:00
Clayton Coleman 113889e72d
Enable API chunking and promote to beta for 1.9
All list watchers default to using chunking.
2017-10-10 09:11:41 -04:00
mattjmcnaughton dd5be2a882 Make unnecessary hpa public funcs private
Previously
`pkg.controller.podautoscaler.UnsafeConvertToVersion` was
exported. However, it was never used outside of the `podautoscaler`
package. Make it private to prevent confusion.

Additionally, move the two private functions in `horizontal.go` to be
with the other private functions at the bottom of the file - imho its
more readable than having them directly at the top of the file, before
the public type and function definitions.
2017-10-10 08:03:25 -04:00
Kubernetes Submit Queue 46c2bfe47d Merge pull request #52856 from yastij/nodecontroller-clean-backwards-tests
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

cleaning tests from deprecated usecases due to unsupported version

**What this PR does / why we need it**: this part of the #52356 effort

**Which issue this PR fixes**: 

**Special notes for your reviewer**:

**Release note**:

```release-note
None
```
2017-10-10 04:32:14 -07:00
Szymon Scharmach b86dc9c054 Make CoreID's platform unique 2017-10-10 10:45:44 +02:00
Kubernetes Submit Queue 299beb228e Merge pull request #53182 from itowlson/azure-blobdiskcontroller-retry-logic
Automatic merge from submit-queue (batch tested with PRs 53444, 52067, 53571, 53182). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Retry when checking  Azure storage account readiness

**What this PR does / why we need it**: When the Azure cloud provider ensures that a default storage container exists, if the storage account exists but is still provisioning, it exits without retrying.  This is a bug as the code is wrapped in a backoff policy but never signals the policy to retry.  This PR fixes this behaviour by returning values which allow the backoff policy to operate.

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

**Special notes for your reviewer**: Not sure how to test this - I have done a deployment using acs-engine and it seems to work but I am not sure of the best way to exercise the failure path.

**Release note**:

```release-note
NONE
```
2017-10-10 00:33:29 -07:00
Kubernetes Submit Queue 194501c4aa Merge pull request #53571 from frodenas/util-metrics-error
Automatic merge from submit-queue (batch tested with PRs 53444, 52067, 53571, 53182). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Return an error if metric cannot be registered

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

`prometheus.MustRegister` panics if a metric cannot be registered. This PR replaces it with `prometheus.Register`, as it does not panic, and returns the error if the metric cannot be registered.

I also adds lacking tests for `RegisterMetricAndTrackRateLimiterUsage`.

**Which issue this PR fixes**:

Fixes #52872

**Special notes for your reviewer**:

None of the `metrics.RegisterMetricAndTrackRateLimiterUsage` invocations check the returned error, so I plan to submit new PRs to address this.

**Release note**:

```release-note
NONE
```
/sig instrumentation
2017-10-10 00:33:25 -07:00
Kubernetes Submit Queue d6cabc7e99 Merge pull request #53444 from msau42/make-mounts
Automatic merge from submit-queue (batch tested with PRs 53444, 52067, 53571, 53182). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Don't skip mounts if we can't find the volume

**What this PR does / why we need it**:
Return an error instead of skipping the volume while constructing the list of volume mounts for the container runtime.  This prevents the scenario of a container writing data to an ephemeral volume when it expects the volume to be persistent.

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

**Release note**:

NONE

@kubernetes/sig-storage-pr-reviews
2017-10-10 00:33:20 -07:00
FengyunPan 04dbfe67d6 Support autoprobing node-security-group for openstack cloud provider
1. Support autoprobing node-security-group
2. Support multiple Security Groups for cluster's nodes
3. Fix recreating Security Group for cluster's nodes

This is a part of #50726
2017-10-10 15:04:32 +08:00
Daneyon Hansen 3f293e2fe6 Updates RangeSize func and tests for IPv6. 2017-10-09 16:21:51 -07:00
Kubernetes Submit Queue fcde4c9b24 Merge pull request #51958 from deads2k/scheduler-03-typo
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

fix annoying leader election typo

Small typo that annoyed me. It expected `configmaps`
2017-10-09 14:55:18 -07:00
Davanum Srinivas 5690ba6241 Fix potential problem when scaling --replicas=0
We have defensive code for checking if newRS != nil for
DeploymentProgressing and DeploymentTimedOut but not for
DeploymentComplete. Let's add the check here as well as
this problem was seen in the wild.
2017-10-09 17:39:51 -04:00
Michelle Au 266120c189 Don't skip mounts if we can't find the volume 2017-10-09 14:00:23 -07:00
Kubernetes Submit Queue e8ee831abf Merge pull request #53588 from NickrenREN/openstack-deletevolume
Automatic merge from submit-queue (batch tested with PRs 52662, 53547, 53588, 53573, 53599). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Return err when delete volume failed

Return err when delete volume failed

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

/kind bug
/sig openstack
2017-10-09 12:51:19 -07:00
Kubernetes Submit Queue c12dab37e7 Merge pull request #53547 from jiayingz/deviceplugin-fix
Automatic merge from submit-queue (batch tested with PRs 52662, 53547, 53588, 53573, 53599). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

In DevicePluginHandlerImpl.Allocate(), skips untracked extended resou…

…rces.

Otherwise, we would fail a Pod allocation request that has an extended
resource not managed by any device plugin.



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

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

**Special notes for your reviewer**:

**Release note**:

```release-note
Ignore extended resources that are not registered with kubelet
```
2017-10-09 12:51:17 -07:00
Kubernetes Submit Queue 3752a511a4 Merge pull request #52662 from xiangpengzhao/volume-const
Automatic merge from submit-queue (batch tested with PRs 52662, 53547, 53588, 53573, 53599). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Use const instead of hard code for volume plugin

**What this PR does / why we need it**:
nits: cleanup hard-coded volume plugin name

**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-10-09 12:51:14 -07:00
juanvallejo ba1914d514
add ApproximatePodTemplateForObject factory method 2017-10-09 14:57:23 -04:00
Kubernetes Submit Queue 1dc1eb7373 Merge pull request #53197 from FengyunPan/node-0
Automatic merge from submit-queue (batch tested with PRs 53567, 53197, 52944, 49593). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

[OpenStack]Add codes to check the count of nodes(members)

After merging this PR(#53146), if there is no available nodes for
the loadbalancer service, UpdateLoadBalancer() will run panic.

**Release note**:
```release-note
NONE
```
2017-10-09 11:18:46 -07:00
Chao Xu bbac32c299 generated 2017-10-09 10:58:12 -07:00
Chao Xu 89a0511fcb move initializer to the generic apiserver
move k8s.io/kubernetes/plugin/pkg/admission/initialization to
k8s.io/apiserver/pkg/admission/plugin/initialization/initialization.go;
move k8s.io/kubernetes/pkg/kubeapiserver/admission/configuration to
k8s.io/apiserver/pkg/admission/configuration.
2017-10-09 10:57:00 -07:00
Kubernetes Submit Queue 92210a7d76 Merge pull request #53523 from zetaab/ignore_volume_label
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

add possibility to ignore volume label in dynamic provisioning

**What this PR does / why we need it**: this is needed if openstack cinder zone name does not match to compute zone names. For instance if there is only one cinder zone and many compute zones.

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

**Special notes for your reviewer**: 

```release-note
NONE
```
2017-10-09 09:17:04 -07:00
Kubernetes Submit Queue e7c61da14f Merge pull request #52985 from mattjmcnaughton/mattjmcnaughton/improve-horizontal-documentation
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Improve `horizontal.go` documentation

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

Resolve the remaining `golint` errors in the
`pkg/controller/podautoscaler` package by improving the documentation
in `horizontal.go`. Now all public methods have comments.

**Special notes for your reviewer**:
Re discussions in [this pr](https://github.com/kubernetes/kubernetes/pull/52238).

**Release note**:
```release-note
NONE
```
2017-10-09 08:21:01 -07:00
NickrenREN dca4732145 Return err when delete volume failed 2017-10-09 21:32:45 +08:00
Ferran Rodenas a334eb1a49 Return an error if metric cannot be registered
`prometheus.MustRegister` panics if the metric cannot be registered.
Instead, use `prometheus.Register` and return the error if the metric
cannot be registered.

Also, add tests for `RegisterMetricAndTrackRateLimiterUsage`.

Signed-off-by: Ferran Rodenas <frodenas@gmail.com>
2017-10-09 11:05:32 +02:00
Kubernetes Submit Queue ee80933d34 Merge pull request #49087 from allencloud/validate-kube-proxy-configs
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

validate kube-proxy options

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



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

I found that some components does not validate the config at the startup of itself. Without this, startup will bring some bad things. And I think fail fast can save customer's time and make thing simple and clear.

This PR add validation of kube-proxy's configuration.

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

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

**Special notes for your reviewer**:

Actually I only add a file named validation.go in `pkg/apis/componentconfig/validation/`, while I see in every folder, there is a file named `BUILD`, I hope to know how to add this file.
 
**Release note**:

```release-note
NONE
```
2017-10-09 01:31:11 -07:00
Jesse Haka e45457b0d8 add possibility to ignore volume label in dynamic provisioning
ignorelabel -> addlabel

FIX tests

small fix to test

fixes according what was asked

fix test

fix test
2017-10-09 09:52:42 +03:00
Kubernetes Submit Queue 9782a5a0a9 Merge pull request #52971 from dixudx/kubectl_not_parsing_labelSelector
Automatic merge from submit-queue (batch tested with PRs 51771, 52971). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

pass labelSelector to server side opaquely

**What this PR does / why we need it**:
From @smarterclayton 
> The server is responsible for handling label selection for the most part. There is some level of client side processing possible, but for the most part `label selector` should be able to be passed opaquely.

xref #50140

**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**:
/assign @smarterclayton @liggitt 

**Release note**:

```release-note
None
```
2017-10-08 23:30:37 -07:00
Kubernetes Submit Queue 85b252d47e Merge pull request #51771 from dixudx/refactor_nsenter
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Refactor nsenter

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

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

**Release note**:

```release-note
None
```
2017-10-08 23:27:32 -07:00
allencloud fd82adb012 validate kube-proxy options
Signed-off-by: allencloud <allen.sun@daocloud.io>
Signed-off-by: Allen Sun <allen.sun@daocloud.io>
2017-10-09 14:12:15 +08:00
zhengjiajin 7a57754921 RBAC: Add test for create clusterrolebindding 2017-10-09 13:59:01 +08:00
choury 00f8ae3540 fix duplicate unbind action 2017-10-09 12:14:24 +08:00
FengyunPan 370ad205b7 [OpenStack]Add codes to check the count of nodes(members)
After merging this PR(#53146), if there is no available nodes for
the loadbalancer service, UpdateLoadBalancer() will run panic.
2017-10-09 10:01:49 +08:00
Yuhao Fang c1c89d986b format some code in dockershim 2017-10-08 22:30:37 +08:00
Mark Janssen a9ed995a81 Add missing short names to kubectl help text
Add two resource type short names that are available but not included in
the resource types help text that appears when running `kubectl get`.
2017-10-08 15:59:44 +02:00
Di Xu a77c8a1ecd sort top pod and top node output by namespace/name 2017-10-07 22:58:34 +08:00
Dr. Stefan Schimanski ecb65a6a71 Update generated files 2017-10-07 11:28:47 +02:00
Jun Xiang Tee e23d9f7a36 remove replicaset unit tests that are converted to integration tests 2017-10-06 18:03:19 -07:00
Kubernetes Submit Queue 3f1a2e43b4 Merge pull request #52440 from juanvallejo/jvallejo/add-dry-run-flag-kubectl-drain
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

add --dry-run option to kubectl drain

**Release note**:
```release-note
Added --dry-run option to `kubectl drain`
```
Adds a `--dry-run` flag to `kubectl <cordon, uncordon, drain>`

@fabianofranz @kubernetes/sig-cli-misc
2017-10-06 18:02:35 -07:00
Kubernetes Submit Queue 94046a12c6 Merge pull request #46762 from bruceauyeung/k8s-branch-kubectl-cp-support-coping-local-file-into-remote-dir
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

kubectl cp command supports coping remote file into local directory

**What this PR does / why we need it**:
before this PR, `kubectl cp testpod:/tmp/testfile /home` will fail with error:
>error: open /home: is a directory

with this PR, `kubectl cp testpod:/tmp/testfile /home` will successfully copy remote `testfile` into directory `/home`

other minor improvements to make codes follow Go code conventions and more robust

**Release note**:

```
kubectl cp subcommand supports coping remote file into local directory now.
```
Signed-off-by: bruceauyeung <ouyang.qinhua@zte.com.cn>
2017-10-06 17:02:54 -07:00
Kubernetes Submit Queue 6398d40eaf Merge pull request #47026 from zhangxiaoyu-zidif/add-unittest-limitrange-describe
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Add unittest for describe LimitRange

**What this PR does / why we need it**:
Add unittest for describe LimitRange

**Release note**:

```release-note
NONE
```
2017-10-06 16:05:26 -07:00
Kubernetes Submit Queue f321a16af4 Merge pull request #49654 from jcbsmpsn/move-certificate-manager
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Move certificate manager to client.

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

**What this PR does / why we need it**:
Migrate the certificate_manager to a location where it can be shared.

```release-note
NONE
```
2017-10-06 15:00:07 -07:00
Jiaying Zhang ee1ffa619b In DevicePluginHandlerImpl.Allocate(), skips untracked extended resources.
Otherwise, we would fail a Pod allocation request that has an extended
resource not managed by any device plugin.
2017-10-06 13:57:53 -07:00
Kubernetes Submit Queue 2d1626028e Merge pull request #53058 from kad/fix-version
Automatic merge from submit-queue (batch tested with PRs 52768, 51898, 53510, 53097, 53058). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fix version comparison for versions with preRelease components

**What this PR does / why we need it**:
Fixes algorithm of comparing versions in pkg/util/version.
Also improve unit testing, so reverse comparison of versions also works

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

**Special notes for your reviewer**:

**Release note**:
```release-note
NONE
```
2017-10-06 13:16:47 -07:00
Kubernetes Submit Queue 5c9e36ef80 Merge pull request #53097 from m1093782566/ipvs-test
Automatic merge from submit-queue (batch tested with PRs 52768, 51898, 53510, 53097, 53058). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Run IPVS proxier UTs everywhere - include !linux platfrom

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

IPVS proxier UTs should run everywhere, including !linux platfrom, which will help a lot when developing in windows platfrom.

**Which issue this PR fixes**: 

fixes #53099

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-10-06 13:16:45 -07:00
Kubernetes Submit Queue 6e7989e652 Merge pull request #53510 from dims/run-tests-with-devstack
Automatic merge from submit-queue (batch tested with PRs 52768, 51898, 53510, 53097, 53058). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Ability to run the openstack tests against DevStack

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

Some of the environment variables have changed as devstack defaults
have changed. So look for the older env variables first and try the
newer ones later.

At a minimum you need the following for v3 authentication which is
the default with latest devstack. If you miss the Tenant information
then the token issued will be a unscoped token (and will not have any
service catalog information).

OS_AUTH_URL=http://192.168.0.42/identity
OS_REGION_NAME=RegionOne
OS_USERNAME=demo
OS_PASSWORD=supersecret
OS_TENANT_NAME=demo
OS_USER_DOMAIN_ID=default


**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-10-06 13:16:42 -07:00
Kubernetes Submit Queue bd2251d7c3 Merge pull request #52768 from zjj2wry/bugfix-kubectl-config-unset
Automatic merge from submit-queue (batch tested with PRs 52768, 51898, 53510, 53097, 53058). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

bug(cli)fix kubectl config unset unexist map key will add this key, s…

…hould tell user this key not exist



**What this PR does / why we need it**:
Fixes #43769

**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**:
cc @kubernetes/sig-cli-pr-reviews

**Release note**:

```release-note
NONE
```
2017-10-06 13:16:34 -07:00
Kubernetes Submit Queue 6ac018af01 Merge pull request #53202 from sttts/sttts-unify-generator-mains
Automatic merge from submit-queue (batch tested with PRs 53434, 53202). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

code-generator: unify generator main funcs and prepare for launching from one binary

- remove "generated by client-gen with custom arguments" message as this does not
  make sense in the times of k8s.io/code-generator
- unify generator main funcs and explicitly call pflag.AddFlags and pflag.Parse. This
  will allow to instantiate the generators also from other places.

Requires https://github.com/kubernetes/gengo/pull/80.

Closes https://github.com/kubernetes/kubernetes/issues/53522.
2017-10-06 11:13:32 -07:00
Kubernetes Submit Queue 960287878e Merge pull request #53434 from crassirostris/fix-apiserver-client-metrics
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fix a bug with exposing prometheus client metrics in multiple components

I think this is a bug caused by splitting the repos: prometheus metrics are registered in a module that initialized metrics client-go never uses.

```release-note
Fix a bug that prevents client-go metrics from being registered in prometheus in multiple components.
```
2017-10-06 11:00:45 -07:00
Dr. Stefan Schimanski 509df603b1 apimachinery: mechanical removal of ObjectCopier plumbing 2017-10-06 19:21:03 +02:00
Kubernetes Submit Queue 5d3a0f069a Merge pull request #53471 from cheftako/owners
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Add cheftako to CP reviewers and wlan0 to approvers.

**What this PR does / why we need it**: wlan0 is helping to lead the separate cloud providers effort and so should be an approver. I am helping to do the gce effort and should probably be a reviewer.

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

**Special notes for your reviewer**:

**Release note**:
```release-note NONE
```
2017-10-06 09:56:32 -07:00
Kubernetes Submit Queue 182aa93be8 Merge pull request #53487 from oracle/for/upstream/master/service-event-logging
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Enable event logging in the service controller

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

This PR enables logging for the events in the service controller which keeps parity with the [node controller](https://github.com/kubernetes/kubernetes/blob/master/pkg/controller/cloud/node_controller.go#L83).

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```

/cc @luxas @wlan0 @jhorwit2
2017-10-06 09:56:19 -07:00
Slava Semushin b88a640ef8 PSP: teach fuzzer about fsGroup/supplementalGroups strategies. 2017-10-06 18:00:23 +02:00
juanvallejo e11a11140f
add --dry-run option to kubectl drain 2017-10-06 11:55:36 -04:00
Dr. Stefan Schimanski ed586da147 apimachinery: remove Scheme.DeepCopy 2017-10-06 14:59:17 +02:00
Dr. Stefan Schimanski 19285b7357 apimachinery: remove Scheme.Copy 2017-10-06 14:24:05 +02:00
Dr. Stefan Schimanski 60a0eb260c Update generated files 2017-10-06 12:36:51 +02:00
Kubernetes Submit Queue 4f00d3a67d Merge pull request #53519 from m1093782566/more-fakes
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

implement fakeIPVS update virtual server

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

* Implement UpdateVirtualServer() for FakeIPVS because ipvs/proxier needs it.

* Add UTs - Since there are some real logics in fakeIPVS interface, it's important to add some UTs which can help avoiding some mistakes.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-10-06 00:27:28 -07:00
andrewsykim 2def443440 log when node is initialized in cloud controller manager 2017-10-06 00:59:11 -04:00
Kubernetes Submit Queue fc81ec01e5 Merge pull request #53278 from janetkuo/ds-apps-v1-master
Automatic merge from submit-queue (batch tested with PRs 53278, 53184). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Add API version apps/v1, and bump DaemonSet to apps/v1

**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)*: kubernetes/features#484

**Special notes for your reviewer**: This PR targets `master`, as a backup if #53223 (targeting features branch) falls through 

@kubernetes/sig-apps-api-reviews 

**Release note**:

```release-note
Add API version apps/v1, and bump DaemonSet to apps/v1
```
2017-10-05 21:58:40 -07:00
m1093782566 8f6f382003 implement fakeIPVS update virtual server 2017-10-06 11:58:48 +08:00
Kubernetes Submit Queue 16e42282d3 Merge pull request #53028 from jiayingz/flaky-test
Automatic merge from submit-queue (batch tested with PRs 53044, 52956, 53512, 53028). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fixes the flaky TestDevicePluginReRegistration.

In the current test, there is a race that the new device plugin endpoint
may not be added to the device plugin manager endpoints at the time when
we call manager.Devices(). Added the checking and waiting for endpoint
updates before calling manager.Devices() in the test.

Tested:
go test -race -count 500 k8s.io/kubernetes/pkg/kubelet/deviceplugin -run
TestDevicePluginReRegistration -timeout 5h



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

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

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-10-05 18:29:44 -07:00
Kubernetes Submit Queue 2eadc737aa Merge pull request #53130 from m1093782566/test-fake
Automatic merge from submit-queue (batch tested with PRs 53418, 53366, 53115, 53402, 53130). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Implement delete real server for fakeIPVS and add UTs

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

* Implement DeleteRealServer() for FakeIPVS because ipvs/proxier needs it.
* Add UTs - Since there are some real logics in fakeIPVS interface, it's important to add some UTs which can help avoiding some mistakes. Sadly, there is already a bug :(

**Which issue this PR fixes**: 

fixes #53137

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-10-05 17:31:26 -07:00
Kubernetes Submit Queue feb92e1ba6 Merge pull request #53402 from dougm/import-known-versions-test
Automatic merge from submit-queue (batch tested with PRs 53418, 53366, 53115, 53402, 53130). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Ignore unexported fields in import_known_versions_test

Tests currently fail with:

  "import_known_versions_test.go:122: Unexpected type uint in ..."

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

Running `make test` against the latest (f11a551f64) fails for me with:

```
import_known_versions_test.go:122: Unexpected type uint in schema.GroupVersionKind{Group:"apps", Version:"__internal", Kind:"DaemonSet"}

        import_known_versions_test.go:122: Unexpected type uint in schema.GroupVersionKind{Group:"apps", Version:"__internal", Kind:"DaemonSet"}
        import_known_versions_test.go:124: extensions.DaemonSet:
        import_known_versions_test.go:124:   extensions.DaemonSetSpec:
        import_known_versions_test.go:124:     api.PodTemplateSpec:
        import_known_versions_test.go:124:       api.PodSpec:
        import_known_versions_test.go:124:         []api.Container:
        import_known_versions_test.go:124:           api.Container:
        import_known_versions_test.go:124:             []api.EnvVar:
        import_known_versions_test.go:124:               api.EnvVar:
        import_known_versions_test.go:124:                 *api.EnvVarSource:
        import_known_versions_test.go:124:                   api.EnvVarSource:
        import_known_versions_test.go:124:                     *api.ResourceFieldSelector:
        import_known_versions_test.go:124:                       api.ResourceFieldSelector:
        import_known_versions_test.go:124:                         resource.Quantity:
        import_known_versions_test.go:124:                           resource.infDecAmount:
        import_known_versions_test.go:124:                             *inf.Dec:
        import_known_versions_test.go:124:                               inf.Dec:
        import_known_versions_test.go:124:                                 big.Int:
        import_known_versions_test.go:124:                                   big.nat:
        import_known_versions_test.go:124:                                     big.Word:
```

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-10-05 17:31:24 -07:00
Kubernetes Submit Queue 536f9ac1d8 Merge pull request #53115 from FengyunPan/fix-auto
Automatic merge from submit-queue (batch tested with PRs 53418, 53366, 53115, 53402, 53130). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fix the version detection of OpenStack Cinder

**What this PR does / why we need it**:
When running Kubernetes against an installation of DevStack which
deploys the Cinder service at a path rather than a port (ex:
http://foo.bar/volume rather than http://foo.bar:xxx), the version
detection fails. It is better to use the OpenStack service catalog.
OTOH, when initialize cinder client, kubernetes will check the
endpoint from the OpenStack service catalog, so we can do this
version detection by it.

There are two case should be fixed in other PR:
1. revisit the version detection after supporting Cinder V3 API.
2. add codes to support MicroVersion after gophercloud supports MicroVersion.

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

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

**Release note**:
```release-note
Using OpenStack service catalog to do version detection
```
2017-10-05 17:31:21 -07:00
Kubernetes Submit Queue 793ee6f450 Merge pull request #53418 from jingax10/node_ipam_branch
Automatic merge from submit-queue (batch tested with PRs 53418, 53366, 53115, 53402, 53130). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Minior cleanup in pkg/controller/node/ipam/sync/sync.go

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

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-10-05 17:31:16 -07:00
Janet Kuo fd48a4a895 Autogen 2017-10-05 15:01:52 -07:00
Walter Fender 2a58152fdb Add cheftako to CP reviewers and wlan0 to approvers. 2017-10-05 14:44:07 -07:00
Davanum Srinivas c04f04c229 Ability to run the openstack tests against DevStack
Some of the environment variables have changed as devstack defaults
have changed. So look for the older env variables first and try the
newer ones later.

At a minimum you need the following for v3 authentication which is
the default with latest devstack. If you miss the Tenant information
then the token issued will be a unscoped token (and will not have any
service catalog information).

OS_AUTH_URL=http://192.168.0.42/identity
OS_REGION_NAME=RegionOne
OS_USERNAME=demo
OS_PASSWORD=supersecret
OS_TENANT_NAME=demo
OS_USER_DOMAIN_ID=default
2017-10-05 17:31:20 -04:00
Doug MacEachern 06205696ae Ignore unexported fields in import_known_versions_test
Tests currently fail with:

  "import_known_versions_test.go:122: Unexpected type uint in ..."

Closes #53508
2017-10-05 14:21:02 -07:00
Kubernetes Submit Queue 3b1b19a1e2 Merge pull request #53120 from m1093782566/fake-ipv6
Automatic merge from submit-queue (batch tested with PRs 53227, 53120). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

remove ipv4 in pkg/util/ipvs

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

remove ipv4 in util/ipvs

**Which issue this PR fixes**:

xref: #51866


**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-10-05 13:07:38 -07:00
Jacob Simpson 415c4d2c3a Move certificate manager to client. 2017-10-05 12:54:38 -07:00
Janet Kuo 48cb110c38 Fix typo in apps/v1beta2 default test 2017-10-05 10:43:11 -07:00
Janet Kuo 5c89c39d9d Enable apps/v1 by default 2017-10-05 10:43:11 -07:00
Janet Kuo 9813a5278f Add API version apps/v1
Add a new API version apps/v1.
apps/v1 has a copy of apps/v1beta2.DaemonSet API.
2017-10-05 10:43:11 -07:00
Jing Ai 5f40a4230e Merge branch 'master' into node_ipam_branch 2017-10-05 10:11:18 -07:00
Kubernetes Submit Queue 9af339885b Merge pull request #53410 from nicksardo/gce-hack-subnet
Automatic merge from submit-queue (batch tested with PRs 51750, 53195, 53384, 53410). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

GCE: Handle missing subnet for legacy networks and auto networks with unique subnet names

Fixes #53409

/assign @bowei 

Tested on three GKE clusters with automatic, manual, and legacy networks.

**Release note**:
```release-note
GCE: Fixes ILB sync on legacy networks and auto networks with unique subnet names
```
2017-10-05 06:09:04 -07:00
Kubernetes Submit Queue 9e9ebc04fb Merge pull request #53195 from dixudx/add_timeout_for_openstack_cloudprovider
Automatic merge from submit-queue (batch tested with PRs 51750, 53195, 53384, 53410). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

add http request timeout for OpenStack cloud provider

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

**Special notes for your reviewer**:
/assign @NickrenREN @dims @FengyunPan 

**Release note**:

```release-note
None
```
2017-10-05 06:08:58 -07:00
Kubernetes Submit Queue ecfff6620c Merge pull request #51750 from jianhuiz/kubectl-custom-colume-not-found
Automatic merge from submit-queue (batch tested with PRs 51750, 53195, 53384, 53410). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

outputs `<none>` for colums not found

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

outputs `<none>` for columns specified by `-o custom-columns` but not found in object

currently kubectl outputs an error of "xxx is not found" when a column is not in the returned json (omitted because of empty value or no such field in the object type at all). This PR suppress this error but outputs `<none>` at that field. This makes it convenient to output the objects details, especially when getting objects of different type in one command.

example:
```
$ kubectl get deploy,rs,po -o custom-columns=NAMESPACE:.metadata.namespace,NAME:.metadata.name,REPLICAS:.status.replicas
NAMESPACE   NAME                      REPLICAS
default     deck                      1
default     deck-433074128            1
default     deck-433074128-vxcg9      <none>
```

**Special notes for your reviewer**:

**Release note**:

```release-note
outputs `<none>` for columns specified by `-o custom-columns` but not found in object
```


@kubernetes/kubectl-reviewers
2017-10-05 06:08:54 -07:00
Kubernetes Submit Queue 65cca36ebe Merge pull request #52917 from juanvallejo/jvallejo/support-multiple-node-selection
Automatic merge from submit-queue (batch tested with PRs 53454, 53446, 52935, 53443, 52917). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

add --selector flag support

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

Adds --selector option to kubectl drain,cordon,uncordon, performing
each action on a list of nodes matching the given label.

If at least one node fails to be cordoned/uncordoned, the command will
continue to operate on any remaining nodes, uninterrupted, reporting
any errors it encounters along the way.

If at least one node fails to be drained, the command will halt, printing
the immediate error encountered, and a list of nodes yet to be drained
(including the node that just failed to be drained).

cc @kubernetes/sig-cli-misc @fabianofranz @soltysh
2017-10-05 05:06:33 -07:00