Commit Graph

2125 Commits (094116ac9a0f5794881792db1be21099b510f4cf)

Author SHA1 Message Date
Kubernetes Submit Queue 0c6970bf7b Merge pull request #52723 from k82cn/k8s_42001_5
Automatic merge from submit-queue (batch tested with PRs 52723, 53271). 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>.

Apply algorithm in scheduler by feature gates.

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

**Release note**:
```release-note
Apply algorithm in scheduler by feature gates.
```
2017-10-03 05:15:20 -07:00
Kubernetes Submit Queue 8eb37aee3a Merge pull request #53359 from liggitt/swagger.json
Automatic merge from submit-queue (batch tested with PRs 50749, 52869, 53359). 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 /swagger.json and /swagger-2.0.0.pb-v1 to discovery role

Allow access to openapi docs
Fixes #53349
2017-10-02 21:43:14 -07:00
Jordan Liggitt d657261f9b
Add /swagger.json and /swagger-2.0.0.pb-v1 to discovery role 2017-10-02 21:52:13 -04:00
Kubernetes Submit Queue dd99659dc1 Merge pull request #53156 from p0lyn0mial/move_admission_initializer_interfaces_to_apiserver
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>.

moved admission interfaces WantsClientCert, WantsAuthorizer and Wants…

**What this PR does / why we need it**:
moves some admission interfaces to apiserver, hopefully moving the webhook admission in the future will be much easier.

**Release note**:

```
NONE
```
2017-10-02 12:06:26 -07:00
Kubernetes Submit Queue 2ec89d1e13 Merge pull request #53247 from surajssd/remove-unused-predicate-args-func
Automatic merge from submit-queue (batch tested with PRs 53247, 53319). 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 unused function addStorageLimit

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

In package `plugin/pkg/scheduler/algorithm/predicates` remove unused
unexported function `addStorageLimit`.


**Release note**:

```release-note
NONE
```
2017-10-02 04:51:26 -07:00
p0lyn0mial 475493ced6 moved admission interfaces WantsClientCert, WantsAuthorizer and WantsExternalKubeClientSet to apiserver 2017-10-01 15:03:08 +02:00
Klaus Ma bd15efd3e5 Enhance scheduler for TaintNodeByCondition. 2017-10-01 08:26:35 +08:00
Kubernetes Submit Queue 887598c2eb Merge pull request #52654 from liggitt/pdb-permissions
Automatic merge from submit-queue (batch tested with PRs 53263, 52967, 53262, 52654, 53187). 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 pod disruption budgets to admin/edit/view roles

Closes #50767

cc @kubernetes/sig-auth-pr-reviews @kubernetes/sig-node-pr-reviews

```release-note
RBAC: The default `admin` and `edit` roles now include read/write permissions and the `view` role includes read permissions on `poddisruptionbudget.policy` resources.
```
2017-09-29 13:37:30 -07:00
Suraj Deshmukh bf25a2753b remove unused function addStorageLimit
In package `plugin/pkg/scheduler/algorithm/predicates` remove unused
unexported function `addStorageLimit`.
2017-09-29 12:17:52 +05:30
Kubernetes Submit Queue 1cd6a50809 Merge pull request #47640 from xiangpengzhao/fix-bin-ver
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 version info to kube-scheduler, kube-proxy and kubelet logs.

**What this PR does / why we need it**:
#46047 add such info to apiserver and CM. This adds version info to other binaries.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-09-28 20:02:59 -07:00
wackxu 2db3728fb7 use patch PodStatus to avoid overwriting potential pending status updates 2017-09-25 22:00:10 +08:00
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
xiangpengzhao af09159419 Add version info to kube-scheduler, kube-proxy and kubelet logs. 2017-09-21 17:46:24 +08: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
Jordan Liggitt 83b71b6dfe
Add pod disruption budgets to admin/edit/view roles 2017-09-18 10:15:24 -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