Commit Graph

64544 Commits (a073dfdbd9220168a14670d0b86bc81a67a2335b)

Author SHA1 Message Date
Bobby (Babak) Salamat a073dfdbd9 Fix scheduler Pod informers to receive events when pods are scheduled by other schedulers. 2018-04-23 11:07:53 -07:00
Bobby (Babak) Salamat 719a56fa67 Added test for scheduler informers 2018-04-23 11:07:53 -07:00
Kubernetes Submit Queue 9b7439d77d
Merge pull request #62909 from kawych/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>.

Manage Metadata Agent Config with Addon Manager

**What this PR does / why we need it**:
Fixes error where config map for Metadata Agent was not created by addon manager.

**Release note**:
```release-note
Fix error where config map for Metadata Agent was not created by addon manager.
```
2018-04-23 02:52:06 -07:00
Kubernetes Submit Queue f0b207df2d
Merge pull request #62856 from liggitt/node-authorizer-contention-benchmark
Automatic merge from submit-queue (batch tested with PRs 62409, 62856). 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 node authorizer contention benchmark

* Makes the node authorization benchmark run in parallel
* Runs the tests a second time with a background goroutine pushing graph modifications at a rate of 100x per second (to test authorization performance with contention on the graph lock).

Graph modifications come from the informers watching objects relevant to node authorization, and only fire when a relevant change is made (for example, most node updates do not trigger a graph modification, only ones which change the node's config source configmap reference; most pod updates do not trigger a graph modification, only ones that set the pod's nodeName or uid)

The results do not indicate bottlenecks in the authorizer, even under higher-than-expected write contention.

```
$ go test ./plugin/pkg/auth/authorizer/node/ -run foo -bench 'Authorization' -benchmem -v
goos: darwin
goarch: amd64
pkg: k8s.io/kubernetes/plugin/pkg/auth/authorizer/node
BenchmarkAuthorization/allowed_node_configmap-8                                 596 ns/op   529 B/op   11 allocs/op    3000000
BenchmarkAuthorization/allowed_configmap-8                                      609 ns/op   529 B/op   11 allocs/op    3000000
BenchmarkAuthorization/allowed_secret_via_pod-8                                 586 ns/op   529 B/op   11 allocs/op    3000000
BenchmarkAuthorization/allowed_shared_secret_via_pod-8                        18202 ns/op   542 B/op   11 allocs/op     100000
BenchmarkAuthorization/disallowed_node_configmap-8                              900 ns/op   691 B/op   17 allocs/op    2000000
BenchmarkAuthorization/disallowed_configmap-8                                   868 ns/op   693 B/op   17 allocs/op    2000000
BenchmarkAuthorization/disallowed_secret_via_pod-8                              875 ns/op   693 B/op   17 allocs/op    2000000
BenchmarkAuthorization/disallowed_shared_secret_via_pvc-8                      1215 ns/op   948 B/op   22 allocs/op    1000000
BenchmarkAuthorization/disallowed_pvc-8                                         912 ns/op   693 B/op   17 allocs/op    2000000
BenchmarkAuthorization/disallowed_pv-8                                         1137 ns/op   834 B/op   19 allocs/op    2000000
BenchmarkAuthorization/disallowed_attachment_-_no_relationship-8                892 ns/op   677 B/op   16 allocs/op    2000000
BenchmarkAuthorization/disallowed_attachment_-_feature_disabled-8               236 ns/op   208 B/op    2 allocs/op   10000000
BenchmarkAuthorization/allowed_attachment_-_feature_enabled-8                   723 ns/op   593 B/op   12 allocs/op    2000000

BenchmarkAuthorization/contentious_allowed_node_configmap-8                     726 ns/op   529 B/op   11 allocs/op    2000000
BenchmarkAuthorization/contentious_allowed_configmap-8                          698 ns/op   529 B/op   11 allocs/op    2000000
BenchmarkAuthorization/contentious_allowed_secret_via_pod-8                     778 ns/op   529 B/op   11 allocs/op    2000000
BenchmarkAuthorization/contentious_allowed_shared_secret_via_pod-8            21406 ns/op   638 B/op   13 allocs/op     100000
BenchmarkAuthorization/contentious_disallowed_node_configmap-8                 1135 ns/op   692 B/op   17 allocs/op    1000000
BenchmarkAuthorization/contentious_disallowed_configmap-8                      1239 ns/op   691 B/op   17 allocs/op    1000000
BenchmarkAuthorization/contentious_disallowed_secret_via_pod-8                 1043 ns/op   692 B/op   17 allocs/op    1000000
BenchmarkAuthorization/contentious_disallowed_shared_secret_via_pvc-8          1404 ns/op   950 B/op   22 allocs/op    1000000
BenchmarkAuthorization/contentious_disallowed_pvc-8                            1177 ns/op   693 B/op   17 allocs/op    1000000
BenchmarkAuthorization/contentious_disallowed_pv-8                             1295 ns/op   834 B/op   19 allocs/op    1000000
BenchmarkAuthorization/contentious_disallowed_attachment_-_no_relationship-8   1170 ns/op   676 B/op   16 allocs/op    1000000
BenchmarkAuthorization/contentious_disallowed_attachment_-_feature_disabled-8   262 ns/op   208 B/op    2 allocs/op   10000000
BenchmarkAuthorization/contentious_allowed_attachment_-_feature_enabled-8       790 ns/op   593 B/op   12 allocs/op    2000000

--- BENCH: BenchmarkAuthorization
   node_authorizer_test.go:592: graph modifications during non-contention test: 0
   node_authorizer_test.go:589: graph modifications during contention test: 6301
   node_authorizer_test.go:590: <1ms=5507, <10ms=128, <25ms=43, <50ms=65, <100ms=135, <250ms=328, <500ms=93, <1000ms=2, >1000ms=0
PASS
ok     k8s.io/kubernetes/plugin/pkg/auth/authorizer/node   112.616s
```

```release-note
NONE
```
2018-04-23 01:35:14 -07:00
Kubernetes Submit Queue 77f5324223
Merge pull request #62409 from rajansandeep/corednsscaler
Automatic merge from submit-queue (batch tested with PRs 62409, 62856). 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>.

DNS-Autoscaler support for CoreDNS

**What this PR does / why we need it**:
This PR provides the dns-horizontal autoscaler for CoreDNS in kube-up, enabling the tests to pass once CoreDNS is the default. 

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-04-23 01:35:07 -07:00
Kubernetes Submit Queue a048ca888a
Merge pull request #61891 from zhangxiaoyu-zidif/patch-9
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 pr No. from 517326 to 57326

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

**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
```
2018-04-22 08:08:40 -07:00
Kubernetes Submit Queue afa68cc287
Merge pull request #62886 from msau42/fix-localssd-fsgroup
Automatic merge from submit-queue (batch tested with PRs 62780, 62886). 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>.

Only count local mounts that are from other pods

**What this PR does / why we need it**:
In GCE, we mount the same local SSD in two different paths (for backwards compatability).  This makes the fsGroup conflict check fail because it thinks the 2nd mount is from another pod.  For the fsgroup check, we only want to detect if other pods are mounting the same volume, so this PR filters the mount list to only those mounts under "/var/lib/kubelet".

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

**Release note**:

```release-note
NONE
```
2018-04-20 20:06:13 -07:00
Kubernetes Submit Queue 48243a9c24
Merge pull request #62780 from RenaudWasTaken/master
Automatic merge from submit-queue (batch tested with PRs 62780, 62886). 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 Capacity log verbosity in status update

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

While in production we noticed that the log verbosity for the Capacity field in the node status was to high.
This log message is called for every device plugin resource at every update.

A proposed solution is to tune it down from V(2) to V(5). In a normal setting you'll be able to see the effect by looking at the node status.

Release note:
```
NONE
```

/sig node
/area hw-accelerators
/assign @vikaschoudhary16 @jiayingz @vishh
2018-04-20 20:06:10 -07:00
Kubernetes Submit Queue 4d6a6ced8c
Merge pull request #56525 from tianshapjq/testcase-helpers_linux.go
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>.

new testcase to helpers_linux.go

new testcase to helpers_linux.go, PTAL.

```release-note
NONE
```
2018-04-20 18:55:13 -07:00
Kubernetes Submit Queue bdd6ff40db
Merge pull request #62765 from wgliang/master.pob-name-conflict
Automatic merge from submit-queue (batch tested with PRs 61324, 62880, 62765). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

-Fix the name could cause a conflict if an object with the same name …

…is created in a different namespace

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

Using the name could cause a conflict if an object with the same name is created in a different namespace

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

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

**Release note**:
```
NONE
```
2018-04-20 17:23:23 -07:00
Kubernetes Submit Queue 467ce8d8f3
Merge pull request #62880 from deads2k/cli-35-io
Automatic merge from submit-queue (batch tested with PRs 61324, 62880, 62765). 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>.

provide standard iostream struct for commands

Commands usually need some kind of iostream.  For consistency, delegation, and testability this pull introduces a standard struct to embed in every set of command options.  It also starts the plumbing so that the benefits of standardization for all three of those cases become clear.

@kubernetes/sig-cli-maintainers 
@soltysh @juanvallejo 

```release-note
NONE
```
2018-04-20 17:23:20 -07:00
Kubernetes Submit Queue 663c6edc46
Merge pull request #61324 from pospispa/60764-K8s-1.10-StorageObjectInUseProtection-downgrade-issue
Automatic merge from submit-queue (batch tested with PRs 61324, 62880, 62765). 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>.

Always Start pvc-protection-controller and pv-protection-controller

**What this PR does / why we need it**:
After K8s 1.10 is upgraded to K8s 1.11 finalizer `[kubernetes.io/pvc-protection]` is added to PVCs
because `StorageObjectInUseProtection` feature will be GA in K8s 1.11.
However, when K8s 1.11 is downgraded to K8s 1.10 and the `StorageObjectInUseProtection` feature is disabled the finalizers remain in the PVCs and as `pvc-protection-controller` is not started in K8s 1.10 finalizers are not removed automatically from deleted PVCs and that's why deleted PVC are not removed from the system but remain in `Terminating` phase.
The same applies to `pv-protection-controller` and `[kubernetes.io/pvc-protection]` finalizer in PVs.

That's why `pvc-protection-controller` is always started because the `pvc-protection-controller` removes finalizers from PVCs automatically when a PVC is not in active use by a pod.
Also the `pv-protection-controller` is always started to remove finalizers from PVs automatically when a PV is not `Bound` to a PVC.

**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 N/A
This issue https://github.com/kubernetes/kubernetes/issues/60764 is for downgrade from K8s 1.10 to K8s 1.9.
This PR fixes the same problem but for downgrade from K8s 1.11 to K8s 1.10.

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-04-20 17:23:17 -07:00
Kubernetes Submit Queue 9c25da64f0
Merge pull request #62649 from liggitt/loopback-routing
Automatic merge from submit-queue (batch tested with PRs 50899, 62649). 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 webhook service routing resolves kubernetes.default.svc correctly

Going through the normal endpoint resolve path isn't correct in multi-master scenarios

The auth wrapper is pulling from LoopbackClientConfig, the service resolver should do the same

```release-note
Fixes the kubernetes.default.svc loopback service resolution to use a loopback configuration.
```
2018-04-20 15:34:12 -07:00
Kubernetes Submit Queue f2c8ef7571
Merge pull request #50899 from WanLinghao/rollout_pause
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 test file for pkg/kubectl/cmd/rollout/rollout_pause.go file

new:   pkg/kubectl/cmd/rollout/rollout_pause_test.go
        modified: pkg/kubectl/cmd/rollout/BUILD


**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
```
2018-04-20 15:05:37 -07:00
Kubernetes Submit Queue d78ef491de
Merge pull request #62827 from linyouchong/data-reace-csi-20180418
Automatic merge from submit-queue (batch tested with PRs 62876, 62733, 62827). 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 csi data race in csi_attacher_test.go

**What this PR does / why we need it**:
fix csi data race in csi_attacher_test.go#TestAttacherWaitForVolumeAttachment

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

**Special notes for your reviewer**:
run `stress -p 500 ./csi.test -v 5 -alsologtostderr` , There is another failure
I think we should fix it in another PR.
```
--- FAIL: TestAttacherMountDevice (0.07s)
        csi_attacher_test.go:495: Running test case: normal
        csi_attacher_test.go:534: test should not fail, but error occurred: mkdir path2: file exists
```

**Release note**:

```release-note
NONE
```

/sig storage
2018-04-20 13:39:14 -07:00
Kubernetes Submit Queue 6da4355ad5
Merge pull request #62733 from soltysh/discovery_timeout
Automatic merge from submit-queue (batch tested with PRs 62876, 62733, 62827). 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>.

Set a default request timeout for discovery client

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1546117

Adds a default request timeout to requests made by the discovery client.
This prevents a command from hanging indefinitely due to one or multiple calls
to the apiserver taking longer than usual when when a --request-timeout flag value
has not been set.

/assign @deads2k @juanvallejo 

**Release note**:
```release-note
NONE
```
2018-04-20 13:39:11 -07:00
Kubernetes Submit Queue 03160fde5a
Merge pull request #62876 from deads2k/cli-33-discovery
Automatic merge from submit-queue (batch tested with PRs 62876, 62733, 62827). 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 discovery injection from factory

We added this shim when cached discovery was a contentious thing to give ourselves flexibility.  It is no longer contentious and this removes a layer of complexity we no longer need.

@kubernetes/sig-cli-maintainers 
@soltysh @juanvallejo 

```release-note
NONE
```
2018-04-20 13:39:07 -07:00
Pavel Pospisil d3ddf7eb8b Always Start pvc-protection-controller and pv-protection-controller
After K8s 1.10 is upgraded to K8s 1.11 finalizer [kubernetes.io/pvc-protection] is added to PVCs
because StorageObjectInUseProtection feature will be GA in K8s 1.11.
However, when K8s 1.11 is downgraded to K8s 1.10 and the StorageObjectInUseProtection feature is disabled
the finalizers remain in the PVCs and as pvc-protection-controller is not started in K8s 1.10 finalizers
are not removed automatically from deleted PVCs and that's why deleted PVC are not removed from the system
but remain in Terminating phase.
The same applies to pv-protection-controller and [kubernetes.io/pvc-protection] finalizer in PVs.

That's why pvc-protection-controller is always started because the pvc-protection-controller removes finalizers
from PVCs automatically when a PVC is not in active use by a pod.
Also the pv-protection-controller is always started to remove finalizers from PVs automatically when a PV is not
Bound to a PVC.

Related issue: https://github.com/kubernetes/kubernetes/issues/60764
2018-04-20 19:54:50 +02:00
David Eads 8ef56776b9 provide standard iostream struct for commands 2018-04-20 12:54:11 -04:00
Jordan Liggitt d421affd2d
loopback webhook integration test 2018-04-20 12:30:27 -04:00
Jordan Liggitt 54c883f27b
Honor existing CA bundle and TLS server name in webhook client 2018-04-20 12:26:39 -04:00
Jordan Liggitt 6f65742474
ensure tls server name is used in transport 2018-04-20 12:26:38 -04:00
Jordan Liggitt d45fbce379
distinguish custom dialers in transport cache 2018-04-20 12:26:38 -04:00
Jordan Liggitt fe23fa3eee
Ensure service routing resolves kubernetes.default.svc correctly 2018-04-20 12:26:38 -04:00
Kubernetes Submit Queue 9c60fd5242
Merge pull request #62683 from juanvallejo/jvallejo/print-list-apply-cmd
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>.

aggregate objs before printing in apply cmd

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

Aggregates all objects into a list before printing 

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

cc @soltysh
2018-04-20 09:16:53 -07:00
Kubernetes Submit Queue bfae47ad87
Merge pull request #60709 from deads2k/client-02-fake-copy
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>.

deep copy fake client actions to avoid accidental mutation

I just got bit by this downstream.  Without a deep copy it is possible accidentally mutate the thing you created, thus invalidating your testing.  It's particularly nasty inside of a controller doing a loop on objects, making refs to them, and creating.  This works running in an actual process since we serialize and write, but fails unit tests since there is no serialization step.

@kubernetes/sig-api-machinery-bugs 

```release-note
NONE
```
2018-04-20 08:28:41 -07:00
Maciej Szulik 7bd48a7e23
Set a default request timeout for discovery client 2018-04-20 16:22:53 +02:00
Karol Wychowaniec ffa84b5c08 Manage Metadata Agent Config with Addon Manager 2018-04-20 16:16:49 +02:00
Renaud Gaubert 7297dd33bb Change Capacity log verbosity in node status update 2018-04-20 16:11:02 +02:00
Kubernetes Submit Queue 5dde701b87
Merge pull request #62412 from bhcleek/go1.10
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>.

generated code should pass go vet for go1.10

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

Update code generator and the code it generates to pass `go vet`.

go1.10 runs `go vet` whenever `go test` is run. Because of this, generated code for CRDs needs to pass `go vet`.

**Release note**:

```release-note
Code generated for CRDs now passes `go vet`.
```
2018-04-20 06:22:31 -07:00
Kubernetes Submit Queue fc7527537f
Merge pull request #62336 from deads2k/rbac-05-scale
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 statefulset scaling permission to admins, editors, and viewers

StatefulSets are missing scale permissions, so users can't scale them.


```release-note
fix permissions to allow statefulset scaling for admins, editors, and viewers
```
2018-04-20 05:31:11 -07:00
David Eads 4f90f9aa8b remove uneeded discovery flexibility 2018-04-20 07:21:51 -04:00
Kubernetes Submit Queue 2bfe40a1d1
Merge pull request #62707 from feiskyer/vmss-standard-lb
Automatic merge from submit-queue (batch tested with PRs 62857, 62707). 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 support of standard LB to Azure vmss

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

Add support of standard LB to Azure vmss.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
Add support of standard LB to Azure vmss
```

/sig azure
2018-04-19 21:57:08 -07:00
Kubernetes Submit Queue 5e322bc536
Merge pull request #62857 from enj/enj/i/export_rbac_validation
Automatic merge from submit-queue (batch tested with PRs 62857, 62707). 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>.

Export RBAC validation functions

This change exports the RBAC validation functions to allow types outside of the RBAC API group to embed a RBAC type and reuse this validation logic.  Note that only `ValidateRBACName`,
`ValidatePolicyRule` and `ValidateRoleBindingSubject` were exported.  The rest of the functions were already exported.

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

**Release note**:

```release-note
NONE
```

@kubernetes/sig-auth-pr-reviews 
/assign @deads2k
2018-04-19 21:57:05 -07:00
Guoliang Wang df49a4b8c6 -Fix the name could cause a conflict if an object with the same name is created in a different namespace 2018-04-20 11:37:46 +08:00
Jordan Liggitt 1c6998a2f3
Add node authorizer contention benchmark 2018-04-19 23:11:54 -04:00
Pengfei Ni c69cea41a0 Check all backends for vmss and standard instances 2018-04-20 10:31:23 +08:00
Kubernetes Submit Queue e85943f9a2
Merge pull request #62832 from grayluck/externalname-test
Automatic merge from submit-queue (batch tested with PRs 62885, 62832). 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 test forwarding externalname dns lookup to upstream nameservers.

**What this PR does / why we need it**:
e2e test forwarding externalname dns lookup to upstream nameservers.

e2e test that goes through dnsmasq -> kubedns -> upstream servers path.

Updated e2e test for PTR record lookup, test for default upstreamservers from resolv.conf.

**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/dns/issues/226

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

**Release note**:

```release-note
NONE
```
2018-04-19 18:40:10 -07:00
Kubernetes Submit Queue 8649d16ff9
Merge pull request #62885 from nicksardo/fix-ilb-update
Automatic merge from submit-queue (batch tested with PRs 62885, 62832). 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: Fix ILB issue updating backend services

**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 #62878
`ensureInternalBackendServiceGroups` would sync the instance groups with the latest nodes, and update the backend service's list of backends if necessary. However, the list of backends on the backend service was not set before calling the GCP API.

`updateInternalLoadBalancerNodes` does very little above `ensureInternalBackendServiceGroups`, so I'm just combining the unit tests into one.

**Special notes for your reviewer**:
/assign MrHohn
cc @agau4779 

**Release note**:
```release-note
GCE: Fix for internal load balancer management resulting in backend services with outdated instance group links.
```
2018-04-19 18:40:07 -07:00
yankaiz b32cc1be59 e2e test forwarding externalname dns lookup to upstream nameservers. 2018-04-19 16:53:41 -07:00
Kubernetes Submit Queue 2142bff940
Merge pull request #62606 from smarterclayton/defer_delete
Automatic merge from submit-queue (batch tested with PRs 61962, 58972, 62509, 62606). 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 a test suite reusing framework to register namespaces to delete

If the suite bypasses CreateNamespace (because it wants to create more
specialized namespaces) it has no way to register deletes.

@liggitt this was something that came up in an older rebase and was missed (for things creating projects)
2018-04-19 16:47:26 -07:00
Kubernetes Submit Queue e9374411d5
Merge pull request #62509 from sjenning/qos-reserved-feature-gate
Automatic merge from submit-queue (batch tested with PRs 61962, 58972, 62509, 62606). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

kubelet: move QOSReserved from experimental to alpha feature gate

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

**Release note**:
```release-note
The --experimental-qos-reserve kubelet flags is replaced by the alpha level --qos-reserved flag or QOSReserved field in the kubeletconfig and requires the QOSReserved feature gate to be enabled.
```

/sig node
/assign  @derekwaynecarr 
/cc @mtaufen
2018-04-19 16:47:21 -07:00
Kubernetes Submit Queue 139309f798
Merge pull request #58972 from soltysh/issue54870
Automatic merge from submit-queue (batch tested with PRs 61962, 58972, 62509, 62606). 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 job's backoff limit for restart policy OnFailure

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

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

/assign janetkuo
2018-04-19 16:47:18 -07:00
Kubernetes Submit Queue f3599ba3c9
Merge pull request #61962 from liggitt/flag-race
Automatic merge from submit-queue (batch tested with PRs 61962, 58972, 62509, 62606). 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 data races in unit tests

Setting global flags in unit tests leads to data races like this:

```
==================
WARNING: DATA RACE
Write at 0x0000028f5241 by goroutine 47:
  flag.(*boolValue).Set()
      /home/jliggitt/.gvm/gos/go1.9.5/src/flag/flag.go:91 +0x7b
  flag.(*FlagSet).Set()
      /home/jliggitt/.gvm/gos/go1.9.5/src/flag/flag.go:366 +0x10c
  flag.Set()
      /home/jliggitt/.gvm/gos/go1.9.5/src/flag/flag.go:379 +0x76
  k8s.io/kubernetes/pkg/kubelet/cm/devicemanager.TestPodContainerDeviceAllocation()
      /home/jliggitt/go/src/k8s.io/kubernetes/pkg/kubelet/cm/devicemanager/manager_test.go:549 +0x126
  testing.tRunner()
      /home/jliggitt/.gvm/gos/go1.9.5/src/testing/testing.go:746 +0x16c

Previous read at 0x0000028f5241 by goroutine 34:
  k8s.io/kubernetes/vendor/github.com/golang/glog.(*loggingT).output()
      /home/jliggitt/go/src/k8s.io/kubernetes/vendor/github.com/golang/glog/glog.go:682 +0x730
  k8s.io/kubernetes/vendor/github.com/golang/glog.(*loggingT).printf()
      /home/jliggitt/go/src/k8s.io/kubernetes/vendor/github.com/golang/glog/glog.go:655 +0x259
  k8s.io/kubernetes/vendor/github.com/golang/glog.Errorf()
      /home/jliggitt/go/src/k8s.io/kubernetes/vendor/github.com/golang/glog/glog.go:1118 +0x74
  k8s.io/kubernetes/pkg/kubelet/cm/devicemanager.(*endpointImpl).run()
      /home/jliggitt/go/src/k8s.io/kubernetes/pkg/kubelet/cm/devicemanager/endpoint.go:132 +0x1c7e
  k8s.io/kubernetes/pkg/kubelet/cm/devicemanager.(*ManagerImpl).addEndpoint.func1()
      /home/jliggitt/go/src/k8s.io/kubernetes/pkg/kubelet/cm/devicemanager/manager.go:378 +0x3f

Goroutine 47 (running) created at:
  testing.(*T).Run()
      /home/jliggitt/.gvm/gos/go1.9.5/src/testing/testing.go:789 +0x568
  testing.runTests.func1()
      /home/jliggitt/.gvm/gos/go1.9.5/src/testing/testing.go:1004 +0xa7
  testing.tRunner()
      /home/jliggitt/.gvm/gos/go1.9.5/src/testing/testing.go:746 +0x16c
  testing.runTests()
      /home/jliggitt/.gvm/gos/go1.9.5/src/testing/testing.go:1002 +0x521
  testing.(*M).Run()
      /home/jliggitt/.gvm/gos/go1.9.5/src/testing/testing.go:921 +0x206
  main.main()
      k8s.io/kubernetes/pkg/kubelet/cm/devicemanager/_test/_testmain.go:68 +0x1d3

Goroutine 34 (finished) created at:
  k8s.io/kubernetes/pkg/kubelet/cm/devicemanager.(*ManagerImpl).addEndpoint()
      /home/jliggitt/go/src/k8s.io/kubernetes/pkg/kubelet/cm/devicemanager/manager.go:377 +0x9d6
==================
--- FAIL: TestPodContainerDeviceAllocation (0.00s)
	testing.go:699: race detected during execution of test
FAIL
FAIL	k8s.io/kubernetes/pkg/kubelet/cm/devicemanager	0.124s

```
2018-04-19 16:47:14 -07:00
juanvallejo d9f2657647
aggregate objs before printing in apply cmd 2018-04-19 19:39:10 -04:00
Kubernetes Submit Queue 560e15fb9a
Merge pull request #62873 from sigma/pr/fix-rpm
Automatic merge from submit-queue (batch tested with PRs 62642, 62855, 62487, 62858, 62873). 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>.

build/rpms: fix kubeadm rpm

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

Change #61633 doesn't seem quite correct, and breaks bazel builds.
This patch makes sure that:
- there is no conflict between directory files and build targets
- rpm files are properly packaged after being installed

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

I'm not sure how the previous attempt passed CI, but the corollary is that the status for this one might be considered suspect as well.

**Release note**:

```release-note
NONE
```
2018-04-19 15:54:28 -07:00
Kubernetes Submit Queue 019c805ff2
Merge pull request #62858 from deads2k/cli-32-more-record-02
Automatic merge from submit-queue (batch tested with PRs 62642, 62855, 62487, 62858, 62873). 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>.

 final record flag cleanup

This ties off the remainder of the record flag uses.  Trying to merge different types of patches is fraught, so I added a way to get a merge patch (not a strategic patch) back from the annotation update.

@kubernetes/sig-cli-maintainers 
/assign @soltysh 
/assign @juanvallejo 

```release-note
NONE
```
2018-04-19 15:54:25 -07:00
Kubernetes Submit Queue ea069dcddc
Merge pull request #62487 from juanvallejo/jvallejo/wire-print-flags-apply.go
Automatic merge from submit-queue (batch tested with PRs 62642, 62855, 62487, 62858, 62873). 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>.

wire print flags through apply cmd

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

Depends on https://github.com/kubernetes/kubernetes/pull/62300
Adds PrintFlags to `apply` command.

cc @soltysh @deads2k
2018-04-19 15:54:22 -07:00
Kubernetes Submit Queue 4642d5e619
Merge pull request #62855 from deads2k/cli-30-clientcache
Automatic merge from submit-queue (batch tested with PRs 62642, 62855, 62487, 62858, 62873). 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>.

simplify the client cache

We created the client cache back when we negotiated versions to create a config and a client.  Now we don't, so this is just debt.  This removes all the obvious places.  I'll open a separate WIP to try to kill the rest.

@kubernetes/sig-cli-maintainers 
@soltysh 

```release-note
NONE
```
2018-04-19 15:54:19 -07:00
Kubernetes Submit Queue 9031f9a8ca
Merge pull request #62642 from ceshihao/kubectl_get_pod_status
Automatic merge from submit-queue (batch tested with PRs 62642, 62855, 62487, 62858, 62873). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Make pod status to Running if some are Running and some are Completed

**What this PR does / why we need it**:
Make pod status to Running if some are Running and some are Completed

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

**Special notes for your reviewer**:
Only Set Pod status to Completed when no other reason, no Running container and only Completed containers.

Set status to Running if some are Running and some are Completed

**Release note**:

```release-note
Set pod status to "Running" if there is at least one container still reporting as "Running" status and others are "Completed".
```
2018-04-19 15:54:16 -07:00