Commit Graph

55355 Commits (091a9dfc35a10637c464b7f5e1e2ec2d25d7067f)

Author SHA1 Message Date
Kubernetes Submit Queue 5e3b681caa Merge pull request #48939 from verb/nit-expetected
Automatic merge from submit-queue (batch tested with PRs 52168, 48939, 51889, 52051, 50396). 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 typo in kubelet kuberuntime container test

Changes "Expetected" to "Expected"

**What this PR does / why we need it**: Fixes a typo in a test

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-09-23 13:40:47 -07:00
Kubernetes Submit Queue fbf687c66c Merge pull request #52168 from mattjmcnaughton/mattjmcnaughton/49256-clear-status-message-when-zero-desired-pods
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 incorrect status msg in podautoscaler

**Which issue this PR fixes**

Fix #49256

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

When `ScalingLimited = true` for the `hpa`, there is an accompanying
status message, describing why scaling is limited. Previously if the desired
replica count was 0, and spec.minReplicas > 0, the status message
indicated "the desired replica count was less than the min replica
count". This was particularly confusing when `spec.MinReplicas = 1`. If
there was no `spec.minReplicas`, then the status message indicated "the
desired replica count was zero" which is more informative.

Update the calculation of status message so that if the desired replica
count is 0, we always display the clearer "the desired replica count was
zero" status message, even if spec.minReplicas > 0.

Signed-off-by: mattjmcnaughton <mattjmcnaughton@gmail.com>

```release-note
NONE
```
2017-09-23 13:23:18 -07:00
Kubernetes Submit Queue e0f75338b5 Merge pull request #52933 from liggitt/proxy-subpath-slash
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>..

Preserve leading and trailing slashes on proxy subpaths

subresource parsing was not populating path parameters correctly (leading and trailing slashes were being stripped)

this caused bad locations to be sent to the proxy, causing https://github.com/kubernetes/kubernetes/issues/52022. the first attempt to fix that (#52065) unconditionally prefixed '/', which broke the redirect case (#52813 #52729)

fixes #52813, fixes #52729

needs to be picked to 1.7 and 1.8

```release-note
Restores redirect behavior for proxy subresources
```
2017-09-23 12:34:41 -07:00
Clayton Coleman 26d87e49cb
Add a negotiate method media type for use in explicit contexts 2017-09-23 15:08:20 -04:00
Kubernetes Submit Queue 7008b9043b Merge pull request #52014 from m1093782566/reasons-sync
Automatic merge from submit-queue (batch tested with PRs 50294, 50422, 51757, 52379, 52014). 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>..

rsync ipvs proxier to HEAD of iptables

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

rsync ipvs proxier to HEAD of iptables.

**Which issue this PR fixes**:

 xref #51679

**Special notes for your reviewer**:

Obviously, @Lion-Wei has done part of this work, ref: #51922. It's fine that let #51922 get in first.

**Release note**:

```release-note
NONE
```
2017-09-23 11:40:56 -07:00
Kubernetes Submit Queue 84dc294a49 Merge pull request #52379 from dixudx/kubectl_describe_hostpathtype
Automatic merge from submit-queue (batch tested with PRs 50294, 50422, 51757, 52379, 52014). 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>..

print HostPathType for kubectl describe

**What this PR does / why we need it**:
Since #46597 has already added `HostPathType` for `HostPath`, we should print it when we describe 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**:
@thockin PTAL
/assign @smarterclayton @liggitt @pwittrock

**Release note**:

```release-note
None
```
2017-09-23 11:40:53 -07:00
Kubernetes Submit Queue 8a638c6b55 Merge pull request #51757 from itowlson/azure-load-balancer-subnet-redux
Automatic merge from submit-queue (batch tested with PRs 50294, 50422, 51757, 52379, 52014). 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>..

Azure cloud provider: expose services on non-default subnets

**What this PR does / why we need it**: The Azure cloud provider allows users to specify that a service should be exposed on an internal load balancer instead of the default external load balancer.  However, in a VNet environment, such services are currently always exposed on the master subnet.  Where there are multiple subnets in the VNet, it's desirable to be able to expose an internal service on any subnet.  This PR allows this via a new annotation, `service.beta.kubernetes.io/azure-load-balancer-internal-subnet`.

**Which issue this PR fixes**: fixes https://github.com/Azure/acs-engine/issues/1296 (no corresponding issue has been raised in the k8s core repo)

**Special notes for your reviewer**: None

**Release note**:

```release-note
A new service annotation has been added for services of type LoadBalancer on Azure, 
to specify the subnet on which the service's front end IP should be provisioned. The 
annotation is service.beta.kubernetes.io/azure-load-balancer-internal-subnet and its 
value is the subnet name (not the subnet ARM ID).  If omitted, the default is the 
master subnet.  It is ignored if the service is not on Azure, if the type is not 
LoadBalancer, or if the load balancer is not internal.
```
2017-09-23 11:40:49 -07:00
Kubernetes Submit Queue 2c5413b379 Merge pull request #50422 from karataliu/apid
Automatic merge from submit-queue (batch tested with PRs 50294, 50422, 51757, 52379, 52014). 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 AnnotationProvidedIPAddr annotation for externalCloudProvider

**What this PR does / why we need it**:
In #44258, it introduced `AnnotationProvidedIPAddr`. When kubelet has 'node-ip' parameter set, and cloud provider not set, this annotation would be populated, and then will be validated by cloud-controller-manager:
https://github.com/kubernetes/kubernetes/pull/44258/files#diff-6b0808bd1afb15f9f77986f4459601c2R465

Later with #47152, externalCloudProvider is checked and func returns before that annotation got set. In this case, that annotation will not get populated.

This fix is to bring that annotation assignment to a proper location.

Please correct me if I have any misunderstanding.
@wlan0 @ublubu 

**Which issue this PR fixes**

**Special notes for your reviewer**:

**Release note**:
2017-09-23 11:40:47 -07:00
Kubernetes Submit Queue 4a9fb7d646 Merge pull request #50294 from xingzhou/comment-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>..

Fixed a small comment typo

**Release note**:
```
None
```
2017-09-23 11:27:54 -07:00
Kubernetes Submit Queue c7dadcbf4a Merge pull request #50080 from m1093782566/kubectl-fix-3
Automatic merge from submit-queue (batch tested with PRs 52109, 52235, 51809, 52161, 50080). 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 UT for pkg/kubectl/clusterrolebinding_test.go

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

I find there is no UT case for pkg/kubectl/clusterrolebinding.go. This PR Adds some UTs for pkg/kubectl/clusterrolebinding_test.go

**Which issue this PR fixes**:

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```

/sig cli
2017-09-23 10:26:54 -07:00
Kubernetes Submit Queue 90a4ac03dc Merge pull request #52161 from CaoShuFeng/kubectl_cp
Automatic merge from submit-queue (batch tested with PRs 52109, 52235, 51809, 52161, 50080). 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>..

Allow kubectl cp large amounts of files from container

When we try to copy out a dir with large amounts of files from container, we hit such error:

```bash
kubectl cp  mypod:/ ./a/
tar: Removing leading `/' from member names
tar: Removing leading `/' from hard link targets
error: open a/usr/share/zoneinfo/Asia/Rangoon: too many open files
```

This is because kubectl opens too many files at the same. We should close them after Write() function.
**Release note**:
```
NONE
```
2017-09-23 10:26:52 -07:00
Kubernetes Submit Queue 37780d1c67 Merge pull request #51809 from davidz627/gci_api_test
Automatic merge from submit-queue (batch tested with PRs 52109, 52235, 51809, 52161, 50080). 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>..

Updated pd.go tests to use GCE API instead of GCloud Commands

Fixes #49796
2017-09-23 10:26:49 -07:00
Kubernetes Submit Queue 7485aad067 Merge pull request #52235 from xiangpengzhao/remove-hostportChainName
Automatic merge from submit-queue (batch tested with PRs 52109, 52235, 51809, 52161, 50080). 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 backward compatibility of hostportChainName

**What this PR does / why we need it**:
fix TODO.

**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 @freehan 

**Release note**:

```release-note
NONE
```
2017-09-23 10:26:47 -07:00
Kubernetes Submit Queue 32144cd775 Merge pull request #52109 from medinatiger/dev
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 more test coverage for kubeadm uploadconfig especially with idemp…

**What this PR does / why we need it**:
This PR adds more test case for Kubeadm uploadconfig, particularly to address some feedback in #51482
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
fixes #kubernetes/kubeadm#379

**Special notes for your reviewer**:

```release-note
NONE
```
2017-09-23 10:17:58 -07:00
Kubernetes Submit Queue 1c0c83d245 Merge pull request #51777 from m1093782566/ipvs-sync-period
Automatic merge from submit-queue (batch tested with PRs 52240, 48145, 52220, 51698, 51777). 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 ipvs default sync period

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

If sync period <=0, it will cause kube-proxy panic, see: https://github.com/kubernetes/kubernetes/blob/master/pkg/proxy/ipvs/proxier.go#L728

That is, the input parameter for `time.NewTicker()` must be >0.

Unfortunately, current default value of sync period is 0.

**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-09-23 09:14:05 -07:00
Kubernetes Submit Queue fd3c1f4416 Merge pull request #51698 from rphillips/feat/lease_endpoint_reconciler
Automatic merge from submit-queue (batch tested with PRs 52240, 48145, 52220, 51698, 51777). 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 lease endpoint reconciler

**What this PR does / why we need it**: Adds OpenShift's LeaseEndpointReconciler to register kube-apiserver endpoints within the storage registry.

Adds a command-line argument `alpha-endpoint-reconciler-type` to the kube-apiserver.

Defaults to the old MasterCount reconciler.

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

**Release note**:
```release-note
Adds a command-line argument to kube-apiserver called
--alpha-endpoint-reconciler-type=(master-count, lease, none) (default
"master-count"). The original reconciler is 'master-count'. The 'lease'
reconciler uses the storageapi and a TTL to keep alive an endpoint within the
`kube-apiserver-endpoint` storage namespace. The 'none' reconciler is a noop
reconciler that does not do anything. This is useful for self-hosted
environments.
```

/cc @lavalamp @smarterclayton @ncdc
2017-09-23 09:14:02 -07:00
Kubernetes Submit Queue ffe122d89c Merge pull request #52220 from yujuhong/rm-legacy-code
Automatic merge from submit-queue (batch tested with PRs 52240, 48145, 52220, 51698, 51777). 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>..

dockershim: remove support for legacy containers

The code was first introduced in 1.6 to help pre-CRI-kubelet upgrade to
using the CRI implementation. They can safely be removed now.
2017-09-23 09:14:00 -07:00
Kubernetes Submit Queue 2b594750e7 Merge pull request #48145 from imcsk8/loadbalancer-logs
Automatic merge from submit-queue (batch tested with PRs 52240, 48145, 52220, 51698, 51777). 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 printing node list for LoadBalancer in log file

**What this PR does / why we need it**:  Production log files get saturated with EnsureLoadBalancer messages, this is problematic for sysadmins. 
This patch avoids printing the node list on the AWS logs so the log file is  more readable.
2017-09-23 09:13:57 -07:00
Kubernetes Submit Queue 446daf02a5 Merge pull request #52240 from mattjmcnaughton/mattjmcnaughton/do-not-import-apimachinery-from-staging
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>..

Modify `apimachinery` imports using `staging`

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

Currently some of the imports of `apimachinery` use
`k8s.io/kubernetes/staging/src/k8s.io/apimachinery...`. Replace
these with `k8s.io/apimachinery`, as is in use throughout the rest
of the code base.

Signed-off-by: mattjmcnaughton <mattjmcnaughton@gmail.com>

**Release note**:
```release-note
NONE
```
2017-09-23 09:08:26 -07:00
Kubernetes Submit Queue d042a1d7d1 Merge pull request #51595 from WanLinghao/kubectl_cp_error
Automatic merge from submit-queue (batch tested with PRs 51438, 52182, 51607, 47912, 51595). 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 kubectl cp command error

fix kubectl cp command error.

modified:   pkg/kubectl/cmd/cp.go



**What this PR does / why we need it**:
fix kubectl cp error.
it happens when copy directory to pod and the directory path ends with '/'.
for example:
kubectl cp /tmp/test/ test-pod:/tmp/test/
it will fail with 
error: stat /tmp/test/test: no such file or directory

**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-09-23 08:09:54 -07:00
Kubernetes Submit Queue 4adddfea59 Merge pull request #47912 from jacekn/runtime-config
Automatic merge from submit-queue (batch tested with PRs 51438, 52182, 51607, 47912, 51595). 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-extra-args support to the kubernetes-master juju layer

**What this PR does / why we need it**: It adds api-extra-args config option to the kubernetes-master juju layer

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

**Special notes for your reviewer**:


```release-note
Add api-extra-args support to the kubernetes-master juju layer
```
2017-09-23 08:09:51 -07:00
Kubernetes Submit Queue 8064930037 Merge pull request #51607 from xingzhou/sc-newfield
Automatic merge from submit-queue (batch tested with PRs 51438, 52182, 51607, 47912, 51595). 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 `ReclaimPolicy` field to `kubectl describe storageclass` output.

Add `ReclaimPolicy` field to `kubectl describe storageclass` output.

PR https://github.com/kubernetes/kubernetes/pull/47987 added `ReclaimPolicy` field to StorageClass.

**Release note**:
```release-note
None
```
2017-09-23 08:09:48 -07:00
Kubernetes Submit Queue d2cf4d01c6 Merge pull request #52182 from cheftako/flags
Automatic merge from submit-queue (batch tested with PRs 51438, 52182, 51607, 47912, 51595). 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>..

Ensure we log the flag apiserver starts with.

Trying to make sure we always log the flags an instance of apiserver
starts with.
This can be especially valuable for emailed logs or e2e/kubemark tests.

**What this PR does / why we need it**: Ensures we log the flags an apiserver was started with.

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

**Release note**:```release-note NONE
```
2017-09-23 08:09:46 -07:00
Kubernetes Submit Queue 6759586c2c Merge pull request #51438 from zhangxiaoyu-zidif/refactor-federation-dns-test-sets
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 federation dns test case with sets.String

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

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-09-23 07:55:00 -07:00
Kubernetes Submit Queue 8fe960e710 Merge pull request #51526 from atlassian/optimize-unstructured-converter
Automatic merge from submit-queue (batch tested with PRs 50392, 52108, 52083, 52134, 51526). 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>..

Do deep copy instead of to and from JSON encoding

**What this PR does / why we need it**:
Unstructured converter encodes to JSON and then parses the result into a new object. For `Unstructured` this can be avoided by directly doing a deep copy. It is an optimization.

**Special notes for your reviewer**:
#47889 is somewhat related.

**Release note**:
```release-note
NONE
```
/sig api-machinery
2017-09-23 07:14:08 -07:00
Kubernetes Submit Queue 044e79c714 Merge pull request #52134 from yujuhong/minor-test-fixes
Automatic merge from submit-queue (batch tested with PRs 50392, 52108, 52083, 52134, 51526). 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>..

e2e: minor changes to network/service testing utils

Add more logging to help debug. Also refactor several functions to improve
reusability.
2017-09-23 07:14:05 -07:00
Kubernetes Submit Queue 3a399136e6 Merge pull request #52083 from billy2180/fix-some-comments
Automatic merge from submit-queue (batch tested with PRs 50392, 52108, 52083, 52134, 51526). 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 some comment in hack/jenkins/*-dockerized.sh

hack/jenkins/gotest-dockerized.sh has been deleted,But the comments are not updated,FYI [The PR #1463](https://github.com/kubernetes/test-infra/pull/1463/files#diff-072eac404bdccadbe14552a7d3c012c2)
```release-note
NONE
```
2017-09-23 07:14:03 -07:00
Kubernetes Submit Queue c592d303e4 Merge pull request #52108 from cmluciano/cml/addcmlucianomilestone
Automatic merge from submit-queue (batch tested with PRs 50392, 52108, 52083, 52134, 51526). 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 cmluciano to milestone maintainers

Cmluciano is the one of the SIG-Network PM members

**Release note**:
```
NONE
```
2017-09-23 07:14:00 -07:00
Kubernetes Submit Queue 3dea17fc64 Merge pull request #50392 from dashpole/fix_inode_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>..

inode eviction tests fill a constant number of inodes

Issue: #52203

inode eviction tests pass often on some OS distributions, and almost never on others.  See [these testgrid tests](https://k8s-testgrid.appspot.com/sig-node#kubelet-flaky-gce-e2e&include-filter-by-regex=Inode)
These differences are most likely because different images have fewer or greater inode capacity, and thus percentage based rules (e.g. inodesFree<50%) make the test more stressful for some OS distributions than others.
This changes the test to require that a constant number of inodes are consumed, regardless of the number of inodes in the filesystem, by setting the new threshold to:
nodefs.inodesFree<(current_inodes_free - 200k)
so that after pods consume 200k inodes, they will be evicted.  It requires querying the summary API until we successfully determine the current number of free Inodes.
2017-09-23 07:05:23 -07:00
Kubernetes Submit Queue a3cc5dc384 Merge pull request #51542 from sttts/sttts-deepcopy-client-go
Automatic merge from submit-queue (batch tested with PRs 51929, 52015, 51906, 52069, 51542). 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>..

client-go: simplify deepcopy calls
2017-09-23 06:16:17 -07:00
Kubernetes Submit Queue 7240b1e2ee Merge pull request #52069 from shiywang/cleanup-api
Automatic merge from submit-queue (batch tested with PRs 51929, 52015, 51906, 52069, 51542). 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 specialDefaultResourcePrefixes out of vendor/k8s.io/apiserver

just a clean-up, fixes TODO: move out of this package, it is not generic
@sttts PTAL
/assign @sttts
2017-09-23 06:16:15 -07:00
Kubernetes Submit Queue 1c79884fbe Merge pull request #51906 from guangxuli/federation_validation
Automatic merge from submit-queue (batch tested with PRs 51929, 52015, 51906, 52069, 51542). 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 federation cluster spec CIDR

**What this PR does / why we need it**:
Add extra validation for cluster CIDR.

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

**Special notes for your reviewer**:
none

**Release note**:
none
2017-09-23 06:16:12 -07:00
Kubernetes Submit Queue 4d5bcda664 Merge pull request #52015 from m1093782566/flush-ipvs
Automatic merge from submit-queue (batch tested with PRs 51929, 52015, 51906, 52069, 51542). 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 IPVS Flush API

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

Currently, we implement IPVS flush API by deleting IPVS services one by one, which is inefficient.

**Which issue this PR fixes**: 

fixes #52070

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-09-23 06:16:09 -07:00
Kubernetes Submit Queue 3f3e8a732c Merge pull request #51929 from ConnorDoyle/cpu-manager-examples
Automatic merge from submit-queue (batch tested with PRs 51929, 52015, 51906, 52069, 51542). 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 example pods to demonstrate CPU manager.

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

Adds example pods and README for the CPU manager static policy which is a new feature in Kubernetes v1.8.

**Release note**:
```release-note
NONE
```
2017-09-23 06:16:06 -07:00
Serguei Bezverkhi 42bd500134 kubeadm golint clean up
Closes #375
2017-09-23 08:07:55 -04:00
Kubernetes Submit Queue 4acacc6ed9 Merge pull request #51673 from lichuqiang/add_ut
Automatic merge from submit-queue (batch tested with PRs 50378, 51463, 50006, 51962, 51673). 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 unit test case for Networkpolicy storage

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

add unit test for storage of resource Networkpolicy
2017-09-23 04:02:59 -07:00
Kubernetes Submit Queue 448dcdbcfd Merge pull request #51962 from juanvallejo/jvallejo/ignore-unknown-resource-version
Automatic merge from submit-queue (batch tested with PRs 50378, 51463, 50006, 51962, 51673). 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 unknown resource version in scaler error

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

Rather than printing `Scaling the resource failed with: An Error; Current resource version Unknown` whenever a ScalerError occurs and a resource version is not known, we should avoid printing the resource version part of the error message in order to avoid potential confusion by a user.

Related downstream comment: https://github.com/openshift/origin/issues/16056#issuecomment-326049457

cc @fabianofranz @soltysh @stevekuznetsov @kubernetes/sig-cli-misc
2017-09-23 04:02:56 -07:00
Kubernetes Submit Queue 12a74f5c7f Merge pull request #50006 from huangjiuyuan/fix-cm-option-test
Automatic merge from submit-queue (batch tested with PRs 50378, 51463, 50006, 51962, 51673). 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>..

adding kube-controller-manager starting option tests

**What this PR does / why we need it**:
The unit test for kube-controller-manager is missing in `cmd/kube-controller-manager/app/options`. I have added a unit test for checking kube-controller-manager starting options, which is similar to the unit test in `cmd/kube-apiserver/app/options/options_test.go`. This PR https://github.com/kubernetes/kubernetes/pull/49092 can be seen as a reference.

**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-09-23 04:02:54 -07:00
Kubernetes Submit Queue ea59fd4fab Merge pull request #51463 from lucab85/i18n-Italian
Automatic merge from submit-queue (batch tested with PRs 50378, 51463, 50006, 51962, 51673). 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>..

Improved Italian translation for kubectl

**What this PR does / why we need it:**
This PR provides an improved Italian translation of kubectl (related to #50155).

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

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

```release-note
Improved Italian translation for kubectl
```
2017-09-23 04:02:51 -07:00
Kubernetes Submit Queue 1b7cd72261 Merge pull request #50378 from php-coder/improve_unit_tests
Automatic merge from submit-queue (batch tested with PRs 50378, 51463, 50006, 51962, 51673). 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>..

provider_test.go: use existing method instead of own copy of it

**What this PR does / why we need it**:
This PR removes duplicated definition of the `defaultPod()` function and also updates a comment.

**Release note**:
```release-note
NONE
```
2017-09-23 04:02:49 -07:00
Suraj Narwade 0082bd0061 Cleaning up unused functions in /pkg/controller/deployment/util 2017-09-23 15:55:22 +05:30
Kubernetes Submit Queue 9793bb3023 Merge pull request #51684 from tcharding/lint-plugins-env
Automatic merge from submit-queue (batch tested with PRs 51031, 51705, 51888, 51727, 51684). 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: Fix golint warnings for plugins/*

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

We currently have an entry in `hack/.golint_failures` for `pkg/kubectl/plugins`. If we lint the files in `plugins/` then we can safely remove this entry.
 
`golint` emits the following warnings (only one of each type shown)
```
exported method EnvList.Slice should have comment or be unexported
error var IncompletePluginError should have name of the form ErrFoo
func name will be used as plugins.PluginsEnvVarPluginLoader by other packages, and that stutters; consider calling this EnvVarPluginLoader
```

This PR clears all `golint` warnings from `kubectl/plugins/`.

1. Remove entry from `hack/.golint_failures`
2. Add missing documentation to exported types and functions.
3. Rename error variables to `ErrFoo`.
4. Rename `PluginsEnvVarPluginLoader` to `KubectlPluginsPathPluginLoader` (mirrors env var name).
5. Rename `XDGDataPluginLoader` to `XDGDataDirsPluginLoader` (to make uniform change above).

**Special notes for your reviewer**:

Felt a bit dirty doing this cleanup because the code in `plugins/` is particularly clean and well written already.

**Release note**:

```release-note
NONE
```
/sig cli
/kind cleanup
2017-09-23 01:47:11 -07:00
Kubernetes Submit Queue 2273f36818 Merge pull request #51727 from juanvallejo/jvallejo/ensure-unstructured-objects-kubectl-get
Automatic merge from submit-queue (batch tested with PRs 51031, 51705, 51888, 51727, 51684). 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>..

ensure unstructured resources in kubectl get

Related downstream issue: https://github.com/openshift/origin/issues/16064

Ensure we are dealing with unstructured objects before attempting to
compose into an unstructured list.

`$ kubectl get ...` [assumes all resources returned from a resource builder are unstructured objects](https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/get.go#L355). This leads to a panic when dealing with non-unstructured objects.
This patch ensures we are dealing with unstructured objects before attempting to
compose into an unstructured list.

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

cc @fabianofranz @kubernetes/sig-cli-misc
2017-09-23 01:47:07 -07:00
Kubernetes Submit Queue 3484ae9e49 Merge pull request #51888 from tengqm/fix-api-server-help
Automatic merge from submit-queue (batch tested with PRs 51031, 51705, 51888, 51727, 51684). 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 hard-coding location for auto-generated cert files

**What this PR does / why we need it**:
This fixes the confusing/incorrect help message for "--tls-cert-file" in apiserver package.

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

**Special notes for your reviewer**:
Please advise if a release note is needed.

**Release note**:
```release-note
NONE
```
2017-09-23 01:47:04 -07:00
Kubernetes Submit Queue 815b894dd4 Merge pull request #51705 from enj/enj/i/panic_timed_workers_test/51704
Automatic merge from submit-queue (batch tested with PRs 51031, 51705, 51888, 51727, 51684). 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>..

Address panic in TestCancelAndReadd

This further increases the timeouts in `timed_workers_test` to reduce the chance of a race condition against the wait group.

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

Fixes #51704

/assign @gmarek

cc @davidopp @timothysc

```release-note
NONE
```
2017-09-23 01:47:02 -07:00
Kubernetes Submit Queue d4ac62cea4 Merge pull request #51031 from jcbsmpsn/metric-certificate-expiration-on-kubelet
Automatic merge from submit-queue (batch tested with PRs 51031, 51705, 51888, 51727, 51684). 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 a kubelet metric to track certificate expiration.

Fix https://github.com/kubernetes/kubernetes/issues/51964

```release-note
Add a metric to the kubelet to monitor remaining lifetime of the certificate that
authenticates the kubelet to the API server.
```
2017-09-23 01:46:58 -07:00
Kubernetes Submit Queue ec382f3511 Merge pull request #50989 from wgliang/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>..

should use time.Since instead of time.Now().Sub

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

should use time.Since instead of time.Now().Sub

**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-09-23 00:24:35 -07:00
Kubernetes Submit Queue 14cedb9f58 Merge pull request #51582 from jiulongzaitian/myfeature
Automatic merge from submit-queue (batch tested with PRs 43016, 50503, 51281, 51518, 51582). 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>..

change AddEventHandlerWithResyncPeriod to AddEventHandler in factory.go

Signed-off-by: zhangjie <zhangjie0619@yeah.net>



**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
change AddEventHandlerWithResyncPeriod to AddEventHandler in factory.go
```
2017-09-22 23:36:02 -07:00
Kubernetes Submit Queue 7d9eb60837 Merge pull request #51518 from jianglingxia/jlx8291910
Automatic merge from submit-queue (batch tested with PRs 43016, 50503, 51281, 51518, 51582). 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>..

double const in mount_linux.go

**What this PR does / why we need it**:
fix some typo and double const
**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-09-22 23:35:59 -07:00
Kubernetes Submit Queue 55798b265c Merge pull request #51281 from verult/GCEDiskCleanup
Automatic merge from submit-queue (batch tested with PRs 43016, 50503, 51281, 51518, 51582). 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: Moving disk-related cloud provider operations to gce_disks.go

**What this PR does / why we need it**: The main GCE cloud provider code (pkg/cloudprovider/providers/gce/gce.go) should not contain disk-related operations. Moved them to gce_disks.go

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

**Release note**:

```release-note
NONE
```
/release-note-none
/sig storage
/assign @msau42 @bowei
2017-09-22 23:35:57 -07:00