Commit Graph

2112 Commits (6d71eb590bf54d2fd7ff9c1370e4a9b83875470a)

Author SHA1 Message Date
Kubernetes Submit Queue 7c9e614cbb Merge pull request #52873 from ixdy/bazel-cleanup
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>..

bazel: build/test almost everything

**What this PR does / why we need it**: Miscellaneous cleanups and bug fixes. The main motivating idea here was to make `bazel build //...` and `bazel test //...` mostly work. (There's a few reasons these still don't work, but we're a lot closer.)

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```

/assign @BenTheElder @mikedanese @spxtr
2017-09-24 00:04:36 -07:00
Kubernetes Submit Queue f67e127a3b Merge pull request #52558 from jennybuckley/master
Automatic merge from submit-queue (batch tested with PRs 52831, 52764, 52763, 52673, 52558). 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 updating objects with empty pending initializers list

**What this PR does / why we need it**: When updating an object, an empty pending list should be treated as a nil initializer. This PR fixes a bug which prevented this functionality and also adds a test which will ensure this functionality is preserved.

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

**Special notes for your reviewer**:

/cc @caesarxuchao

**Release note**:

```release-note
Fixes an initializer bug where update requests which had an empty pending initializers list were erroneously rejected.
```
2017-09-23 22:57:57 -07:00
Kubernetes Submit Queue 7f3f986402 Merge pull request #52673 from p0lyn0mial/webhook_default_service_resolver
Automatic merge from submit-queue (batch tested with PRs 52831, 52764, 52763, 52673, 52558). 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>..

default service resolver for webhook admission

**What this PR does / why we need it**:
provides a default service resolver for webhook plugin. The rationale behind is that webhook plugins names can be resolved by a dns server working inside a cluster.


**Release note**:

```
NONE
```
2017-09-23 22:57:54 -07:00
Kubernetes Submit Queue 616ce0f4e7 Merge pull request #52829 from gaocegege/fix-link
Automatic merge from submit-queue (batch tested with PRs 52469, 52574, 52330, 52689, 52829). 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>..

generic_scheduler.go: Fix link in comment

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

Fix a link in generic_scheduler.go which is outdated

**Release note**:

```release-note
NONE
```

Signed-off-by: Ce Gao <ce.gao@outlook.com>
2017-09-23 21:52:57 -07:00
Kubernetes Submit Queue a5552e8da9 Merge pull request #52689 from stewart-yu/issue#07
Automatic merge from submit-queue (batch tested with PRs 52469, 52574, 52330, 52689, 52829). 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

**What this PR does / why we need it**:
No test file for testutil.go

**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-09-23 21:52:54 -07:00
Kubernetes Submit Queue 6e9012c94c Merge pull request #52137 from aveshagarwal/master-scheduler-resources-consolidation
Automatic merge from submit-queue (batch tested with PRs 51902, 52718, 52687, 52137, 52697). 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>..

Consolidate extended resources and hugepages in Scheduler

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

@bsalamat @derekwaynecarr @sjenning @kubernetes/sig-scheduling-pr-reviews
2017-09-23 19:49:54 -07:00
Kubernetes Submit Queue 507e21e7b9 Merge pull request #51889 from guangxuli/pod_affinity_error
Automatic merge from submit-queue (batch tested with PRs 52168, 48939, 51889, 52051, 50396). 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 specific errors for pod affinity predicates

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

Add specific error for pod affinity predicates

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

fix https://github.com/kubernetes/kubernetes/issues/51655

**Special notes for your reviewer**:
none
**Release note**:
none
2017-09-23 13:40:50 -07:00
Kubernetes Submit Queue 14cedb9f58 Merge pull request #51582 from jiulongzaitian/myfeature
Automatic merge from submit-queue (batch tested with PRs 43016, 50503, 51281, 51518, 51582). 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 AddEventHandlerWithResyncPeriod to AddEventHandler in factory.go

Signed-off-by: zhangjie <zhangjie0619@yeah.net>



**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
change AddEventHandlerWithResyncPeriod to AddEventHandler in factory.go
```
2017-09-22 23:36:02 -07:00
Kubernetes Submit Queue 04673ab614 Merge pull request #52618 from dims/deprecate-pvl-admission-controller
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>..

deprecate warning for persistent volume admission controller

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

deprecate warning for persistent volume admission controller

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

Fixes #52617

**Special notes for your reviewer**:

**Release note**:

```release-note
PersistentVolumeLabel admission controller is now deprecated.
```
2017-09-21 22:04:55 -07:00
Jeff Grafton 02fb4200dc Use buildozer to delete licenses() rules 2017-09-21 15:53:22 -07:00
Jeff Grafton 532bd482df Use buildozer to remove deprecated automanaged tags 2017-09-21 15:53:22 -07:00
Davanum Srinivas cf3fe0b5d4 deprecate warning for persistent volume admission controller 2017-09-21 14:36:29 -04:00
jennybuckley 44ec189fb0 Fixed logic with updates in initializer plugin 2017-09-21 11:06:14 -07:00
Ce Gao 1a2e1f2618 generic_scheduler.go: Fix link in comment
Signed-off-by: Ce Gao <ce.gao@outlook.com>
2017-09-21 13:50:42 +08:00
p0lyn0mial 1e2c7fdd88 default service resolver for webhook admission
the rationale behind is that webhook plugins names can be resolved by a dns server working inside a cluster.
2017-09-20 17:37:11 +02:00
Kubernetes Submit Queue fb994df7e0 Merge pull request #51337 from php-coder/psp_star_in_allowed_caps
Automatic merge from submit-queue (batch tested with PRs 51337, 47080, 52646, 52635, 52666). 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>..

PodSecurityPolicy.allowedCapabilities: add support for * to allow to request any capabilities

**What this PR does / why we need it**:
Prior this change there was no way to allow to pods to request any capabilities. Cluster admin had always specify a full list of capabilities explicitly. Because there are many of them, it gets tedious. This PR makes possible to use `*` to allow all possible capabilities. Non-paranoid (and lazy) cluster admins can use it. Those who are super strict and paranoid of course won't use it because `*` allows capabilities that don't exist today but may be introduced in the future.

"privileged" PSP in examples was modified to allow privileged users to use this feature.

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

**Special notes for your reviewer**:
This functional is already present in OpenShift: https://github.com/openshift/origin/pull/12875 and https://github.com/openshift/origin/pull/15135

**Release note**:
```release-note
PSP: add support for using `*` as a value in `allowedCapabilities` to allow to request any capabilities
```

CC @simo5 @pweil- @gyliu513 @liqlin2015
2017-09-19 17:31:04 -07:00
stewart-yu 11722094c2 Add test file for go file 2017-09-19 12:28:36 +08:00
Hemant Kumar 780c531e86 Resize plugin should only check for increase in size
We should only check if user is trying to increase the volume.
2017-09-18 14:36:14 -04:00
Avesh Agarwal ae05a6da34 Consolidate extended resources and hugepages in Scheduler. 2017-09-18 09:32:16 -04:00
Solly Ross 8cbbbac27d Add bootstrap policy for HPA metrics REST clients
Since we weren't running the HPA with metrics REST clients by default,
we had no bootstrap policy enabling the HPA controller to talk to the
metrics APIs.

This adds permissions for the HPA controller to talk list
pods.metrics.k8s.io, and list any resource in custom.metrics.k8s.io.
2017-09-15 17:27:38 -04:00
Kubernetes Submit Queue 9aef242a4c Merge pull request #52223 from bsalamat/approver
Automatic merge from submit-queue (batch tested with PRs 51796, 52223)

Add bsalamat to sig-scheduling-maintainers

**What this PR does / why we need it**:
Adds bsalamat to sig-scheduling-maintainers.

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

@kubernetes/sig-scheduling-pr-reviews @davidopp @timothysc @k82cn @wojtek-t
2017-09-15 05:51:23 -07:00
Kubernetes Submit Queue 935726f109 Merge pull request #52452 from gnufied/fix-quota-on-update
Automatic merge from submit-queue (batch tested with PRs 52452, 52115, 52260, 52290)

Fix support for updating quota on update

This PR implements support for properly handling quota when resources are updated. We never take negative values and add them up.

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

cc @derekwaynecarr 

/sig storage

```release-note
Make sure that resources being updated are handled correctly by Quota system
```
2017-09-15 01:59:56 -07:00
Kubernetes Submit Queue 7181dd4946 Merge pull request #50476 from caesarxuchao/plumb-proxy
Automatic merge from submit-queue (batch tested with PRs 51824, 50476, 52451, 52009, 52237)

Plumbing the proxy dialer to the webhook admission plugin

* Fixing https://github.com/kubernetes/kubernetes/issues/49987. Plumb the `Dial` function to the `transport.Config`
* Fixing https://github.com/kubernetes/kubernetes/issues/52366. Let the webhook admission plugin sets the `TLSConfg.ServerName`.

I tested it in my gke setup. I don't have time to implement an e2e test before 1.8 release. I think it's ok to add the test later, because *i)* the change only affects the alpha webhook admission feature, and *ii)* the webhook feature is unusable without the fix. That said, it's up to my reviewer to decide.

Filed https://github.com/kubernetes/kubernetes/issues/52368 for the missing e2e test.

( The second commit is https://github.com/kubernetes/kubernetes/pull/52372, which is just a cleanup of client configuration in e2e tests. It removed a function that marshalled the client config to json and then unmarshalled it. It is a prerequisite of this PR, because this PR added the `Dial` function to the config which is not json marshallable.)

```release-note
Fixed the webhook admission plugin so that it works even if the apiserver and the nodes are in two networks (e.g., in GKE).
Fixed the webhook admission plugin so that webhook author could use the DNS name of the service as the CommonName when generating the server cert for the webhook.

Action required:
Anyone who generated server cert for admission webhooks need to regenerate the cert. Previously, when generating server cert for the admission webhook, the CN value doesn't matter. Now you must set it to the DNS name of the webhook service, i.e., `<service.Name>.<service.Namespace>.svc`.
```
2017-09-15 01:08:01 -07:00
Kubernetes Submit Queue 1646db0ba7 Merge pull request #52247 from wackxu/atd
Automatic merge from submit-queue (batch tested with PRs 52442, 52247, 46542, 52363, 51781)

Add some test case in default_test.go

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

Add some test case in default_test.go

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


**Release note**:

```release-note
NONE
```
2017-09-15 00:11:08 -07:00
Chao Xu 856a1db57a fix the webhook unit test; the server cert needs to have a valid CN;
fix a fuzzer;
2017-09-14 15:36:25 -07:00
Chao Xu 186a0684d5 plumb the proxyTransport to the webhook admission plugin;
set the ServerName in the config for webhook admission plugin.
2017-09-14 15:35:12 -07:00
Hemant Kumar 066fcf785e Implement support for updating resources 2017-09-13 21:05:44 -04:00
Gavin a724a0fcdc Add specific errors for pod affinity predicates 2017-09-13 23:47:58 +08:00
Kubernetes Submit Queue 83b4c0ac84 Merge pull request #48226 from wongma7/pd-predicate-log
Automatic merge from submit-queue (batch tested with PRs 48226, 52046, 52231, 52344, 52352)

Log get PVC/PV errors in MaxPD predicate only at high verbosity

The error is effectively ignored since even if a PVC/PV doesn't exist it gets counted, and it's rarely actionable either so let's reduce the verbosity.

Basically a user somewhere on the cluster will have to have done something "wrong" for this error to occur, e.g. if *,while the pod is running, pod's PVC is deleted or pods' PVC's PV is deleted. And from that point forward the logs will be spammed every time the predicate is evaluated on a node where that "wrong" pod exists

**Release note**:

```release-note
NONE
```
2017-09-12 19:39:52 -07:00
Kubernetes Submit Queue 0ae98b6ffe Merge pull request #52146 from resouer/eclass-fix
Automatic merge from submit-queue

Note equivalence class for dev and other fix

**What this PR does / why we need it**:
1. Add a note for predicate developers to respect equivalence class design
2. Add comments and re-ordered the related data structure, ref https://github.com/kubernetes/community/pull/1031
3. Fix some nits (typo, code length etc)


**Special notes for your reviewer**:

**Release note**:

```release-note
Scheduler predicate developer should respect equivalence class cache
```
2017-09-12 04:36:10 -07:00
Bobby (Babak) Salamat e38d4a0a8f Add bsalamat to sig-scheduling-maintainers 2017-09-11 11:10:57 -07:00
gmarek b152d08ba4 fix condition-taint labels 2017-09-11 10:19:51 +02:00
wackxu ec058b14f0 add some test case 2017-09-10 20:31:53 +08:00
Harry Zhang 71babd1496 Note equivalence class for dev and other fix 2017-09-09 22:35:16 +08:00
Kubernetes Submit Queue f695a3120a Merge pull request #50949 from bsalamat/preemption_eviction
Automatic merge from submit-queue

Add pod preemption to the scheduler

**What this PR does / why we need it**:
This is the last of a series of PRs to add priority-based preemption to the scheduler. This PR connects the preemption logic to the scheduler workflow.

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

**Special notes for your reviewer**:
This PR includes other PRs which are under review (#50805, #50405, #50190). All the new code is located in 43627afdf9.

**Release note**:

```release-note
Add priority-based preemption to the scheduler.
```

ref/ #47604

/assign @davidopp 

@kubernetes/sig-scheduling-pr-reviews
2017-09-08 14:19:42 -07:00
Bobby (Babak) Salamat c0b718373b Fix RBAC rules to allow scheduler update annotations of pods. 2017-09-07 15:31:55 -07:00
Bobby (Babak) Salamat 86b06c3832 autogenerated files 2017-09-07 15:31:55 -07:00
Bobby (Babak) Salamat 4a08dff168 Add pod eviction logic for scheduler preemption
Add Preempt to scheduler interface
Add preemption to the scheduling workflow
Minor changes to the scheduler integration test library
2017-09-07 15:31:55 -07:00
Kubernetes Submit Queue 0ed05f2d08 Merge pull request #49133 from deads2k/gc-02-permissions
Automatic merge from submit-queue (batch tested with PRs 49133, 51557, 51749, 50842, 52018)

add controller permissions to set blockOwnerDeletion

fixes https://github.com/kubernetes/kubernetes/issues/51970

`blockOwnerDeletion` requires delete permissions on the owner object.  This adds that permission for our controllers.

@kubernetes/sig-auth-misc 

```release-note
The OwnerReferencesPermissionEnforcement admission plugin now requires `update` permission on the `finalizers` subresource of the referenced owner in order to set `blockOwnerDeletion` on an owner reference.
```
2017-09-06 13:36:04 -07:00
Slava Semushin 9015a82692 PodSecurityPolicy.allowedCapabilities: add support for using * to allow to request any capabilities.
Also modify "privileged" PSP to use it and allow privileged users to use
any capabilities.
2017-09-06 12:18:09 +02:00
David Eads 2572ea50e0 add permissions to workload controllers to block owners 2017-09-05 13:47:49 -04:00
David Eads 6d040812f0 check block owner ref on finalizers subresource 2017-09-05 11:29:52 -04:00
Derek Carr 41a4e2ccad Scheduler support for hugepages 2017-09-05 09:46:08 -04:00
saadali 3b834cf665 Modify VolumeZonePredicate to handle multi-zone PV
Modifies the VolumeZonePredicate to handle a PV that belongs to more
then one zone or region. This is indicated by the zone or region label
value containing a comma separated list.
2017-09-04 20:13:32 -07:00
Hemant Kumar 84029c2c1a Update generated files - api, bazel, json
Update all generated files json, protocolbuffers,
documentation
2017-09-04 09:02:35 +02:00
Hemant Kumar 530ae4b3b5 Add rbac policy change for expand controller 2017-09-04 09:02:34 +02:00
Hemant Kumar e78d433150 Implement necessary API changes
Introduce feature gate for expanding PVs
Add a field to SC
Add new Conditions and feature tag pvc update
Add tests for size update via feature gate
register the resize admission plugin
Update golint failures
2017-09-04 09:02:34 +02:00
Kubernetes Submit Queue a4ff702a13 Merge pull request #51818 from liggitt/controller-roles
Automatic merge from submit-queue (batch tested with PRs 51819, 51706, 51761, 51818, 51500)

Build controller roles/bindings on demand

As we start to have alpha gated features that involve policy changes, we need to conditionally include roles/bindings in policy based on feature enablement.

Examples:
 * https://github.com/kubernetes/kubernetes/pull/49727/files#diff-a066255fca075e2bdcfe045e7ca352f7
 * https://github.com/kubernetes/kubernetes/pull/51202/files#diff-eee450e334a11e0b683ce965f584c3c4R137

This moves the policy building from an init() func to be on demand, so that feature gates set at the point we set up the post-start reconcile take effect
2017-09-03 15:00:11 -07:00
Kubernetes Submit Queue 4d42f80382 Merge pull request #50925 from staebler/server-event-rate-limiter
Automatic merge from submit-queue (batch tested with PRs 51805, 51725, 50925, 51474, 51638)

Limit events accepted by API Server

**What this PR does / why we need it**:
This PR adds the ability to limit events processed by an API server. Limits can be set globally on a server, per-namespace, per-user, and per-source+object. This is needed to prevent badly-configured or misbehaving players from making a cluster unstable.

Please see https://github.com/kubernetes/community/pull/945.

**Release Note:**
```release-note
Adds a new alpha EventRateLimit admission control that is used to limit the number of event queries that are accepted by the API Server.
```
2017-09-03 11:10:03 -07:00
Kubernetes Submit Queue c84b3132a2 Merge pull request #48051 from xilabao/add-selfsubjectrulesreview-api
Automatic merge from submit-queue (batch tested with PRs 45724, 48051, 46444, 51056, 51605)

Add selfsubjectrulesreview in authorization

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

**Which issue this PR fixes**: fixes #47834 #31292

**Special notes for your reviewer**:

**Release note**:

```release-note
Add selfsubjectrulesreview API for allowing users to query which permissions they have in a given namespace.
```
/cc @deads2k @liggitt
2017-09-02 12:11:04 -07:00