Commit Graph

52532 Commits (ec397c4374f3e5d99f6ca8ee79892e1f0d9d8d38)

Author SHA1 Message Date
deads2k ec397c4374 convert default predicates to use the default 2017-08-07 09:05:17 -04:00
Kubernetes Submit Queue dbc81febc1 Merge pull request #50184 from jinzhejz/jinzhejz_typo
Automatic merge from submit-queue

fix typo in replenishment_controller.go

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

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

**Release note**:
```release-note
None
```
2017-08-07 05:52:19 -07:00
Kubernetes Submit Queue 654de23cbf Merge pull request #50145 from gmarek/micro-equality
Automatic merge from submit-queue (batch tested with PRs 49868, 50143, 49377, 50141, 50145)

Add MicroTime to DeepEquals overrides
2017-08-07 04:05:02 -07:00
Kubernetes Submit Queue 7deb3b29cd Merge pull request #50141 from gmarek/verify
Automatic merge from submit-queue (batch tested with PRs 49868, 50143, 49377, 50141, 50145)

Don't expect internal clientset to be generated for groups without ne…

…w types
2017-08-07 04:04:59 -07:00
Kubernetes Submit Queue a0826e1d89 Merge pull request #49377 from CaoShuFeng/audit_id_http_response_header
Automatic merge from submit-queue (batch tested with PRs 49868, 50143, 49377, 50141, 50145)

Return Audit-Id http response header for trouble shooting

Users can use Audit-Id http response header to grep the audit events in log.
This provides a fast way to find the events in audit.
**Release note**:

```
Audit-Id HTTP header is included in the apiserver responses for audited requests, except some cases when it's not possible, e.g. pods/exec.
```
@sttts @tallclair
2017-08-07 04:04:57 -07:00
Kubernetes Submit Queue 293ab0f855 Merge pull request #50143 from gmarek/microtime
Automatic merge from submit-queue (batch tested with PRs 49868, 50143, 49377, 50141, 50145)

Add metav1.MicroTime to exceptions in tag tests
2017-08-07 04:04:55 -07:00
Kubernetes Submit Queue fb661268ff Merge pull request #49868 from shiywang/testlog
Automatic merge from submit-queue (batch tested with PRs 49868, 50143, 49377, 50141, 50145)

Status objects for 404 API errors will have the correct APIVersion

Fixes https://github.com/kubernetes/kubernetes/issues/48959
superseded https://github.com/kubernetes/kubernetes/pull/49183


```release-note 
Status objects for 404 API errors will have the correct APIVersion
```
2017-08-07 04:04:53 -07:00
Kubernetes Submit Queue bc7ccfe93b Merge pull request #50106 from julia-stripe/improve-scheduler-error-handling
Automatic merge from submit-queue

Retry scheduling pods after errors more consistently in scheduler

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

This fixes 2 places in the scheduler where pods can get stuck in Pending forever.  In both these places, errors happen and `sched.config.Error` is not called afterwards. This is a problem because `sched.config.Error` is responsible for requeuing pods to retry scheduling when there are issues (see [here](2540b333b2/plugin/pkg/scheduler/factory/factory.go (L958))), so if we don't call `sched.config.Error` then the pod will never get scheduled (unless the scheduler is restarted).

One of these (where it returns when `ForgetPod` fails instead of continuing and reporting an error) is a regression from [this refactor](https://github.com/kubernetes/kubernetes/commit/ecb962e6585#diff-67f2b61521299ca8d8687b0933bbfb19L234), and with the [old behavior](80f26fa8a8/plugin/pkg/scheduler/scheduler.go (L233-L237)) the error was reported correctly. As far as I can tell changing the error handling in that refactor wasn't intentional.

When AssumePod fails there's never been an error reported but I think adding this will help the scheduler recover when something goes wrong instead of letting pods possibly never get scheduled.

This will help prevent issues like https://github.com/kubernetes/kubernetes/issues/49314 in the future.

**Release note**:

```release-note
Fix incorrect retry logic in scheduler
```
2017-08-07 01:35:17 -07:00
Shiyang Wang 2eda19da7b Fix NotFound errors do not line up with API endpoint's group version 2017-08-07 16:30:40 +08:00
Kubernetes Submit Queue c75d3028dd Merge pull request #50159 from liggitt/includeObject
Automatic merge from submit-queue

Fix includeObject parameter parsing

Fixes #50149
2017-08-06 22:49:09 -07:00
Kubernetes Submit Queue ae4fac416d Merge pull request #49481 from jianglingxia/jlx72417
Automatic merge from submit-queue (batch tested with PRs 49370, 49481)

continue Fix error format and info for get_test.go

**What this PR does / why we need it**:
continue fix the error info 
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #49441 

**Special notes for your reviewer**:

**Release note**:

```release-note
    NONE
2017-08-06 08:52:56 -07:00
Kubernetes Submit Queue 979c86f3dd Merge pull request #49370 from sttts/sttts-no-clientset-embedding
Automatic merge from submit-queue (batch tested with PRs 49370, 49481)

client-gen: stop embedding of GroupVersion client intfs

It is undefined (or at least uncontrollable) which methods of the clientset apigroup
interfaces are actually inherited. Moreover, there might be nameconflicts between the
accessors and inherited methods. This PR removes the embedding to make it unambiguous.

```release-note
Enforce explicit references to API group client interfaces in clientsets to avoid ambiguity.
```
2017-08-06 08:52:54 -07:00
Kubernetes Submit Queue 702e506a69 Merge pull request #46687 from zjj2wry/delete_unuse_error
Automatic merge from submit-queue

Delete unuse err check

**What this PR does / why we need it**:
err has fatal, this err check  can't execute.

**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**:
thank you ~

**Release note**:

```release-note
NONE
```
2017-08-06 07:32:11 -07:00
Dr. Stefan Schimanski 3b310d8989 Update generated code 2017-08-06 15:32:28 +02:00
Dr. Stefan Schimanski 83895daed1 Fix printer hack to get a versioned client 2017-08-06 15:30:13 +02:00
Dr. Stefan Schimanski 1910b5a1dd Fix code implicitly casting clientsets to getters 2017-08-06 15:30:13 +02:00
Dr. Stefan Schimanski 25f2b0a2c1 client-gen: stop embedding of GroupVersion client intfs 2017-08-06 15:30:13 +02:00
Kubernetes Submit Queue 5490273951 Merge pull request #48553 from superbrothers/fix-kubectl-42
Automatic merge from submit-queue

Fix a bug that --flag=val causes completion error in zsh

**What this PR does / why we need it**:
This PR fixes a bug that flag of syntax like --flag=val causes completion error in zsh.

```
kubectl --namespace=foo g__handle_flag:25: bad math expression: operand expected at end of string
```

This problem is due to [dynamic scope](https://en.wikipedia.org/wiki/Scope_(computer_science)#Dynamic_scoping) of shell variables. If a variable is declared as local to a function, that scope remains until the function returns.

In kubectl completion zsh, `declare -A flaghash` in __start_kubectl() is replaced with `__kubectl_declare -A flaghash` by __kubectl_convert_bash_to_zsh(). As a result of it, flaghash is declared in __kubectl_declare(), and it can not access to flaghash declared in __kubectl_declare() from __handle_flag(). Therefore an error occurs in __handle_flag().

The following is the minimum reproduction code.

```sh
#!/usr/bin/env zsh

set -e

__kubectl_declare() {
    builtin declare "$@"
}

__handle_flag() {
    local flagname="--namespace="
    local flagval="kube-system"

    flaghash[${flagname}]=${flagval}

    echo "flaghash[${flagname}]=${flaghash[${flagname}]}"
}

__handle_word() {
    __handle_flag
}

__start_kubectl() {
    __kubectl_declare -A flaghash

    __handle_word
}

__start_kubectl

#
# $ zsh reproduction.zsh
# __handle_flag:4: bad math expression: operand expected at end of string
#

# __start_kubectl {
#
#     __kubectl_declare {
#
#         builtin declare -A flaghash
#
#     }
#
#     __handle_word {
#
#         __handle_flag {
#
#             # It is unable to access flaghash declared in __kubectl_declare from here
#             flaghash[${flagname}]=${flagval}
#
#         }
#
#     }
# }
```

The following is the fixed code.
```sh
#!/usr/bin/env zsh

set -e

__handle_flag() {
    local flagname="--namespace="
    local flagval="kube-system"

    flaghash[${flagname}]=${flagval}

    echo "flaghash[${flagname}]=${flaghash[${flagname}]}"
}

__handle_word() {
    __handle_flag
}

__start_kubectl() {
    builtin declare -A flaghash

    __handle_word
}

__start_kubectl

#
# $ zsh fixed.zsh
# flaghash[--namespace=]=kube-system
#

# __start_kubectl {
#
#     builtin declare -A flaghash
#
#     __handle_word {
#
#         __handle_flag {
#
#             # It is able to access flaghash declared in __start_kubectl from here :)
#             flaghash[${flagname}]=${flagval}
#
#         }
#
#     }
# }
```
https://gist.github.com/superbrothers/0ede4292f6d973f93e54368e227a4902

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

**Special notes for your reviewer**:
@mengqiy

**Release note**:

```release-note
NONE
```
2017-08-06 02:45:49 -07:00
Kubernetes Submit Queue 9a277fba7d Merge pull request #50071 from xiangpengzhao/fix-des-svc
Automatic merge from submit-queue

Display healthcheck nodeport and other fields in describe service

**What this PR does / why we need it**:
Some fields such as `HealthCheckNodePort` are not displayed currently. This PR fixes it.

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

**Special notes for your reviewer**:
/sig cli network

**Release note**:

```release-note
NONE
```
2017-08-05 20:53:19 -07:00
Kubernetes Submit Queue f75f49e7a0 Merge pull request #49915 from caesarxuchao/controller-ignore-initialize-timeout
Automatic merge from submit-queue (batch tested with PRs 49855, 49915)

Let controllers ignore initialization timeout when creating pods

Partially address https://github.com/kubernetes/kubernetes/issues/48893#issuecomment-318540129.

This only updates the controllers that create pods with `GenerateName`.

The controllers ignore the timeout error when creating the pods, depending on how the initialization progress:
* If the initialization is successful in less than 5 mins, the controller will observe the creation via the informer. All is good.
* If the initialization fails, server will delete the pod, but the controller won't receive any event. The controller will not create new pod until the Creation expectation expires in 5 min.
* If the initialization takes too long (> 5 mins), the Creation expectation expires and the controller will create extra pods.

I'll send follow-up PRs to fix the latter two cases, e.g., by refactoring the sharedInformer.
2017-08-05 19:07:53 -07:00
Kubernetes Submit Queue e2baa8e11c Merge pull request #49855 from zouyee/kiq
Automatic merge from submit-queue (batch tested with PRs 49855, 49915)

update dashboard image version

fix https://github.com/kubernetes/kubernetes/issues/50195
**What this PR does / why we need it:**
Updates dashboard addon to latest version. Changelog can be found [here](https://github.com/kubernetes/dashboard/releases/tag/v1.6.3).

**Release note:**
```
Update dashboard version to v1.6.3
```
2017-08-05 19:07:50 -07:00
Kubernetes Submit Queue 48415c01e1 Merge pull request #49419 from fabriziopandini/kubeadm-phase-kubeconfig2
Automatic merge from submit-queue

kubeadm: Implementing the kubeconfig phase fully

**What this PR does / why we need it:**
This contains implementation of kubeconfig phases in kubeadm, which is part of the wider effort of implementing phases in kubeadm, previously in alpha stage.

The original proposal for this activity can be found [here](https://github.com/kubernetes/kubeadm/pull/156/files) and related comments.

Kubeadm phase implementation checklist is defined [here](https://github.com/kubernetes/kubeadm/issues/267)

Common implementation guidelines and principles for all phases are defined [here](https://docs.google.com/document/d/1VQMyFIVMfRGQPP3oCUpfjiWtOr3pLxp4g7cP-hXQFXc/edit?usp=sharing)

This PR implements:

- [x] kubeadm phase kubeconfig
  - [x] kubeadm phase kubeconfig all
  - [x] kubeadm phase kubeconfig admin
  - [x] kubeadm phase kubeconfig kubelet
  - [x] kubeadm phase kubeconfig scheduler
  - [x] kubeadm phase kubeconfig controller-manager
  - [x] kubeadm phase kubeconfig user

**Which issue this PR fixes:**
https://github.com/kubernetes/kubeadm/issues/350

**Special notes for your reviewer:**

This PR implements the second phases of kubeadm init; implementation of this PR follow the same approach already used for #48196 (cert phases).

Please note that:
- the API - phase\kubeconfig.go - is now totally free by any UX concerns, and implements only the core logic for kubeconfig generation.
- the UX - cmd\phase\kubeconfig.go - now takes charge of UX commands and kubeadm own's rules for kubeconfig files in /etc/kubernetes folder (e.g. create only if not already exists)
- The PR includes also a fix for a regression on a unit test for phase certs introduced by #48594 and few minor code changes in phase certs introduced to avoid code duplication between the two phases.
2017-08-05 16:34:42 -07:00
Kubernetes Submit Queue 44b0e1080d Merge pull request #50045 from ixdy/test-images-port-forward-tester
Automatic merge from submit-queue

Fix typo in test/images/port-forward-tester/Makefile

**What this PR does / why we need it**: the image build fails due to this typo:
```console
$ make WHAT=port-forward-tester
./image-util.sh build port-forward-tester
Building image for port-forward-tester ARCH: ppc64le...
make[1]: Entering directory '[home]/src/k8s.io/kubernetes/test/images/port-forward-tester'
../image-util.sh bin
../image-util.sh: line 22: $2: unbound variable
```

Images already pushed.

**Release note**:

```release-note
NONE
```

/approve no-issue
/assign @mkumatag
2017-08-05 15:21:17 -07:00
Kubernetes Submit Queue de7e661aac Merge pull request #50197 from mbssaiakhil/patch-5
Automatic merge from submit-queue

Fix typos and grammatical errors in comments and variables
2017-08-05 15:21:10 -07:00
Malepati Bala Siva Sai Akhil 0c548ea482 Fix typo in variable of remote
Fix typo in variable of remote_runtime.go
2017-08-06 01:05:34 +05:30
Malepati Bala Siva Sai Akhil 84844bb6d6 Fixed typo in rkt
Fixed typo in rkt
2017-08-06 01:05:14 +05:30
Malepati Bala Siva Sai Akhil ee82de565a Fixed typo in comment in eviction_manager
Fixed typo in comment in eviction_manager
2017-08-06 01:04:41 +05:30
Kubernetes Submit Queue eea9045a3d Merge pull request #50052 from foxyriver/clean-install
Automatic merge from submit-queue (batch tested with PRs 49805, 50052)

remove the temporary file to make the hyperkube image smaller

Remove the temporary file after apt-get install to make the hyperkube image smaller.
2017-08-05 12:33:01 -07:00
Kubernetes Submit Queue 207a95a076 Merge pull request #49805 from nbutton23/nbutton-fix-elb-sg-bug
Automatic merge from submit-queue (batch tested with PRs 49805, 50052)

We never want to modify the globally defined SG for ELBs

**What this PR does / why we need it**:
Fixes a bug where creating or updating an ELB will modify a globally defined security group

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

**Special notes for your reviewer**:

**Release note**:

```release-note
fixes a bug around using the Global config ElbSecurityGroup where Kuberentes would modify the passed in Security Group.
```
2017-08-05 12:32:59 -07:00
Malepati Bala Siva Sai Akhil 83603f0358 Fix typo in comment
Fix typo in comment in garbagecollector
2017-08-05 22:47:48 +05:30
Kubernetes Submit Queue 259d7d7bcb Merge pull request #50194 from mbssaiakhil/patch-3
Automatic merge from submit-queue

Fix typo in certificate
2017-08-05 09:32:11 -07:00
Malepati Bala Siva Sai Akhil f90a825308 Fix typo in certificate 2017-08-05 20:50:56 +05:30
fabriziopandini f9f91bf18e fully implement kubeadm-phase-kubeconfig 2017-08-05 16:44:39 +02:00
Kubernetes Submit Queue b6ff77eecf Merge pull request #50134 from m1093782566/fed-controller
Automatic merge from submit-queue

fix typos in federation-controller

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

fix some typos in federation-controller.

**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-08-05 07:16:16 -07:00
Kubernetes Submit Queue 0b9aa05633 Merge pull request #48141 from ankon/patch-2
Automatic merge from submit-queue

Fix typo

**What this PR does / why we need it**: Fix trivial typo in comment.
2017-08-05 06:12:57 -07:00
Kubernetes Submit Queue 70b4db2023 Merge pull request #50082 from crassirostris/cleanup-fluentd-es
Automatic merge from submit-queue (batch tested with PRs 48532, 50054, 50082)

Refactored the fluentd-es addon

Refactor fluentd-elasticsearch addon:

- Decrease the number of files by moving RBAC-related objects in the same files where they're used
- Move the fluentd configuration out of the image
- Don't use PVC to avoid leaking resources in e2e tests
- Fluentd now ingest docker and kubelet logs that are written to journald
- Disable X-Pack, because it's not free

Fixes https://github.com/kubernetes/kubernetes/issues/41462
Fixes https://github.com/kubernetes/kubernetes/issues/49816
Fixes https://github.com/kubernetes/kubernetes/issues/48973
Fixes https://github.com/kubernetes/kubernetes/issues/49450

@aknuds1 @coffeepac Could you please take a look?

```release-note
Fluentd DaemonSet in the fluentd-elasticsearch addon is configured via ConfigMap and includes journald plugin
Elasticsearch StatefulSet in the fluentd-elasticsearch addon uses local storage instead of PVC by default
```
2017-08-05 05:14:03 -07:00
Kubernetes Submit Queue 40b4f77ab4 Merge pull request #50054 from msau42/e2e-cleanup
Automatic merge from submit-queue (batch tested with PRs 48532, 50054, 50082)

Remove [k8s.io] tag and redundant [sig-storage] tags from volume tests

**What this PR does / why we need it**:
Removes redundant tags from storage e2e test names

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

**Release note**:
/release-note-none
2017-08-05 05:14:01 -07:00
Kubernetes Submit Queue 2f6664e590 Merge pull request #48532 from YuxiJin-tobeyjin/e2ekubectl
Automatic merge from submit-queue (batch tested with PRs 48532, 50054, 50082)

  Correcting two spelling mistakes

**What this PR does / why we need it**:
  Correcting two spelling mistakes.
**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**:
NONE
```release-note
```
2017-08-05 05:13:59 -07:00
Kubernetes Submit Queue bb99ccc178 Merge pull request #50162 from luxas/kubeadm_clientset_iface
Automatic merge from submit-queue (batch tested with PRs 47416, 47408, 49697, 49860, 50162)

kubeadm: Replace *clientset.Clientset with clientset.Interface

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

Needed for https://github.com/kubernetes/kubernetes/pull/48899
We should always use `clientset.Interface` instead of `*clientset.Clientset`, for better testability and all the other benefits of using an interface.

**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**:
Should be straightforward to merge

**Release note**:

```release-note
NONE
```
@timothysc @dmmcquay @pipejakob
2017-08-05 03:23:01 -07:00
Kubernetes Submit Queue ec424949c9 Merge pull request #49860 from zhangxiaoyu-zidif/fix-error-print-for-cronjob-utils-test
Automatic merge from submit-queue (batch tested with PRs 47416, 47408, 49697, 49860, 50162)

fix error message for cronjob

**What this PR does / why we need it**:
fix error message for cronjob
expected an error would be better than unexpected lack of error.
ref: https://github.com/kubernetes/kubernetes/blob/master/cmd/genutils/genutils_test.go#L33

**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-08-05 03:22:59 -07:00
Kubernetes Submit Queue c3f4dba513 Merge pull request #49697 from zetaab/mfloating
Automatic merge from submit-queue (batch tested with PRs 47416, 47408, 49697, 49860, 50162)

add possibility to use multiple floatingip pools in openstack loadbalancer

**What this PR does / why we need it**: Currently only one floating pool is supported in kubernetes openstack cloud provider. It is quite big issue for us, because we want run only single kubernetes cluster, but we want that external and internal services can be used. It means that we need possibility to create services with internal and external pools.

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

**Special notes for your reviewer**: service labels is not maybe correct place to define this floatingpool id. However, I did not find any better place easily. I do not want start modifying service api structure.

**Release note**:
```release-note
Add possibility to use multiple floatingip pools in openstack loadbalancer
```

Example how it works:
```
cat /etc/kubernetes/cloud-config
[Global]
auth-url=https://xxxx
username=xxxx
password=xxxx
region=yyy
tenant-id=b23efb65b1d44b5abd561511f40c565d
domain-name=foobar

[LoadBalancer]
lb-version=v2
subnet-id=aed26269-cd01-4d4e-b0d8-9ec726c4c2ba
lb-method=ROUND_ROBIN
floating-network-id=56e523e7-76cb-477f-80e4-2dc8cf32e3b4
create-monitor=yes
monitor-delay=10s
monitor-timeout=2000s
monitor-max-retries=3
```
```
apiVersion: apps/v1beta1
kind: Deployment
metadata:
  name: nginx-deployment
spec:
  replicas: 1
  template:
    metadata:
      labels:
        run: web
    spec:
      containers:
      - name: nginx
        image: nginx
        ports:
        - containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
  labels:
    run: web-ext
  name: web-ext
  namespace: default
spec:
  selector:
    run: web
  ports:
  - port: 80
    name: https
    protocol: TCP
    targetPort: 80
  type: LoadBalancer
---
apiVersion: v1
kind: Service
metadata:
  labels:
    run: web-int
    floatingPool: a2a84887-4915-42bf-aaff-2b76688a4ec7
  name: web-int
  namespace: default
spec:
  selector:
    run: web
  ports:
  - port: 80
    name: https
    protocol: TCP
    targetPort: 80
  type: LoadBalancer
```
```
% kubectl create -f example.yaml
deployment "nginx-deployment" created
service "web-ext" created
service "web-int" created
% kubectl get svc -o wide
NAME         CLUSTER-IP       EXTERNAL-IP                   PORT(S)        AGE       SELECTOR
kubernetes   10.254.0.1       <none>                        443/TCP        2m        <none>
web-ext      10.254.23.153    192.168.1.57,193.xx.xxx.xxx   80:30151/TCP   52s       run=web
web-int      10.254.128.141   192.168.1.58,10.222.130.80    80:32431/TCP   52s       run=web
```

cc @anguslees @k8s-sig-openstack-feature-requests @dims
2017-08-05 03:22:57 -07:00
Kubernetes Submit Queue fa5877de18 Merge pull request #47408 from shiywang/follow-go-code-style
Automatic merge from submit-queue (batch tested with PRs 47416, 47408, 49697, 49860, 50162)

follow our go code style: error->err

Fixes https://github.com/kubernetes/kubernetes/issues/50189
```release-note
NONE
```
2017-08-05 03:22:54 -07:00
Kubernetes Submit Queue 58819b0204 Merge pull request #47416 from allencloud/simplify-if-else
Automatic merge from submit-queue

simplify if and else for code

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

**What this PR does / why we need it**:
This PR tries to simplify the code of if and else, and this could make code a little bit cleaner.

**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-08-05 03:10:10 -07:00
Kubernetes Submit Queue 8d6bbaa85f Merge pull request #49678 from smarterclayton/429_metric
Automatic merge from submit-queue

Timeout and Max-in-flight don't report non-resource URLs correctly.

Unify error reporting for 429 and 504 to be correct for timeout and max in flight and eviction. Add better messages to eviction (removing a todo). Return the correct body content for timeouts (reason and code should be correct).

This potentially increases cardinality of 429, but because non-api urls may be under the max-inflight budget we need to report them somewhere (if something breaks and starts fetching API versions endlessly).

```release-note
The 504 timeout error was returning a JSON error body that indicated it was a 500.  The body contents now correctly report a 500 error.
```
2017-08-05 01:28:00 -07:00
Kubernetes Submit Queue 94abce7c2d Merge pull request #49700 from wanghaoran1988/convert_to_table_printer
Automatic merge from submit-queue (batch tested with PRs 48487, 49009, 49862, 49843, 49700)

Add some table printers
2017-08-04 23:40:10 -07:00
Kubernetes Submit Queue deb5c77ce1 Merge pull request #49843 from alrs/kubectl-rolling_updater-swallowed-error
Automatic merge from submit-queue (batch tested with PRs 48487, 49009, 49862, 49843, 49700)

fix swallowed error in kubectl rolling_updater

This fixes a swallowed error in kubectl. 

AddDeploymentKeyToReplicationController() is already tested, but there was an error that was not being exposed.

```release-note
NONE
```
2017-08-04 23:40:07 -07:00
Kubernetes Submit Queue eeb72d7892 Merge pull request #49862 from dixudx/kubectl_run_labels
Automatic merge from submit-queue (batch tested with PRs 48487, 49009, 49862, 49843, 49700)

add label examples for kubectl run

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

Add `--labels` examples for kubectl run

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

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

**Release note**:

```release-note
add examples for kubectl run --labels
```
2017-08-04 23:40:05 -07:00
Kubernetes Submit Queue 361079af43 Merge pull request #49009 from x13n/fluentd
Automatic merge from submit-queue (batch tested with PRs 48487, 49009, 49862, 49843, 49700)

Enable overriding fluentd resources in GCP

**What this PR does / why we need it**: This enables overriding fluentd resources in GCP, when there is a need for custom ones.

**Release note**:

```release-note
NONE
```
2017-08-04 23:40:02 -07:00
Kubernetes Submit Queue 7c9ba69617 Merge pull request #48487 from dixudx/validate_cadvisor_rootpath
Automatic merge from submit-queue (batch tested with PRs 48487, 49009, 49862, 49843, 49700)

validate cadvisor rootpath

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

When working on issue #48452, I found [KubeletConfiguration.RootDirectory](https://github.com/kubernetes/kubernetes/blob/master/cmd/kubelet/app/server.go#L525) was never been validated. The default value is set to ["/var/lib/kubelet"](https://github.com/kubernetes/kubernetes/blob/master/pkg/apis/componentconfig/v1alpha1/defaults.go#L342).

If this directory does not exist in the file system, the [cadvisor.manager](https://github.com/kubernetes/kubernetes/blob/master/vendor/github.com/google/cadvisor/manager/manager.go#L679) will fail to gather the information for metrics.

> error trying to get filesystem Device for dir /var/lib/kubelet: err: stat failed on /var/lib/kubelet with error: 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**:

/cc @feiskyer @k82cn

**Release note**:

```release-note
validate cadvisor rootpath
```
2017-08-04 23:40:00 -07:00
Kubernetes Submit Queue fc89743dca Merge pull request #47353 from apelisse/http-cache
Automatic merge from submit-queue

go-client: Use httpcache client for all requests, even though only openapi returns ETags for caching

**What this PR does / why we need it**: Use HTTP ETag for caching Swagger spec download

This also adds a new command-line flag "cachedir" to specify where the cache should keep its file. It defaults to `$HOME/.kube/http-cache`.

**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**:
Because this adds a bunch of dependencies, and removes a couple of files, I do recommend reading each commit individually.

**Release note**:
```release-note
```
2017-08-04 21:02:50 -07:00