Commit Graph

22169 Commits (f32b390cf08a9afd9f9899e0d97a90eb162b32a8)

Author SHA1 Message Date
Minhan Xia 25ac521f88 flush conntrack entry for udp service when # of backend changes from 0 to non-0 2017-07-06 15:12:44 -07:00
Kubernetes Submit Queue 7df2bce1ec Merge pull request #48269 from FengyunPan/add-gc-metric
Automatic merge from submit-queue (batch tested with PRs 48518, 48525, 48269)

Update comment for garbagecollector

Update comment for garbagecollector, update not exist func.

**Release note**:
```release-note
NONE
```
2017-07-06 13:34:46 -07:00
Kubernetes Submit Queue 3863f39588 Merge pull request #48525 from FengyunPan/cleanup-metric
Automatic merge from submit-queue (batch tested with PRs 48518, 48525, 48269)

Cleanup useless metrics.go for garbagecollector

The metrics of garbagecollector are already published with the
workqueue metrics, so metrics.go is useless, let's cleanup it.
See https://github.com/kubernetes/client-go/blob/master/util/workqueue/metrics.go.

**Release note**:

```release-note
NONE
```
2017-07-06 13:34:44 -07:00
Kubernetes Submit Queue 50c6211850 Merge pull request #48518 from smarterclayton/separate_cert_man
Automatic merge from submit-queue (batch tested with PRs 48518, 48525, 48269)

Move the kubelet certificate management code into a single package

Code is very similar and belongs together. Will allow future cert callers to potentially make this more generic, as well as to make it easier reuse code elsewhere.
2017-07-06 13:34:42 -07:00
Davanum Srinivas 927a4a0a68 Volunteer to help with OpenStack provider reviews
I'd like to help with keeping the OpenStack cloud provider up-to-date
2017-07-06 08:43:43 -04:00
Kubernetes Submit Queue 9cfb0ae565 Merge pull request #48508 from mengqiy/fix_term
Automatic merge from submit-queue

fix cross build

Fix the issue introduced in #48299 which breaks cross-build (https://github.com/kubernetes/kubernetes/pull/48299#issuecomment-312846398).
move setsize.go and setsize_unsupported.go back to util/term for kubelet.
move unmark_windows.go as well.

```release-note
NONE
```
2017-07-06 00:08:49 -07:00
Kubernetes Submit Queue 9dd6a935fc Merge pull request #48501 from FengyunPan/enable-ServiceAffinity
Automatic merge from submit-queue

Enable Service Affinity for OpenStack cloudprovider

Fix issue: #48500
Kubernetes's OpenStack cloudprovider can't set persistence to "SOURCE_IP"

**Release note**:
```release-note
NONE
```
2017-07-05 20:45:26 -07:00
ymqytw b336691ca3 eliminate kubectl dependency on kubelet 2017-07-05 20:23:30 -07:00
FengyunPan 154ab548f9 Cleanup useless metrics.go for garbagecollector
The metrics of garbagecollector are already published with the
workqueue metrics, so metrics.go is useless, let's cleanup it.
See https://github.com/kubernetes/client-go/blob/master/util/workqueue/metrics.go.
2017-07-06 09:51:39 +08:00
FengyunPan 6ee05783c2 Enable Service Affinity for OpenStack cloudprovider.
Fix issue: #48500
Kubernetes's OpenStack cloudprovider can't set LB's persistence
to "SOURCE_IP".
2017-07-06 09:25:31 +08:00
Kubernetes Submit Queue d816555e44 Merge pull request #48121 from sakshamsharma/add-kms-dep
Automatic merge from submit-queue (batch tested with PRs 48292, 48121)

Add Google cloudkms dependency, add cloudkms service to GCE cloud provider

Required to introduce a Google KMS based envelope encryption, which shall allow encrypting secrets at rest using KEK-DEK scheme.

The above requires KMS API to create/delete KeyRings and CryptoKeys, and Encrypt/Decrypt data.

Should target release 1.8

@jcbsmpsn 

Update: It appears that Godep only allows dependencies which are in use. We may have to modify this PR to include some Google KMS code.

Progresses #48522
2017-07-05 17:41:40 -07:00
Clayton Coleman b8e662fcea
Move the kubelet certificate management code into a single package
Code is very similar and belongs together.
2017-07-05 18:11:49 -04:00
Minhan Xia 0c2ceeb81f share iptables util client within kubenet 2017-07-05 14:54:14 -07:00
Minhan Xia 8de419b19f expose lock release error from iptables util 2017-07-05 14:31:24 -07:00
Kubernetes Submit Queue 145976f72a Merge pull request #48194 from k82cn/k8s_48173
Automatic merge from submit-queue (batch tested with PRs 47327, 48194)

Checked container spec when killing container.

**What this PR does / why we need it**:
Checked container spec when getting container, return error if failed.

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

**Release note**:
```release-note-none
```
2017-07-05 14:21:39 -07:00
Kubernetes Submit Queue 67da2da32f Merge pull request #47327 from xingzhou/remove-error
Automatic merge from submit-queue (batch tested with PRs 47327, 48194)

Remove useless error

While doing https://github.com/kubernetes/kubernetes/pull/44898, found an useless return error.

**Release note**:
```
None
```
2017-07-05 14:21:36 -07:00
Kubernetes Submit Queue 154bf490bb Merge pull request #47700 from JulienBalestra/rkt-systemd-unit-limitnofile
Automatic merge from submit-queue (batch tested with PRs 47700, 48464, 48502)

Provide a way to setup the limit NO files for rkt Pods

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

This PR allows to customize the Systemd unit files for rkt pods.
We start with the `systemd-unit-option.rkt.kubernetes.io/LimitNOFILE` to allows to run workloads like etcd, ES in kubernetes with rkt.

**Special notes for your reviewer**:

Once again, I followed @yifan-gu guidelines.
I made a basic check over the values given inside the `systemd-unit-option.rkt.kubernetes.io/LimitNOFILE` (integer and > 0).
If this check fails: I simply ignore the field.
The other implementation would be to fail the whole SetUpPod.

We discussed using a key like `rkt.kubernetes.io/systemd-unit-option/LimitNOFILE` but the validation only allows a single `/` in this field:
```The Deployment "tiller" is invalid: spec.template.annotations: Invalid value: "rkt.kubernetes.io/systemd-unit-option/LimitNOFILE": a qualified name must consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyName',  or 'my.name',  or '123-abc', regex used for validation is '([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]') with an optional DNS subdomain prefix and '/' (e.g. 'example.com/MyName')```

**Release note**:

```release-note 
NONE
```
2017-07-05 13:27:43 -07:00
ymqytw ce561b2044 fix cross build for windows 2017-07-05 12:42:41 -07:00
Kubernetes Submit Queue 96d8ab725b Merge pull request #48498 from deads2k/tpr-18-delete-02
Automatic merge from submit-queue (batch tested with PRs 45467, 48091, 48033, 48498)

bulk delete of tpr packages

related to https://github.com/kubernetes/kubernetes/issues/48152

Bulk delete of the TPR code.  I made the minimal changes outside the delete to try to keep it easy to review.
2017-07-05 12:37:42 -07:00
Kubernetes Submit Queue 1108738200 Merge pull request #48033 from smarterclayton/generic_printer
Automatic merge from submit-queue (batch tested with PRs 45467, 48091, 48033, 48498)

Refactor and simplify generic printer for unknown objects

The first two commits are part of other PRs

@kubernetes/sig-cli-pr-reviews part of the general refactoring for server side print
2017-07-05 12:37:33 -07:00
Kubernetes Submit Queue e14d9a7ffd Merge pull request #48091 from rpothier/kubenet-ipv6
Automatic merge from submit-queue (batch tested with PRs 45467, 48091, 48033, 48498)

Allow Kubenet with ipv6

When running kubenet with IPv6, there is a panic as there
is IPv4 specific code the Event function.
With this change, Event will support IPv4 and IPv6



**What this PR does / why we need it**:
This PR allows kubenet to use IPv6. Currently there is a panic in kubenet_linux.go
as there is IPv4 specific code.

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

**Special notes for your reviewer**:

**Release note**:

```release-note-NONE
```
2017-07-05 12:37:31 -07:00
Kubernetes Submit Queue e16b59aa0a Merge pull request #45467 from ddysher/kubectl-describe-controllerRef
Automatic merge from submit-queue

Fix kubectl describe for pods with controllerRef

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

kubectl describe doesn't take controllerRef into consideration, resulting confusing result. e.g. if we have two replicaset with the same selector, one with 1 replica and the other 2 replicase, then both replicaset will show 3 running pods.

```sh
$ kubectl describe rs replicaset-2
Name:           replicaset-2      
Namespace:      default
Selector:       environment=prod
Labels:         environment=prod
Annotations:    <none>
Replicas:       2 current / 2 desired
Pods Status:    3 Running / 0 Waiting / 0 Succeeded / 0 Failed
Pod Template:
  Labels:       environment=prod
  Containers:
   created-from-replicaset:
    Image:              nginx
    Port:               
    Environment:        <none>
    Mounts:             <none>
  Volumes:              <none>
Events:
  FirstSeen     LastSeen        Count   From                    SubObjectPath   Type            Reason                  Message
  ---------     --------        -----   ----                    -------------   --------        ------                  -------
  5m            5m              1       replicaset-controller                   Normal          SuccessfulCreate        Created pod: replicaset-2-39szb
  5m            5m              1       replicaset-controller                   Normal          SuccessfulCreate        Created pod: replicaset-2-470jr
```


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

xref #24946

**Special notes for your reviewer**:

**Release note**:

```release-note
Fix kubectl describe for pods with controllerRef 
```
2017-07-05 12:25:49 -07:00
deads2k 254e71bfc6 bulk delete of tpr packages 2017-07-05 11:02:23 -04:00
Kubernetes Submit Queue e5419a56db Merge pull request #47162 from FengyunPan/display-none
Automatic merge from submit-queue (batch tested with PRs 47162, 48444, 48445)

Fix output extra comma

/# kubectl get service
NAME                     CLUSTER-IP       EXTERNAL-IP               PORT(S)          AGE
nginx-service-test       10.200.6.109     _**,80.11.12.10**_              8000:31637/TCP   6s
**(output a extra comma)**
except: 
nginx-service-test       10.200.6.109     _**80.11.12.10**_              8000:31637/TCP   6s

/# cat lb.yaml 
apiVersion: v1 
kind: Service 
metadata: 
  name: nginx-service-lb3
spec: 
  ports: 
    - port: 8000
      targetPort: 80 
      protocol: TCP 
  type: LoadBalancer
  selector: 
    name: nginx
  externalIPs: 
    - 80.11.12.10
    - 1.2.3.6
/# kubectl create -f lb.yaml
2017-07-05 06:39:27 -07:00
Kubernetes Submit Queue c10cc3decd Merge pull request #48353 from deads2k/tpr-17-delete-01
Automatic merge from submit-queue (batch tested with PRs 48480, 48353)

remove tpr api access

xref https://github.com/kubernetes/kubernetes/issues/48152

TPR tentacles go pretty deep. This gets us started by removing API access and we'll move down from there.

@kubernetes/sig-api-machinery-misc 
@ironcladlou this should free up the GC implementation since TPRs will no longer be present and failing.

```release-note
Removing TPR api access per https://github.com/kubernetes/kubernetes/issues/48152
```
2017-07-05 05:49:30 -07:00
Kubernetes Submit Queue b12314e246 Merge pull request #48480 from liggitt/namespace-reconcile
Automatic merge from submit-queue (batch tested with PRs 48480, 48353)

Ensure namespace exists as part of RBAC reconciliation

reconciliation can race with the controller that creates the namespaces containing the bootstrap roles. if it loses, it gets a NotFound error trying to create the namespaced role/rolebinding.

Fixes https://github.com/kubernetes/kubeadm/issues/335

```release-note
RBAC role and role-binding reconciliation now ensures namespaces exist when reconciling on startup.
```
2017-07-05 05:49:28 -07:00
Kubernetes Submit Queue bce32b66cd Merge pull request #47217 from CaoShuFeng/trival_fix
Automatic merge from submit-queue

[trivial]fix function name in comment

**Release note**:

```
NONE
```
2017-07-05 03:21:30 -07:00
Kubernetes Submit Queue 62d3e8c25f Merge pull request #48473 from zhangxiaoyu-zidif/refactor-preemption
Automatic merge from submit-queue (batch tested with PRs 48473, 48341)

Refactor podListEqual()

**What this PR does / why we need it**:
To solve the problem:
 this is not correct if there are duplicate pods in the list.
 for example: podListEqual([a, a, b], [a, b, b]) will return true

**Special notes for your reviewer**:
 the original method is O(N^2), while current method is 3* O(N).
I think it is much better.

**Release note**:

```release-note
NONE
```
2017-07-05 03:09:23 -07:00
Kubernetes Submit Queue 54e7755775 Merge pull request #48383 from gyliu513/refactor-daemon
Automatic merge from submit-queue

Factored out simulate from nodeShouldRunDaemonPod.

Addressed comments from https://github.com/kubernetes/kubernetes/pull/48189#issuecomment-312223162



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

/sig apps
2017-07-05 01:53:04 -07:00
zhangxiaoyu-zidif e6c95e7a5c fix-review 2017-07-05 15:40:51 +08:00
Kubernetes Submit Queue d777cd4c5f Merge pull request #47504 from xiangpengzhao/fix-ep-notready
Automatic merge from submit-queue

Pods which exit and won't restart should not be in the Endpoints.NotReadyAddresses

**What this PR does / why we need it**:
Such pods should not be in the Endpoints.NotReadyAddresses:
* Failed pods with restart policy=Never
* Succeeded pods with restart policy=Never
* Succeeded pods with restart policy=OnFailure

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

**Special notes for your reviewer**:
/cc @wojtek-t 

**Release note**:

```release-note
NONE
```
2017-07-05 00:22:50 -07:00
xiangpengzhao d59c128904 Pods which exits and won't restart should not be in the Endpoints.NotReadyAddresses 2017-07-05 13:42:59 +08:00
Clayton Coleman 6bd0c38908
Add a new default printer handler for HumanReadable
Refactors and removes the need for the more complex old code,
temporarily limits what output is shown for truly unknown objects (a
follow up change will allow server side handling and generic fallback),
and removes all of the generic printers in favor of a single code path.
2017-07-05 00:31:41 -04:00
Guangya Liu cb7d74c677 Factored out simulate from nodeShouldRunDaemonPod.
Addressed comments from https://github.com/kubernetes/kubernetes/pull/48189#issuecomment-312223162
2017-07-05 09:42:55 +08:00
Jordan Liggitt d5730f40cd
Ensure namespace exists as part of RBAC reconciliation 2017-07-04 18:24:16 -05:00
Kubernetes Submit Queue bd53fb6f66 Merge pull request #48456 from cosmincojocar/fix_azure_cert_password
Automatic merge from submit-queue

Use the azure certificate password when decoding the certificate

**What this PR does / why we need it**:
Use the correct password when decoding the azure client certificate.

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

cc @colemickens
2017-07-04 16:01:02 -07:00
Kubernetes Submit Queue 1ff6498195 Merge pull request #48047 from yan234280533/modify_grammar_1
Automatic merge from submit-queue

 modify the meassage in kubectl secret command when the envFile path is not an file path

What this PR does / why we need it:
We found that the error message of kubectl secret command when the the envFile path is not an file path
is inaccurate and the style is different with which in  kubectl configmap command. We modified “must be a file” to "env secret file cannot be a directory" 
Special notes for your reviewer:
None
2017-07-04 14:04:58 -07:00
Nate Franzen 3466fab857 update test function calls 2017-07-04 12:35:14 -07:00
Nate Franzen 6d59906884 recheck pod volumes before marking pod as processed 2017-07-04 12:11:40 -07:00
Cosmin Cojocar afafb3f231 Use the azure certificate password when decoding the certificate 2017-07-04 08:56:40 +02:00
xiangpengzhao 6cfbd9329a Fix lint errors of pkg/util/net/sets/ipnet.go 2017-07-04 12:04:24 +08:00
xiangpengzhao 016f1cfd8f Remove unused sub-pkgs in pkg/util 2017-07-04 12:04:06 +08:00
Kubernetes Submit Queue c662e1d7d8 Merge pull request #46949 from xingzhou/typo
Automatic merge from submit-queue

Fixed a comment typo

Typo fix

Fixed #48414 

**Release note**:
```
None
```
2017-07-03 11:33:36 -07:00
Kubernetes Submit Queue 74bde7f7ff Merge pull request #48354 from deads2k/gc-01-deletenever
Automatic merge from submit-queue (batch tested with PRs 47784, 47793, 48334, 48435, 48354)

allow a deletestrategy to opt-out of GC

Not all resources should be GC-able and we implemented an ignore list to handle this, but at the storage layer they could still set finalizers, they just hung in a stuck state forever.  This updates the strategy to allow a resource to indicate that they shouldn't be GCed.

@kubernetes/sig-api-machinery-misc
2017-07-03 10:41:56 -07:00
Kubernetes Submit Queue 8f9c57ca53 Merge pull request #47919 from rrati/aws-handle-logs-with-return-keys
Automatic merge from submit-queue

Use %q formatter for error messages from the AWS SDK. #47789

Error messages from the AWS SDK can have return keys in them, so use %q formatter for those messages.
2017-07-03 09:41:50 -07:00
Kubernetes Submit Queue eb2a560679 Merge pull request #48189 from mikedanese/fixds
Automatic merge from submit-queue

support NoSchedule taints correctly in DaemonSet controller

Fixes https://github.com/kubernetes/kubernetes/issues/48190
```release-note
Support NoSchedule taints correctly in DaemonSet controller.
```
cc @kubernetes/sig-apps-pr-reviews
2017-07-03 08:46:32 -07:00
deads2k 312fb1e1fa allow a deletestrategy to opt-out of GC 2017-07-03 11:27:45 -04:00
deads2k 3ee458d246 remove tpr API access 2017-07-03 11:25:59 -04:00
Xing Zhou 37f9e13025 Remove useless error 2017-07-03 14:59:54 +08:00
Kubernetes Submit Queue d026286d39 Merge pull request #48055 from yiqinguo/yiqinguo_remove_err_ignored
Automatic merge from submit-queue

Add err judgment

I do not think that the error can be ignored here.

**Release note**:
```release-note
NONE
```
2017-07-02 20:05:39 -07:00
Klaus Ma 549360cf91 Checked container spec when killing container. 2017-07-02 11:00:38 +08:00
JulienBalestra 9f37efcf7e Provide a way to setup the limit NO files for rkt Pods 2017-07-01 18:57:52 +02:00
Deyuan Deng c73b535d16 Fix kubectl describe for controllerRef 2017-07-01 18:45:23 +08:00
Klaus Ma ddfa04eaac Added case on 'terminated-but-not-yet-deleted' for Admit. 2017-07-01 15:51:03 +08:00
ymqytw 8dac9639e4 split util/slice 2017-06-30 23:04:18 -07:00
Kubernetes Submit Queue 5eccc7ae80 Merge pull request #48056 from luxas/kubeadm_remove_old_label
Automatic merge from submit-queue

Remove old node role label that is not used by kubeadm

**What this PR does / why we need it**:
This label hasn't been used by kubeadm since v1.5.
v1.5 support was dropped when v1.6 arrived due to a potential security flaw and the earlier alpha status.
So this label hasn't been used for around three months.
It makes sense to remove it in time for v1.8, could already have been done for v1.7

**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
```
@kubernetes/sig-cluster-lifecycle-pr-reviews
2017-06-30 22:06:23 -07:00
Kubernetes Submit Queue ed8993e3df Merge pull request #47944 from allencloud/fix-CopyStrings-and-ShuffleStrings-when-slice-is-nil
Automatic merge from submit-queue (batch tested with PRs 48264, 48324, 48125, 47944, 47489)

fix CopyStrings and ShuffleStrings for slice when slice is nil

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



**What this PR does / why we need it**:
This PR fixes two functions in util/slice.go, in which I think `CopyStrings` and `ShuffleStrings` miss one case. The case is input data is nil, in this case I think the data returned should be nil as well rather than a non-nil slice with 0 element.
In addition, I added some test code for this.
 
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
NONE, I did not raise a issue for this code. I ran into this when code learning.

**Special notes for your reviewer**:
NONE

**Release note**:

```release-note
NONE
```
2017-06-30 20:58:33 -07:00
Kubernetes Submit Queue faf4e57f1b Merge pull request #48125 from xiangpengzhao/downwardapi-poduid
Automatic merge from submit-queue (batch tested with PRs 48264, 48324, 48125, 47944, 47489)

Add Pod UID (metadata.uid) to downward API env var

**What this PR does / why we need it**:
Exposing Pod UID by downward API.

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

**Special notes for your reviewer**:
Generated files aren't committed. I'd like CI to tell me what scripts should I run to generate these files.

/cc @smarterclayton @vishh @dubstack

**Release note**:

```release-note
NONE
```
2017-06-30 20:58:31 -07:00
Kubernetes Submit Queue 4fe05d8191 Merge pull request #48264 from johscheuer/set-quota-for-volumes
Automatic merge from submit-queue (batch tested with PRs 48264, 48324, 48125, 47944, 47489)

Set quota for volumes

**What this PR does / why we need it**:
This PR allows users of the Quobyte Storage class to specify if automatically a Quota for the volume should be created. With a Quota a Quobyte volume can only grow in the specified size.

**Special notes for your reviewer**:
Update the Quobyte API version for the needed functionality.
2017-06-30 20:58:24 -07:00
Kubernetes Submit Queue 21038e362c Merge pull request #48313 from timstclair/lint
Automatic merge from submit-queue (batch tested with PRs 48317, 48313, 48351, 48357, 48115)

Cleanup lint errors in the pkg/kubelet/server/... directory

Cleanup some issues that were found while experimenting with https://github.com/alecthomas/gometalinter on the `pkg/kubelet/server/...` directories.
2017-06-30 19:54:26 -07:00
Kubernetes Submit Queue 73a94eac9e Merge pull request #48299 from mengqiy/kubectl_term
Automatic merge from submit-queue (batch tested with PRs 47918, 47964, 48151, 47881, 48299)

move term to kubectl/util

move term from pkg/util/term to pkg/kubectl/util/term

remove dependency of `k8s.io/kubernetes/pkg/util/term` for `pkg/kubelet/dockershim/exec.go` and `pkg/kubelet/dockershim/exec.go`

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

```release-note
NONE
```
/assign @apelisse @monopole 

cc: @pwittrock
2017-06-30 18:42:42 -07:00
Kubernetes Submit Queue c0337c92cc Merge pull request #47881 from cadmuxe/endpoint
Automatic merge from submit-queue (batch tested with PRs 47918, 47964, 48151, 47881, 48299)

Add ApiEndpoint support to GCE config.

**What this PR does / why we need it**:
Add the ability to change ApiEndpoint  for GCE.

**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-06-30 18:42:40 -07:00
Kubernetes Submit Queue 9a303eae7b Merge pull request #47964 from hasanatkazmi/master
Automatic merge from submit-queue (batch tested with PRs 47918, 47964, 48151, 47881, 48299)

removed 'Storage' option from 'kubectl top' like options

**What this PR does / why we need it**:
https://github.com/kubernetes/kubectl/issues/34

**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-06-30 18:42:37 -07:00
Kubernetes Submit Queue 57dddce815 Merge pull request #47918 from jiayingz/unit-test
Automatic merge from submit-queue (batch tested with PRs 47918, 47964, 48151, 47881, 48299)

Add unit test coverage for nvidiaGPUManager initialization

Part of #47750 

```release-note
NONE
```
2017-06-30 18:42:35 -07:00
Kubernetes Submit Queue 4b354d4877 Merge pull request #47058 from dcbw/remove-dead-kubelet-shaping
Automatic merge from submit-queue (batch tested with PRs 43558, 48261, 42376, 46803, 47058)

kubelet: remove unused bandwidth shaping teardown code

Since v1.5 and the removal of --configure-cbr0:

0800df74ab "Remove the legacy networking mode --configure-cbr0"

kubelet hasn't done any shaping operations internally.  They
have all been delegated to network plugins like kubenet or
external CNI plugins.  But some shaping code was still left
in kubelet, so remove it now that it's unused.

@freehan @thockin @bprashanth
2017-06-30 16:28:51 -07:00
Kubernetes Submit Queue 9c74026ffc Merge pull request #46803 from apelisse/new-download-openapi
Automatic merge from submit-queue (batch tested with PRs 43558, 48261, 42376, 46803, 47058)

OpenAPI downloads protobuf rather than Json

**What this PR does / why we need it**: 
The current implementation of the OpenAPI getter fetches the swagger in a Json format from the apiserver. The Json file is big (~1.7mb), which means that it takes a long time to download, and then a long time to parse. Because that is going to be needed on each `kubectl` run later, we want this to be as fast as possible.

The apiserver has been modified to be able to return a protobuf version of the swagger, which this patch intends to use.

Note that there is currently no piece of code that exists that allows us to go from the protobuf version of the file, back into Json and/or `spec.Swagger`. Because the protobuf is not very different (but significantly different enough that it can't be translated), I've updated the code to use `openapi_v2.Document` (the protobuf type) everywhere rather than `spec.Swagger`. The behavior should be identical though.

There are more changes that are coming in follow-up pull-requests: using the gzip version (also provided by the new apiserver) to even further reduce the size of the downloaded content, and use the HTTP Etag cache mechanism to completely get rid of recurrent fetch requests. I'm currently working on these two features.

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

**Special notes for your reviewer**:

**Release note**:
```release-note
NONE
```
2017-06-30 16:28:48 -07:00
Kubernetes Submit Queue 3854388987 Merge pull request #48261 from FengyunPan/fix-removeFinalizer
Automatic merge from submit-queue (batch tested with PRs 43558, 48261, 42376, 46803, 47058)

Fix removing finalizer for garbage collector

The loop should use 'continue' not 'break', otherwise removeFinalizer()
not only removes "orphaningFinalizer" from its finalizers list but
also removes others.

Fix #48363

**Release note**:
```release-note
NONE
```
2017-06-30 16:28:43 -07:00
ymqytw f0ce897277 move term to kubectl/util 2017-06-30 15:00:24 -07:00
Kubernetes Submit Queue 903a4541ba Merge pull request #48298 from mengqiy/kubectl_crlf
Automatic merge from submit-queue (batch tested with PRs 48295, 48298, 47339, 44910, 48037)

move crlf to kubectl/util

move crlf from pkg/util/crlf to pkg/kubectl/util/crlf

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

```release-note
NONE
```
/assign @apelisse @monopole 

cc: @pwittrock
2017-06-30 14:34:26 -07:00
Kubernetes Submit Queue 3dcd3089f8 Merge pull request #48295 from mengqiy/kubectl_util
Automatic merge from submit-queue (batch tested with PRs 48295, 48298, 47339, 44910, 48037)

eliminate kubectl dependency on k8s.io/kubernetes/pkg/util

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

/assign @apelisse @monopole 

cc: @pwittrock 
```release-note
NONE
```
2017-06-30 14:34:24 -07:00
Dan Williams 36a54bd5a4 kubelet: remove NET_PLUGIN_CAPABILITY_SHAPING
This was effectively unused with v1.5 and later when kubelet stopped
doing internal shaping and delegated all shaping to plugins.
2017-06-30 11:51:22 -05:00
Dan Williams 5b8ad3f7c5 kubelet: remove unused bandwidth shaping teardown code
Since v1.5 and the removal of --configure-cbr0:

0800df74ab "Remove the legacy networking mode --configure-cbr0"

kubelet hasn't done any shaping operations internally.  They
have all been delegated to network plugins like kubenet or
external CNI plugins.  But some shaping code was still left
in kubelet, so remove it now that it's unused.
2017-06-30 11:51:22 -05:00
FengyunPan 643afd3ffc Fix deleting empty monitors
Fix #48094
When create-monitor of cloud-config is false, pool has not monitor
and can not delete empty monitor.
2017-06-30 23:46:36 +08:00
deads2k 0939602ca6 don't accept delete tokens that are waiting to be reaped 2017-06-30 09:22:36 -04:00
Kubernetes Submit Queue e74ef81622 Merge pull request #47284 from xiangpengzhao/fix-dup-targetport
Automatic merge from submit-queue

Validate if service has duplicate targetPort

**What this PR does / why we need it**:
Validate if a service has dup targetport

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

**Special notes for your reviewer**:
/cc @thockin 
@kubernetes/sig-network-pr-reviews

**Release note**:

```release-note
NONE
```
2017-06-30 02:50:49 -07:00
Mikhail Mazurskiy dc1ee493a2
Refactor unstructured converter 2017-06-30 09:35:14 +10:00
Kubernetes Submit Queue 956acc2bd8 Merge pull request #47643 from CaoShuFeng/golang.org/x/exp/inotify
Automatic merge from submit-queue (batch tested with PRs 46336, 47643)

Fix invalid filename in kubelet log

Fixes: https://github.com/kubernetes/kubernetes/issues/47641
**Release note**:

```
NONE
```
2017-06-29 16:20:32 -07:00
Tim St. Clair e9795e3742
Cleanup lint errors in the pkg/kubelet/server/... directory 2017-06-29 15:58:07 -07:00
ymqytw 2510a47374 move crlf to kubectl/util 2017-06-29 15:48:41 -07:00
Kubernetes Submit Queue fcf6eea71c Merge pull request #47250 from xiangpengzhao/fix-headless
Automatic merge from submit-queue (batch tested with PRs 47850, 47835, 46197, 47250, 48284)

Populate endpoints for headless service with no ports

**What this PR does / why we need it**:
- populate endpoints with headless service (thanks @fraenkel for the original PR!)
- allow ports with headless service
- nits

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

**Special notes for your reviewer**:
/cc @thockin @fraenkel 
**Release note**:

```release-note
NONE
```
2017-06-29 15:16:44 -07:00
Kubernetes Submit Queue cc4b3cc7f5 Merge pull request #46197 from xiangpengzhao/fix-allocate-clusterip
Automatic merge from submit-queue (batch tested with PRs 47850, 47835, 46197, 47250, 48284)

Allocate clusterIP when change service type from ExternalName to ClusterIP

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

**Special notes for your reviewer**:
/cc @smarterclayton @thockin 

**Release note**:

```release-note
NONE
```
2017-06-29 15:16:42 -07:00
Kubernetes Submit Queue 1cca341b17 Merge pull request #47850 from dcbw/checkpoint-hostnetwork
Automatic merge from submit-queue (batch tested with PRs 47850, 47835, 46197, 47250, 48284)

dockershim: checkpoint HostNetwork property

To ensure kubelet doesn't attempt network teardown on HostNetwork
containers that no longer exist but are still checkpointed, make
sure we preserve the HostNetwork property in checkpoints.  If
the checkpoint indicates the container was a HostNetwork one,
don't tear down the network since that would fail anyway.

Related: https://github.com/kubernetes/kubernetes/issues/44307#issuecomment-299548609

@freehan @kubernetes/sig-network-misc
2017-06-29 15:16:37 -07:00
ymqytw 6660726ce6 eliminate kubectl dependency on k8s.io/kubernetes/pkg/util 2017-06-29 14:49:51 -07:00
Kubernetes Submit Queue ad077c4ccb Merge pull request #47619 from mtanino/iscsi-remove-redundant-nil-check
Automatic merge from submit-queue (batch tested with PRs 47619, 47951, 46260, 48277)

iSCSi plugin: Remove redundant nil check

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

This patch is for cleanup of redundant nil check in iSCSI plugin.
This was mentioned at the code review on origin github thread.

https://github.com/openshift/origin/pull/14565

**Which issue this PR fixes** 

**Special notes for your reviewer**:

**Release note**:

```
NONE
```
2017-06-29 14:05:24 -07:00
Koonwah Chen 0db5b37165 testing fixed
hack/verify-gofmt.sh and hack/verify-flags-underscore.py
2017-06-29 10:42:29 -07:00
Jiaying Zhang fee83f65d4 Add unit test coverage for nvidiaGPUManager initialization
Part of #47750

```release-note
NONE
```
2017-06-29 10:17:05 -07:00
FengyunPan 468b97a746 Update comment for garbagecollector 2017-06-29 21:42:47 +08:00
Johannes Scheuermann e631550ef3 Make the Quota creation optional 2017-06-29 13:12:24 +02:00
Kubernetes Submit Queue c9ad8dcde0 Merge pull request #47900 from yiqinguo/yiqinguo_add_type_judgment
Automatic merge from submit-queue

Add type conversion judgment

If do not type conversion judgment, there may be panic.

**Release note**:
```release-note
NONE
```
2017-06-29 04:00:18 -07:00
FengyunPan 23a90a7679 Fix removing finalizer for garbage collector
The loop should use 'continue' not 'break', otherwise removeFinalizer()
not only removes "orphaningFinalizer" from its finalizers list but
also removes others.
2017-06-29 17:22:03 +08:00
Mike Danese 8e6c2ea4d0 support NoExecute and NoSchedule taints correctly in DaemonSet controller
And add some unit tests.
2017-06-29 10:16:36 +02:00
Mike Danese 1aede99aba fix #45780 slightly differently 2017-06-29 10:16:36 +02:00
Mike Danese d462b4cbc8 Partially revert "Do not fire InsufficientResourceError when there are intentional reasons."
This partially reverts commit 2b311fefba.
We drop the changes to the DaemonSet controller but leave the test. By
reverting the changes, we make it easier to return different values of
shouldContinueRunning for intentional predicate failures, rather then
lumping all intentional predicate failures together. The test should
continue to pass after the fix.
2017-06-29 10:16:36 +02:00
Johannes Scheuermann 6a88a03d59 Set a Quobyte quota for newly created volumes 2017-06-29 09:21:58 +02:00
Kubernetes Submit Queue 343d751bc5 Merge pull request #47729 from paultyng/pt/useragent
Automatic merge from submit-queue (batch tested with PRs 47286, 47729)

Set default User-Agent on http probe

**Set a default User-Agent on `httpGet` probes**:

Currently the default Go HTTP client sets a `User-Agent` specific to the language and version, but every Go client has the same one.  In Kubernetes, users can override the User-Agent by setting a header in their probe definition, but its tedious to do this everywhere.

This PR changes the default User-Agent only if not set (or removed) in the probe definition.

**Which issue this PR fixes** 
fixes #29025

**Special notes for your reviewer**:

**Release note**:

```release-note
Change default `httpGet` probe `User-Agent` to `kube-probe/<version major.minor>` if none specified, overriding the default Go `User-Agent`.
```
2017-06-28 23:14:31 -07:00
Kubernetes Submit Queue db46e4f8e6 Merge pull request #47286 from cosmincojocar/client_cert_azure_cloud_provider
Automatic merge from submit-queue (batch tested with PRs 47286, 47729)

Add client certificate authentication to Azure cloud provider

This adds support for client cert authentication in Azure cloud provider. The certificate can be provided in PKCS #12 format with password protection. Not that this authentication will be active only when no client secret is configured.

cc @brendandburns @colemickens
2017-06-28 23:14:29 -07:00
Kubernetes Submit Queue 3b35696460 Merge pull request #48137 from danwinship/utiltests
Automatic merge from submit-queue

fixes to two pkg/util unit tests

Spun out from #46537. Trivial unit test fixes:
- `pkg/util/ebtables/ebtables_test.go`'s tests are incorrectly named and so weren't getting run by "go test". (And one of them had a typo in it so it failed after the name was fixed)
- In `pkg/util/iptables/iptables_test.go`, the deletion tests were apparently written by copying+pasting+editing the creation tests, but they forgot to change the names of the tests to match the behavior that was being tested in the new version
2017-06-28 21:55:48 -07:00
allencloud 2e79f6c61a remove unused codes in loadSystemLanguage
Signed-off-by: allencloud <allen.sun@daocloud.io>
2017-06-29 12:18:11 +08:00
xiangpengzhao 53c536b59c
Implement GetCapacity in container_manager_unsupported 2017-06-29 10:22:57 +08:00
Kubernetes Submit Queue b697222103 Merge pull request #47827 from yiqinguo/yiqinguo_repeat_type_coversions
Automatic merge from submit-queue

Remove repeat type conversions

Here is the type of conversion for the variable is repeated.

**Release note**:
```release-note
NONE
```
2017-06-28 18:21:46 -07:00