Commit Graph

64900 Commits (cb4ce3392dff6d29e8f6835b5e1c24ff826f0b4b)

Author SHA1 Message Date
David Eads cb4ce3392d update etcd to skip kinds, not resources so we can use a live mapping 2018-05-01 07:52:51 -04:00
David Eads 1cb797e355 acknowledge that creation of a restmapper can fail and that we cannot have a default 2018-05-01 07:52:51 -04:00
David Eads ef0d1ab819 remove incorrect static restmapper 2018-05-01 07:51:17 -04:00
Kubernetes Submit Queue 12a6236148
Merge pull request #63178 from misterikkit/ecache-locking
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>.

scheduler: clean up and simplify equivalence cache locking

**What this PR does / why we need it**:
This is a cleanup of the locking code for equivalence cache. There is no change to the current logic or locking. This PR has a couple of implications, though.
1. It deletes (unreachable) code that could have been used to cache predicate results that consider nominated pods.
2. Callers should no longer lock/unlock the eCache manually, so coordinating that lock with other synchronization is restricted.


**Special notes for your reviewer**:

**Release note**:
<!--  Write your release note:
1. Enter your extended release note in the below block. If the PR requires additional action from users switching to the new release, include the string "**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 #
**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 #
action required".
2. If no release note is required, just write "NONE".
-->
```release-note
NONE
```
/sig scheduling
/kind cleanup
2018-04-30 19:29:49 -07:00
Kubernetes Submit Queue 535426bf73
Merge pull request #63307 from liggitt/revert-volume-event-test
Automatic merge from submit-queue (batch tested with PRs 55971, 63307). 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>.

Revert "fixtodo:validate events on PVCs in integration volume binding test"

This reverts commit 910fd1953e.

Events are not a reliable message bus... they throttle, deduplicate, and drop events over fairly conservative rate limit targets.

This commit caused test flakes, so reverting.

Fixes #63302

```release-note
NONE
```
2018-04-30 15:29:08 -07:00
Kubernetes Submit Queue 699209db2a
Merge pull request #55971 from asottile/patch-1
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>.

`exec` away the shell for node-problem-detector
2018-04-30 15:13:59 -07:00
Kubernetes Submit Queue b36743fe30
Merge pull request #63198 from soltysh/kubectl_cleaning
Automatic merge from submit-queue (batch tested with PRs 58474, 60034, 62101, 63198). 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 Factory from more Run commands

/assign @juanvallejo 

**Release note**:
-->
```release-note
NONE
```
2018-04-30 13:24:15 -07:00
Kubernetes Submit Queue 452b8c9e0d
Merge pull request #62101 from bart0sh/PR0010-e2e_node-kubelet-command-line-fix
Automatic merge from submit-queue (batch tested with PRs 58474, 60034, 62101, 63198). 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 usage of kubelet option

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

"--allow-privileged true" is incorrect usage of boolean option.
It means setting '--allow-priviledged' to its default value plus
non-existing subcommand 'true'.

"--allow-privileged false" is even more confusing as it sets
allow-priviledged flag to its default value 'true'

This is true for any boolean command line option.

Fixed this by using correct syntax --allow-priviledged=true

**Special notes for your reviewer**:
This is a show-stopper for PR #61833 

**Release note**:

```release-note
NONE
```
2018-04-30 13:24:12 -07:00
Kubernetes Submit Queue 15cc20630d
Merge pull request #60034 from pohly/device-manager-goroutine
Automatic merge from submit-queue (batch tested with PRs 58474, 60034, 62101, 63198). 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 race condition in device manager and plugin startup/shutdown: wait for goroutines

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

Commit 1325c2f worked around issue #59488, but it is still worthwhile to fix the underlying root cause properly.

**Which issue(s) this PR fixes**:
Fixes #59488

**Special notes for your reviewer**:

This is an alternative to PR #59861, which used a different approach. Personally I tend to prefer this one now.

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

/sig node
/area hw-accelerators
/assign vikaschoudhary16
2018-04-30 13:24:08 -07:00
Kubernetes Submit Queue d39eac929f
Merge pull request #58474 from rphillips/feat/change_default_reconciler_type
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>.

apiserver: change default reconciler to LeaseEndpoint

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

Graduates the lease-endpoint-reconciler flag to beta, and defaults the endpoint reconciler to LeaseEndpoint instead of MasterCount.

- [x] Default Lease Endpoint Reconciler to on

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

**Special notes for your reviewer**:

**Release note**:

```release-note
kube-apiserver: `--endpoint-reconciler-type` now defaults to `lease`. The `master-count` reconciler is deprecated and will be removed in 1.13.
```
2018-04-30 12:58:55 -07:00
Kubernetes Submit Queue 9feb486a75
Merge pull request #63293 from serathius/prometheus-fix-alertmanager-pvc
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>.

[prometheus addon] Fix missing storage class in alertmanager PVC

Fixes ci-kubernetes-e2e-gce-prometheus test suite
https://k8s-gubernator.appspot.com/builds/kubernetes-jenkins/logs/ci-kubernetes-e2e-gce-prometheus
This PR adds missing storage class to PVC, gce does not have default storage class, so k8s was not able to create PVC.
```release-note
NONE
```
2018-04-30 11:12:25 -07:00
Maciej Szulik b7d4f15965
Remove Factory from more Run commands 2018-04-30 19:58:54 +02:00
Jordan Liggitt 7d7079f89a
Remove event recorder TODO 2018-04-30 13:38:50 -04:00
Jordan Liggitt bc5ed29300
Revert "fixtodo:validate events on PVCs in integration volume binding test"
This reverts commit 910fd1953e.
2018-04-30 13:17:20 -04:00
Ryan Phillips 0227534e99 apiserver: change default reconciler to LeaseEndpoint
Fixes #57617
2018-04-30 10:06:44 -05:00
Kubernetes Submit Queue 7ffd171c29
Merge pull request #62729 from databus23/fix-os-route-deletion
Automatic merge from submit-queue (batch tested with PRs 59879, 62729). 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>.

Openstack: fix orphaned route deletion

This is a follow-up to #56258 which only got half of the work done.
The OpenStack cloud providers DeleteRoute method fails to delete routes when it can’t find the corresponding instance in OpenStack.

```release-note
OpenStack cloudprovider: Fix deletion of orphaned routes
```
2018-04-30 06:58:06 -07:00
Kubernetes Submit Queue 34706b79e4
Merge pull request #59879 from humblec/gluster-dp-test-latest_1
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 tests for GlusterFS dynamic provisioner.

This bring up a heketi server pod and the server will be running
    in mock mode, the PVC creation should work, however the volume
    attachment to a pod and read/write is not part of this test. Due
    to the same reason the tests are marked as [fast].


Signed-off-by: Humble Chirammal <hchiramm@redhat.com>



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

```
2018-04-30 06:09:52 -07:00
Marek Siarkowicz f39b60824a [prometheus addon] Fix missing storage class in alertmanager PVC 2018-04-30 12:30:20 +02:00
Kubernetes Submit Queue 03c5f298f3
Merge pull request #62534 from nicolasbigler/duplicate-iptables-comment
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 duplicate comment in iptables rule for non-local public-port rule

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

When kubernetes creates an iptable rule for "from-non-local public-port"
rule the rule gets created with two identical comment section.

The function `iptablesNonLocalNodePortArgs` creates a list of arguments
for the rule from iptablesCommonPortalArgs function. This function
already appends the arguments for the rules comments and therefore does
not require appending the comment again.

**Special notes for your reviewer**:

I'm actually not a go programmer at all and have no idea how your tests work.
I doubt that my fix will require adjustements on tests but I'm not 100% sure.
If additional work is needed, I would be glad if someone could point it out to me so I can take care of it.

**Release note**:
```release-note
NONE
```
2018-04-29 11:39:40 -07:00
Kubernetes Submit Queue 8a006e67dc
Merge pull request #61874 from Pingan2017/changelog1-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>.

correct CHANGELOG-1.10.md

**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-29 07:45:43 -07:00
Kubernetes Submit Queue 9ac547fd23
Merge pull request #62581 from Pharb/changelog-1.10-etcd
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>.

1.10 CHANGELOG: Fix supported etcd version comparison with K8s v1.9

**What this PR does / why we need it**:
This updates the 1.10 CHANGELOG to correctly state that the supported etcd server version in v1.9 is 3.1.10.
This also corrects the reference to the pull request which updated the etcd version for v1.10. 

**Release note**:

```release-note
NONE
```
2018-04-29 07:45:22 -07:00
Kubernetes Submit Queue dfba1c1f2c
Merge pull request #62497 from MrHohn/endpoint-controller-headless-ports
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 a bug that headless service without ports fails to have endpoint created.

**What this PR does / why we need it**:
Follow up of https://github.com/kubernetes/kubernetes/pull/47250. Headless service without ports fails to have corresponding endpoint created because endpoint controller deliberately attaches a dummy endpointPort with portNum=0, which will fail API validation check. Error as below:
```
endpoints_controller.go:375] Error syncing endpoints for service "default/XXX": Endpoints "XXX" is invalid: subsets[0].ports[0].port: Invalid value: 0: must be between 1 and 65535, inclusive
```

This PR makes endpoint controller not attach the dummy endpointPort for headless service.

**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 #55158, fixes #62440 

**Special notes for your reviewer**:
cc @xiangpengzhao 

**Release note**:

```release-note
Fix a bug that headless service without ports fails to have endpoint created.
```
2018-04-29 07:45:02 -07:00
Kubernetes Submit Queue b16d054ed5
Merge pull request #62438 from MrHohn/ep-controller-owner
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 approvers to pkg/controller/endpoint

**What this PR does / why we need it**:
Promoting reviewers listed in pkg/controller/endpoint to approvers.

/assign @thockin 
cc @bowei 

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

**Release note**:

```release-note
NONE
```
2018-04-29 06:44:58 -07:00
Kubernetes Submit Queue f8fea90d8d
Merge pull request #62852 from serathius/prometheus-statefulset
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>.

[Prometheus addon] Use StatefulSet

This PR changes prometheus server manifest from deployment to statefulset. 
Version label is removed from pods because statefulset disallows updating selectors.

```release-note
NONE
```
/cc @branch @kawych
2018-04-29 04:34:36 -07:00
Kubernetes Submit Queue a4d2a3a4bb
Merge pull request #63271 from ceshihao/clean_test_util
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>.

Move pkg/scheduler/util/testutil.go to pkg/scheduler/testing

**What this PR does / why we need it**:
In the package `k8s.io/kubernetes/pkg/scheduler/util`, we have testutil.go, which has an init() function. Since this package is imported in production code, we are inadvertently running test code in production.

Fortunately (depending on how you look at it) scheduler already has a package called `k8s.io/kubernetes/pkg/scheduler/testing` which would be an appropriate home for these utils.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-04-29 03:21:39 -07:00
Kubernetes Submit Queue 2716de27b1
Merge pull request #56568 from zouyee/sync
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>.

sync code from copy destination

**What this PR does / why we need it**:
sync code from copy destination

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


**Special notes for your reviewer**:

**Release note**:

```
NONE

```
2018-04-28 18:26:38 -07:00
Kubernetes Submit Queue e2fe66c097
Merge pull request #60372 from sttts/sttts-scheduler-option-config
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>.

scheduler: align with ctrl-managers and apiservers, add https+auth in options

This switches the bootstrapping code to use the Options+Config pattern which
allows to compose flag sets and flag logic from reusable components.

This way https+authz+authn support is added to the Options struct (still disabled
for the actual binary, but available for downstreams).

TODOs:
- [x] fix kubeadm
2018-04-28 15:25:34 -07:00
Dr. Stefan Schimanski 24bc981918 Update bazel 2018-04-28 22:36:13 +02:00
Dr. Stefan Schimanski 2af0bdb00f scheduler: add https+authn+authz to options, set to nil for now 2018-04-28 22:36:13 +02:00
Dr. Stefan Schimanski abc8c98e35 scheduler: align plumbing with controller-manager and apiservers 2018-04-28 22:36:13 +02:00
Dr. Stefan Schimanski 85099ba4c2 controller-manager: unify address flag description to listen on all interfaces 2018-04-28 22:36:13 +02:00
Dr. Stefan Schimanski 01881d3f0c controller-manager: make InsecureServingOptions/Config re-usable 2018-04-28 22:36:13 +02:00
ceshihao 7f24a7c984 run make update 2018-04-28 15:43:09 +00:00
Kubernetes Submit Queue 81478b804e
Merge pull request #63275 from feiskyer/vmss-disk
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 panic for attaching AzureDisk to vmss nodes

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

Azure vmss virtual machine's data disks may be nil (while Azure virtual machine doesn't have the issue) so it will panic controller-manager when attaching new disks.

This PR fixes the issue by adding a check.

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

Should be cherry picked to v1.10.

**Release note**:

```release-note
Fix panic for attaching AzureDisk to vmss nodes
```
2018-04-28 03:47:09 -07:00
Pengfei Ni fd559ee165 Fix panic for attaching AzureDisk to vmss nodes 2018-04-28 15:48:39 +08:00
Kubernetes Submit Queue 24bc761aec
Merge pull request #62508 from dims/allow-customized-image-for-dockerized-kubelet
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>.

Support containerized kubelet in CI

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

  * Adjust hyperkube Makefile to allow HYPERKUBE_BIN to be
    specified from outside

  * new DOCKER_ROOT variable to specify --root-dir and associated
    volume for kubelet to know where docker directory lives

  * Save the docker logs when we kill the kubelet container

  * Allow customized image for dockerized kubelet and build a Default
    image if one is not specified

  We should allow a custom build using script we have:
  `VERSION="latest" REGISTRY="k8s.gcr.io" hack/dev-push-hyperkube.sh`

  to be used quickly using DOCKERIZE_KUBELET. To do this we remove the
  hard coded `k8s.gcr.io/kubelet` image and introduce a new environment
  variable `KUBELET_IMAGE`.

  Note that we are switching to hyperkube from kubelet as we have a quick
  and easy script to build hyperkube image and load it into local docker
  daemon. This reduces bad hacks like `docker tag
  k8s.gcr.io/hyperkube-amd64:<tag> k8s.gcr.io/kubelet:latest` being used
  by folks today (see 62057)

  * Better cope with PID 0 when running "docker inspect" to look for
    the process id for kubelet container


**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-27 21:06:23 -07:00
Kubernetes Submit Queue ded95bc9f1
Merge pull request #62863 from awly/kube-controller-manager-disable-controllers
Automatic merge from submit-queue (batch tested with PRs 62718, 62863). 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>.

gcp: add env var to configure enabled controllers in controller-manager

```release-note
NONE
```
2018-04-27 20:16:05 -07:00
Kubernetes Submit Queue 191d3c5681
Merge pull request #62718 from Lion-Wei/ipvs-host
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 problem that ipvs can't work with hostPort

**What this PR does / why we need it**:
Make ipvs proxy mode can work with pods that have hostPort.

**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 #61938
#60688 and #60305 are related too.

**Special notes for your reviewer**:
IPVS proxier will create dummy device named `kube-ipvs0`, which will maintain all ipvs virtual service address. That means all ipvs maintained clusterIP/externalIP/ingress will be treat as local address.

Then if we have a pod with hostPort, cni will attach this rule to `PREROUTING` chain:
```
KUBE-HOSTPORTS  all  --  0.0.0.0/0            0.0.0.0/0            /* kube hostport portals */ ADDRTYPE match dst-type LOCAL
```
so if a service have same port with pod's hostport, then this service can't be access.

In this pr, we added `ACCESS` rule for traffic that aim to ipvs virtual service, to prevent those traffic from be blocked by other rules.

**Release note**:
```release-note
NONE
```
2018-04-27 19:50:45 -07:00
ceshihao 56b3f2f409 move pkg/scheduler/util/testutil.go to pkg/scheduler/testing 2018-04-28 02:36:04 +00:00
Kubernetes Submit Queue ae53b78971
Merge pull request #63268 from Random-Liu/kubelet-readlog-backward-compatible
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>.

Make kubelet `ReadLogs` backward compatible.

`containerLogPathLabelKey` label was added in dockershim since 1.5. 121a91eb12

ContainerStatus.LogPath was added since Kubernetes 1.7. c3b52267ca

I believe it is safe to reply on this field without backward compatibility issue. And `crictl` is using it as well https://github.com/kubernetes-incubator/cri-tools/blob/master/cmd/crictl/logs.go#L88.

With this change, in the future, kubelet `ReadLogs` will be backward compatible as long as the log format is backward compatible.

@feiskyer @yujuhong @kubernetes/sig-node-pr-reviews 

Signed-off-by: Lantao Liu <lantaol@google.com>

**Release note**:

```release-note
none
```
2018-04-27 18:58:04 -07:00
Kubernetes Submit Queue d6967f358e
Merge pull request #63254 from liggitt/api-resources
Automatic merge from submit-queue (batch tested with PRs 60890, 63244, 60741, 63254). 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 name output and verb filtering to api-resources

This allows `kubectl api-resources -o name` to be used as input to `kubectl get ...`

to see all resources still existing in a given namespace:

Example:
```sh
kubectl api-resources --verbs=list --namespaced -o name | xargs -n 1 kubectl get -o name -n foo
```

Release note:
```release-note
`kubectl api-resources` now supports filtering to resources supporting specific verbs, and can output fully qualified resource names suitable for combining with commands like `kubectl get`
```
2018-04-27 17:43:13 -07:00
Kubernetes Submit Queue 55f17933f5
Merge pull request #60741 from zlabjp/optional-subjects
Automatic merge from submit-queue (batch tested with PRs 60890, 63244, 60741, 63254). 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>.

Indicate clusterrolebinding, rolebinding subjects are optional fields

**What this PR does / why we need it**: With this PR, clusterrolebinding and rolebinding subjects are marked optional instead of required. Currently we cannot create clusterrolebinding and rolebinding with subjects are empty using `kubectl create/apply/replace -f`.

```
$ kubectl create rolebinding test --clusterrole view
rolebinding "test" created
$ kubectl get rolebinding test -o yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
  creationTimestamp: 2018-03-02T06:58:16Z
  name: test
  namespace: default
  resourceVersion: "5606612"
  selfLink: /apis/rbac.authorization.k8s.io/v1/namespaces/default/rolebindings/test
  uid: 155c5c29-1de7-11e8-9f6f-fa163ec89f2a
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: view
subjects: null
$ kubectl get rolebinding test -o yaml | kubectl replace -f -
error: error validating "STDIN": error validating data: ValidationError(RoleBinding): missing required field "subjects" in io.k8s.api.rbac.v1.RoleBinding; if you choose to ignore these errors, turn validation off with --validate=false
```

**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**: This is a same issue with https://github.com/kubernetes/kubernetes/issues/59403. /cc @liggitt 

**Release note**:

```release-note
NONE
```
2018-04-27 17:43:11 -07:00
Kubernetes Submit Queue d2b2c33052
Merge pull request #63244 from soltysh/finish_printflags
Automatic merge from submit-queue (batch tested with PRs 60890, 63244, 60741, 63254). 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>.

Finish wiring PrintFlags

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

This is rebased version of #63055, I don't want to wait for @juanvallejo to return and to unblock myself, and him for next week. I've rebased his PR and will push it forward.

/assign @deads2k 

since you "broke" us 😉 

**Release note**:
```release-note
NONE
```
2018-04-27 17:43:07 -07:00
Kubernetes Submit Queue bbcd21e0ab
Merge pull request #60890 from rphillips/tests/lease_endpoint
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>.

apiserver: master count and lease endpoint test

**What this PR does / why we need it**: Adds a test to make sure master count and lease endpoint reconcilers work well together, so we can bump LeaseEndpoint to beta. Based on Jordan's comment https://github.com/kubernetes/kubernetes/pull/58474#issuecomment-369954890. 

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Issue: #57617
Followup PR: #58474

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
/cc @kubernetes/sig-cluster-lifecycle-api-reviews @kubernetes/sig-cluster-lifecycle-api-reviews
2018-04-27 16:54:16 -07:00
Lantao Liu 4bb16659ee Make kubelet `ReadLogs` backward compatible.
Signed-off-by: Lantao Liu <lantaol@google.com>
2018-04-27 16:03:29 -07:00
Kubernetes Submit Queue c929ec153a
Merge pull request #63202 from deads2k/api-10-selflink
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>.

remove self linker from group info

The self-link is related to RESTStorage, not to the scheme/codec.  Also, no one every customized it.  This moves it to the single point of use and retains the override potential.

@kubernetes/sig-api-machinery-pr-reviews 

```release-note
NONE
```
2018-04-27 15:59:01 -07:00
Jonathan Basseri 79d30b1ad6 Hide EquivalenceCache mutex from users.
Since the equiv. cache lock no longer needs to be held across multiple
method calls, move the locking inside and don't expose it to users.
2018-04-27 15:55:10 -07:00
Jonathan Basseri b85184227d Rename exported methods on EquivalenceCache.
This changes two methods in EquivalenceCache to be unexported, because
they should no longer be called by users of this type. (Even users in
the same package!)
2018-04-27 15:55:10 -07:00
Jonathan Basseri 55662f26f1 Simplify logic in podFitsOnNode.
Use new (*EquivalenceCache).RunPredicate to simplify how we read and
update the equivalence cache items.
2018-04-27 15:55:10 -07:00
Jonathan Basseri e67b3225a4 Remove predicateResults map from podFitsOnNode.
The purpose of this map is to combine two predicate results before
writing to the equivalence cache. However, the branch that combines
results is unreachable.

1. Combining results happens in the second iteration of the outer loop.
2. There is only a second iteration when podsAdded is true.
3. We skip equiv. cache when podsAdded is true.
2018-04-27 15:55:10 -07:00