Automatic merge from submit-queue (batch tested with PRs 64695, 65982, 65908). 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>.
Collecting etcd metrics
**What this PR does / why we need it**:
Adding etcd metrics to performance test log.
**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
ref #64030
**Special notes for your reviewer**:
**Release note**:
```release-note
NONE
```
Automatic merge from submit-queue (batch tested with PRs 63793, 65989). 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 wrong flexvolume dir on gce ubuntu
**What this PR does / why we need it**:
Fixes https://github.com/kubernetes/kubernetes/issues/65777
**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes https://github.com/kubernetes/kubernetes/issues/65777
**Special notes for your reviewer**: everything is named for gci being the one exception but i assume ubuntu received the change at the same time `gciVolumePluginDirVersion = "1.10.0"`
**Release note**:
```release-note
NONE
```
Automatic merge from submit-queue (batch tested with PRs 63793, 65989). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.
Enable kubectl proxy to set tcp keepalive
**What this PR does / why we need it**:
Allows setting keepalive period for kubectl proxy.
Fixes#63727
**Special notes for your reviewer**:
/assign @brendandburns
**Release note**:
```release-note
Introduce a new flag `--keepalive` for kubectl proxy to allow setting keep-alive period for long-running request.
```
remove create-on-update logic for quota controller
review: add more error check
remove unused args
revert changes in patch.go
use hasUID to judge if it's a create-on-update
Automatic merge from submit-queue (batch tested with PRs 65902, 65781). 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>.
if loadbalancer section is not defined in cloudconfig, do not init support
**What this PR does / why we need it**: if LoadBalancer section is not defined in cloudconfig, we should not initialize loadbalancer support for openstack cloudprovider.
**Which issue(s) this PR fixes**:
Fixes#65775
**Special notes for your reviewer**:
**Release note**:
```release-note
If LoadBalancer is not defined in cloud config, the loadbalancer is not initialized anymore in openstack. All setups must have some setting under that section
```
Automatic merge from submit-queue (batch tested with PRs 65993, 65986, 65351, 65996, 65985). 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>.
Re-add pkg/generated/bindata.go
**What this PR does / why we need it**: I removed `pkg/generated/bindata.go` in #62432 as it had drifted out-of-date and was automatically generated by `make` and `bazel`.
This broke some downstream users who import `k8s.io/kubernetes`.
It's unclear whether the project intends for `k8s.io/kubernetes` to be vendorable, as there are other generated files which are not saved in the repo, including `pkg/generated/openapi/zz_generated.openapi.go` and `test/e2e/generated/bindata.go`, but `pkg/generated/bindata.go` seems to be a core dependency for current uses.
The new verify check added in #65882 will ensure that this file stays up-to-date.
**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
This partially addresses #65968. We also need to cherry-pick this to release-1.11.
**Release note**:
```release-note
Re-adds `pkg/generated/bindata.go` to the repository to allow some parts of k8s.io/kubernetes to be go-vendorable.
```
Automatic merge from submit-queue (batch tested with PRs 65993, 65986, 65351, 65996, 65985). 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>.
Create WORKSPACE file before running bazel in kubemark
As the canary run after https://github.com/kubernetes/test-infra/pull/8616 failed with:
```
I0709 19:06:05.281] Extracting Bazel installation...
I0709 19:06:13.369] ERROR: The 'run' command is only supported from within a workspace.
W0709 19:06:13.469] [0;33mAttempt 1 failed to bazel run //cluster/images/kubemark:push. Retrying.[0m
```
Ref https://github.com/kubernetes/test-infra/issues/8348
/cc @krzyzacy
```release-note
NONE
```
Automatic merge from submit-queue (batch tested with PRs 65993, 65986, 65351, 65996, 65985). 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 DeletionTimestamp printing
**What this PR does / why we need it**:
I found a bug that `ObjectMeta.DeletionTimestamp` is not displayed correctly because it's a future time but it uses the time difference until now. So I fixed it by calculating the time difference from now instead of until now.
Before this fix:
```
Name: test-pod-7bd594bd96-hf5kk
Namespace: default
Node: kube-node-2/10.192.0.4
Start Time: Fri, 22 Jun 2018 14:57:09 +0900
Labels: pod-template-hash=3681506852
run=test-pod
Annotations: <none>
Status: Terminating (lasts <invalid>)
Termination Grace Period: 30s
IP: 10.244.3.5
Controlled By: ReplicaSet/test-pod-7bd594bd96
Containers:
...
```
After this fix:
```
Name: test-pod-7bd594bd96-85cdd
Namespace: default
Node: kube-node-2/10.192.0.4
Start Time: Fri, 22 Jun 2018 14:56:44 +0900
Labels: pod-template-hash=3681506852
run=test-pod
Annotations: <none>
Status: Terminating (lasts 2m)
Termination Grace Period: 123s
IP: 10.244.3.4
Controlled By: ReplicaSet/test-pod-7bd594bd96
...
```
Could you consider merging it?
We heavily use preemptible jobs in my company and knowing deletion time and grace periods is really important when jobs trap `SIGTERM` and decide if it should continue to run until the deletion time or just stop immediately.
**Which issue(s) this PR fixes**
N/A
**Special notes for your reviewer**:
N/A
**Release note**:
```release-note
NONE
```
Automatic merge from submit-queue (batch tested with PRs 65993, 65986, 65351, 65996, 65985). 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>.
verify-generated-files: ensure git tree is clean
**What this PR does / why we need it**: If you have uncommitted changes in your tree, `hack/verify-generated-files.sh` will fail spuriously on those changes. Instead of wasting time generating files, just fail fast if the tree isn't clean.
Follow-up to #65882.
**Release note**:
```release-note
NONE
```
Automatic merge from submit-queue (batch tested with PRs 65993, 65986, 65351, 65996, 65985). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.
[GCE] ILB tests - move t.Parallel() out of for loop
**What this PR does / why we need it**:
Moves `t.Parallel()` to the top of the test case instead of within the for loop. `t.Parallel()` within a `t.Run` block causes the for loop to advance to the next test case - see https://gist.github.com/posener/92a55c4cd441fc5e5e85f27bca008721 for more details.
Verified the fix by running the test multiple times locally, with @smarterclayton 's command `go test ./pkg/cloudprovider/providers/gce/ -test.run=TestEnsureInternalBackendServiceGroups/GetRegionBackendService_failed -count=10`.
**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes#65883
**Special notes for your reviewer**:
**Release note**:
```release-note
NONE
```
cc @grayluck
Automatic merge from submit-queue (batch tested with PRs 65987, 65962). 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 pod worker deadlock.
Preemption will stuck forever if `killPodNow` timeout once. The sequence is:
* `killPodNow` create the response channel (size 0) and send it to pod worker.
* `killPodNow` timeout and return.
* Pod worker finishes killing the pod, and tries to send back response via the channel.
However, because the channel size is 0, and the receiver has exited, the pod worker will stuck forever.
In @jingxu97's case, this causes a critical system pod (apiserver) unable to come up, because the csi pod can't be preempted.
I checked the history, and the bug was introduced 2 years ago 6fefb428c1.
I think we should at least cherrypick this to `1.11` since preemption is beta and enabled by default in 1.11.
@kubernetes/sig-node-bugs @derekwaynecarr @dashpole @yujuhong
Signed-off-by: Lantao Liu <lantaol@google.com>
```release-note
none
```
kube-proxy should be able to run on all nodes, independent
on the taint of such nodes.
This restriction was previously removed in bb28449e31 but
then was brought back in d1949261ab.
Also, annotate with:
scheduler.alpha.kubernetes.io/critical-pod: ""
and add a class in the template spec:
priorityClassName: system-node-critical
Automatic merge from submit-queue (batch tested with PRs 64226, 65880). 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>.
Populate NodeAffinity on top of labels for cloud based PersistentVolumes
**What this PR does / why we need it**:
This PR populates the NodeAffinity field (on top of the existing labels) for PVs backed by cloud providers like EC2 EBS and GCE PD.
**Special notes for your reviewer**:
Related to https://github.com/kubernetes/kubernetes/pull/63232
Sample `describe pv` output for EBS with node affinity field populated:
```
kubectl describe pv pv0001
Name: pv0001
Labels: failure-domain.beta.kubernetes.io/region=us-west-2
failure-domain.beta.kubernetes.io/zone=us-west-2a
Annotations: <none>
Finalizers: [kubernetes.io/pv-protection]
StorageClass:
Status: Available
Claim:
Reclaim Policy: Retain
Access Modes: RWO
Capacity: 5Gi
Node Affinity:
Required Terms:
Term 0: failure-domain.beta.kubernetes.io/zone in [us-west-2a]
failure-domain.beta.kubernetes.io/region in [us-west-2]
Message:
Source:
Type: AWSElasticBlockStore (a Persistent Disk resource in AWS)
VolumeID: vol-00cf03a068c62cbe6
FSType: ext4
Partition: 0
ReadOnly: false
Events: <none>
```
/sig storage
/assign @msau42
**Release note**:
```NONE```
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>.
Store the latest cloud provider node addresses
**What this PR does / why we need it**:
Buffer the recently retrieved node address so they can be used as soon as the next node status update is run.
**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes#65814
**Special notes for your reviewer**:
**Release note**:
```release-note
None
```
Automatic merge from submit-queue (batch tested with PRs 65830, 65780, 65961). 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>.
vSphere: set vCenter client UserAgent
**What this PR does / why we need it**:
Setting the client UserAgent makes it easier to identify vCenter sessions
used by the vSphere Cloud Provider. This is useful to remove sessions that
have leaked, such as when a VCP process goes away without calling Logout().
And to test that VCP properly re-authenticates when a session is removed.
Example use:
``` console
% govc session.ls | grep kubernetes-cloudprovider | awk '{print $1}' | xargs -n1 govc session.rm
```
**Special notes for your reviewer**:
Prior to the change, the session UserAgent is listed as `Go-http-client/1.1`, with the change as `kubernetes-cloudprovider/v1.12.0-...`
Format based on the azure provider client User-Agent: ac99da5e3e/pkg/cloudprovider/providers/azure/azure.go (L386-L393)
``` console
% govc session.ls
Key Name Time Idle Host Agent
5217bfbf-ed78-3538-c4f4-137dfdc87d97 VSPHERE.LOCAL\Administrator 2018-07-09 05:26 3m32s 10.0.0.237 kubernetes-cloudprovider/v1.12.0-alpha.0.1990+ac99da5e3e0c0d-dirty
52259ed5-417e-dab4-07bc-f1b01c06f6ce VSPHERE.LOCAL\vpxd-extension-09179ffe-ed51-4dee-91a6-c60162932acd 2018-07-09 05:25 4m41s 10.0.0.208 cl/1.0.0
5225b5d4-1c0a-e8e4-887e-5fa46fee0dc2 VSPHERE.LOCAL\vpxd-extension-09179ffe-ed51-4dee-91a6-c60162932acd 2018-05-26 16:25 old 127.0.0.1 VMware vim-java 1.0
52385c6f-31b5-876e-3e44-35dc7120fe55 VSPHERE.LOCAL\vpxd-extension-09179ffe-ed51-4dee-91a6-c60162932acd 2018-05-26 16:26 old 127.0.0.1 VMware vim-java 1.0
524b23c3-52b3-2fb8-00d4-914f1b34e9b1 VSPHERE.LOCAL\vpxd-extension-09179ffe-ed51-4dee-91a6-c60162932acd 2018-05-26 16:25 old 127.0.0.1 VMware vim-java 1.0
524b6a02-0590-0c1b-db95-0d67b2c36875 VSPHERE.LOCAL\vpxd-extension-09179ffe-ed51-4dee-91a6-c60162932acd 2018-05-26 16:26 1m26s 127.0.0.1 VMware vim-java 1.0
528b6f73-a658-f488-2651-05f3ec182757 VSPHERE.LOCAL\Administrator 2018-07-09 05:28 55s 10.0.0.237 Go-http-client/1.1
52987a71-c671-09e4-6613-ff480aa43882 VSPHERE.LOCAL\vpxd-extension-09179ffe-ed51-4dee-91a6-c60162932acd 2018-05-26 16:25 old 127.0.0.1 VMware vim-java 1.0
52aa9262-a0c7-a79f-7983-2d3858ecc562 VSPHERE.LOCAL\Administrator 2018-07-09 05:09 . 10.0.0.154 govc/0.18.0
52b270fe-2e84-6209-04ff-f4597846ca79 VSPHERE.LOCAL\vpxd-extension-09179ffe-ed51-4dee-91a6-c60162932acd 2018-05-26 16:26 old 127.0.0.1 VMware vim-java 1.0
52d7e734-80a9-0887-e6cb-13a92c1e4e30 VSPHERE.LOCAL\vpxd-extension-09179ffe-ed51-4dee-91a6-c60162932acd 2018-05-26 16:25 old 127.0.0.1 VMware vim-java 1.0
52f5365e-6945-44c6-dc3c-0e3c90444bb0 VSPHERE.LOCAL\vpxd-extension-09179ffe-ed51-4dee-91a6-c60162932acd 2018-05-26 16:26 old 127.0.0.1 VMware vim-java 1.0
52f58503-4943-e4c7-1d90-a3ec7d16ba71 VSPHERE.LOCAL\vpxd-extension-09179ffe-ed51-4dee-91a6-c60162932acd 2018-05-26 16:26 old 127.0.0.1 VMware vim-java 1.0
52fd2f13-d1a9-7ff9-b779-c87b1e4e0490 VSPHERE.LOCAL\vpxd-extension-09179ffe-ed51-4dee-91a6-c60162932acd 2018-05-26 16:30 6m46s 10.0.0.208 VMware vim-java 1.0
```
**Release note**:
```release-note
NONE
```
Automatic merge from submit-queue (batch tested with PRs 65830, 65780, 65961). 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 field selector conversion registration to be strongly typed
the signature of these methods is misleading... they require a group-version-kind
```release-note
NONE
```
Automatic merge from submit-queue (batch tested with PRs 64664, 65836, 65917). 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 stray comment from a merge
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
**What this PR does / why we need it**:
Remove stray comment from a merge.
**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #
**Special notes for your reviewer**:
**Release note**:
```release-note
NONE
```
Automatic merge from submit-queue (batch tested with PRs 64664, 65836, 65917). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.
kubectl: Remove an extra character from rollout error message
**What this PR does / why we need it**:
Removes an extra character in a `kubectl rollout status` error message.
**Special notes for your reviewer**:
I thought this would be a good first contribution!
**Release note**:
```release-note
NONE
```
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>.
Handle errors in generated client scheme
**What this PR does / why we need it**:
Adds missing error handling for schema construction code in generated clientsets.
**Which issue(s) this PR fixes**
Together with #64654fixes#51457.
**Release note**:
```release-note
NONE
```
/kind bug
/sig api-machinery
Automatic merge from submit-queue (batch tested with PRs 65456, 65549). 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 flexvolume in containerized kubelets
Fixes flex volumes in containerized kubelets.
cc @jsafrane @chakri-nelluri @verult
Note to reviewers : e2e tests pass in local containarized cluster.
```release-note
Fix flexvolume in containarized kubelets
```
Automatic merge from submit-queue (batch tested with PRs 65456, 65549). 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 volume mode field to constructed volume spec for CSI plugin
Add volume mode filed to constructed Volume Spec for CSI plugin
```release-note
Add volume mode filed to constructed volume spec for CSI plugin
```