Commit Graph

2112 Commits (6d71eb590bf54d2fd7ff9c1370e4a9b83875470a)

Author SHA1 Message Date
Chao Xu 14dc1d8cb1 generated 2017-08-24 13:35:26 -07:00
Chao Xu 1e837a9387 add unit test 2017-08-24 13:35:26 -07:00
Chao Xu fcd646d80e Let the initializer admission plugin set the metadata.intializers to nil
if an update makes the pendings and the result both nil
2017-08-24 11:23:51 -07:00
Chen Rong f0f06a3d1e remove deprecated rbac rule 2017-08-24 15:14:20 +08:00
Kubernetes Submit Queue 26ed1a7b00 Merge pull request #51094 from xilabao/rbac-v1-in-bootstrappolicy
Automatic merge from submit-queue (batch tested with PRs 38947, 50239, 51115, 51094, 51116)

update to rbac v1 in bootstrappolicy test

xref https://github.com/kubernetes/features/issues/2



**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**:
cc @liggitt 

**Release note**:

```release-note
NONE
```
2017-08-23 08:41:10 -07:00
Kubernetes Submit Queue 178a5ff314 Merge pull request #50665 from xiangpengzhao/hardcode-to-const
Automatic merge from submit-queue (batch tested with PRs 50257, 50247, 50665, 50554, 51077)

Replace hard-code "cpu" and "memory" to consts

**What this PR does / why we need it**:
There are many places using hard coded "cpu" and "memory" as resource name. This PR replace them to consts.

**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**:
/kind cleanup

**Release note**:

```release-note
NONE
```
2017-08-23 02:35:09 -07:00
Chen Rong a9f57e90a4 update to rbac v1 in bootstrappolicy test 2017-08-22 09:28:14 +08:00
Kubernetes Submit Queue cb8ade18c6 Merge pull request #50950 from k82cn/revert_50360
Automatic merge from submit-queue

Revert #50362.

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

**Release note**:

```release-note
None
```
2017-08-21 16:50:53 -07:00
Kubernetes Submit Queue 0f8eaa45dd Merge pull request #49976 from aveshagarwal/master-pod-affinities-topology-key
Automatic merge from submit-queue (batch tested with PRs 50531, 50853, 49976, 50939, 50607)

Do not allow empty topology key for pod affinities.

**What this PR does / why we need it**:
This PR do not allow empty topology key for all 4 pod affinities.

**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
Affinity in annotations alpha feature is no longer supported in 1.8. Anyone upgrading from 1.7 with AffinityInAnnotation feature enabled must ensure pods (specifically with pod anti-affinity PreferredDuringSchedulingIgnoredDuringExecution) with empty TopologyKey fields must be removed before upgrading to 1.8.
```
@kubernetes/sig-scheduling-bugs  @bsalamat @davidopp
2017-08-21 15:46:20 -07:00
Klaus Ma df3a699069 Revert #50362. 2017-08-19 10:24:50 +08:00
Kubernetes Submit Queue afabd09889 Merge pull request #50876 from enj/enj/f/owners_reviewer
Automatic merge from submit-queue

Add enj as reviewer to OWNERS

Adding myself as a reviewer for the following areas:

- API
- auth
- registry
- storage (etcd)

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

**Release note**:

```release-note
NONE
```

@kubernetes/sig-api-machinery-pr-reviews
@kubernetes/sig-auth-pr-reviews
2017-08-18 05:42:07 -07:00
Monis Khan dd06794bc2
Add enj as reviewer to OWNERS
Adding myself as a reviewer for the following areas:

- API
- auth
- registry
- storage (etcd)

Signed-off-by: Monis Khan <mkhan@redhat.com>
2017-08-17 20:42:46 -04:00
Chao Xu bf6155b08c make admission plugins handle mutating spec of uninitialized pods 2017-08-17 12:51:09 -07:00
Kubernetes Submit Queue acd5f22398 Merge pull request #50581 from k82cn/k8s_50360_1
Automatic merge from submit-queue (batch tested with PRs 49342, 50581, 50777)

Update RegisterMandatoryFitPredicate to avoid double register.

**What this PR does / why we need it**:
In https://github.com/kubernetes/kubernetes/pull/50362 , we introduced `RegisterMandatoryFitPredicate` to make some predicates always included by scheduler. This PRs is to improve it by avoiding double register: `RegisterFitPredicate` and `RegisterMandatoryFitPredicate` 

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

**Release note**:

```release-note
None
```
2017-08-16 23:08:15 -07:00
Kubernetes Submit Queue ce1485c626 Merge pull request #48922 from ConnorDoyle/integer-resources-as-default
Automatic merge from submit-queue (batch tested with PRs 46317, 48922, 50651, 50230, 47599)

Resources outside the `*kubernetes.io` namespace are integers and cannot be over-committed.

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

Fixes #50473 

Rationale: since the scheduler handles all resources except CPU as integers, that could just be the default behavior for namespaced resources.

cc @RenaudWasTaken @vishh 

**Release note**:

```release-note
Resources outside the `*kubernetes.io` namespace are integers and cannot be over-committed.
```
2017-08-16 19:50:15 -07:00
Klaus Ma 051dfb1ba2 address review comments. 2017-08-17 08:22:11 +08:00
Connor Doyle 630af5422b OIR predicate includes namespaced resources. 2017-08-16 15:29:24 -07:00
Monis Khan 8e7893e541
Refactor RBAC authorizer entry points
This change refactors various RBAC authorizer functions to be more
flexible in their inputs.  This makes it easier to reuse the various
components that make up the authorizer.

Signed-off-by: Monis Khan <mkhan@redhat.com>
2017-08-16 11:43:39 -04:00
xiangpengzhao 1c4dbcf5ca Replace hard-code "cpu" and "memory" to consts 2017-08-16 16:37:50 +08:00
Klaus Ma 2da96fc458 Replaced bool map to string set. 2017-08-16 14:57:12 +08:00
Klaus Ma 4a32bde4a5 Update RegisterMandatoryFitPredicate to avoid double register. 2017-08-15 21:03:14 +08:00
Kubernetes Submit Queue 55160e7cc1 Merge pull request #49322 from bsalamat/priority_admission
Automatic merge from submit-queue

Add Priority admission controller

**What this PR does / why we need it**: Add Priority admission controller. This admission controller checks creation and update of PriorityClasses. It also resolves a PriorityClass name of a pod to its integer value.

**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
Add Priority admission controller for monitoring and resolving PriorityClasses.
```

ref/ #47604
ref/ #48646
2017-08-15 03:13:15 -07:00
zhangjie c87d42763d Modify the initialization of results in generic_scheduler.go
Signed-off-by: zhangjie <zhangjie0619@yeah.net>
2017-08-15 16:14:44 +08:00
Kubernetes Submit Queue 9f902fef24 Merge pull request #50094 from sttts/sttts-no-importprefix
Automatic merge from submit-queue (batch tested with PRs 50094, 48966, 49478, 50593, 49140)

apimachinery: remove pre-apigroups import path logic

Replacing #50093.
2017-08-14 12:14:55 -07:00
Kubernetes Submit Queue f8eed144f5 Merge pull request #50180 from k82cn/k8s_42001-2
Automatic merge from submit-queue

Task 3: Add MemoryPressure toleration for no BestEffort pod.

**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
After 1.8, admission controller will add 'MemoryPressure' toleration to Guaranteed and Burstable pods.
```
2017-08-14 10:51:17 -07:00
Kevin f76ca1fb16 update clientset.Core() to clientset.CoreV1() in test 2017-08-14 16:53:55 +08:00
Kubernetes Submit Queue 2820b45caa Merge pull request #50362 from k82cn/k8s_50360
Automatic merge from submit-queue

Moved node condition filter into a predicates.

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

**Release note**:
```release-note
A new predicates, named 'CheckNodeCondition', was added to replace node condition filter. 'NetworkUnavailable', 'OutOfDisk' and 'NotReady' maybe reported as a reason when failed to schedule pods.
```
2017-08-12 15:10:31 -07:00
Kubernetes Submit Queue 03ea3eeff2 Merge pull request #47724 from FengyunPan/update-admission-control-arg
Automatic merge from submit-queue

Update admission control args in imagepolicy comment

Use '--admission-control-config-file' rather than
'--admission-controller-config-file'

**Release note**:
```release-note
NONE
```
2017-08-11 18:26:57 -07:00
Klaus Ma 78e078390f Renamed to RegisterMandatoryFitPredicate. 2017-08-12 07:28:40 +08:00
Kubernetes Submit Queue cd4f6edf33 Merge pull request #47017 from zhangxiaoyu-zidif/fix-name-print-type
Automatic merge from submit-queue

Fix print type of podname

**What this PR does / why we need it**:
It is better to change it to %s. According to context and other prints of this file, pod name's print type are all %s, except this one.
Although it does not affect the result.

**Release note**:

```release-note
NONE
```
2017-08-11 15:52:35 -07:00
Jeff Grafton a7f49c906d Use buildozer to delete licenses() rules except under third_party/ 2017-08-11 09:32:39 -07:00
Jeff Grafton 33276f06be Use buildozer to remove deprecated automanaged tags 2017-08-11 09:31:50 -07:00
Jeff Grafton cf55f9ed45 Autogenerate BUILD files 2017-08-11 09:30:23 -07:00
Klaus Ma e9738c0ce6 Moved node condition filter into a predicates. 2017-08-11 16:43:33 +08:00
Dr. Stefan Schimanski 8728576236 apimachinery: remove pre-apigroups import prefix logic 2017-08-10 13:07:54 +02:00
Kubernetes Submit Queue 458cc04330 Merge pull request #46254 from mtaufen/dkcfg
Automatic merge from submit-queue (batch tested with PRs 50016, 49583, 49930, 46254, 50337)

Alpha Dynamic Kubelet Configuration

Feature: https://github.com/kubernetes/features/issues/281

This proposal contains the alpha implementation of the Dynamic Kubelet Configuration feature proposed in ~#29459~ [community/contributors/design-proposals/dynamic-kubelet-configuration.md](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/dynamic-kubelet-configuration.md). 

Please note:
- ~The proposal doc is not yet up to date with this implementation, there are some subtle differences and some more significant ones. I will update the proposal doc to match by tomorrow afternoon.~
- ~This obviously needs more tests. I plan to write several O(soon). Since it's alpha and feature-gated, I'm decoupling this review from the review of the tests.~ I've beefed up the unit tests, though there is still plenty of testing to be done.
- ~I'm temporarily holding off on updating the generated docs, api specs, etc, for the sake of my reviewers 😄~ these files now live in a separate commit; the first commit is the one to review.

/cc @dchen1107 @vishh @bgrant0607 @thockin @derekwaynecarr 

```release-note
Adds (alpha feature) the ability to dynamically configure Kubelets by enabling the DynamicKubeletConfig feature gate, posting a ConfigMap to the API server, and setting the spec.configSource field on Node objects. See the proposal at https://github.com/kubernetes/community/blob/master/contributors/design-proposals/dynamic-kubelet-configuration.md for details.
```
2017-08-09 14:14:32 -07:00
Klaus Ma 03e4394938 Add MemoryPressure/DiskPressure toleration for no BestEffort pod. 2017-08-09 22:23:52 +08:00
Michael Taufen 443d58e40a Dynamic Kubelet Configuration
Alpha implementation of the Dynamic Kubelet Configuration feature.
See the proposal doc in #29459.
2017-08-08 12:21:37 -07:00
Maciej Szulik 0cb8bae6ac
Generated changes after removing ScheduledJobs 2017-08-08 15:57:03 +02:00
Maciej Szulik e465962bf7
Remove ScheduledJobs support 2017-08-08 15:22:26 +02:00
Bobby (Babak) Salamat bef83fbeb9 Addressed reviewer comments 2017-08-07 17:07:20 -07:00
Kubernetes Submit Queue bc7ccfe93b Merge pull request #50106 from julia-stripe/improve-scheduler-error-handling
Automatic merge from submit-queue

Retry scheduling pods after errors more consistently in scheduler

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

This fixes 2 places in the scheduler where pods can get stuck in Pending forever.  In both these places, errors happen and `sched.config.Error` is not called afterwards. This is a problem because `sched.config.Error` is responsible for requeuing pods to retry scheduling when there are issues (see [here](2540b333b2/plugin/pkg/scheduler/factory/factory.go (L958))), so if we don't call `sched.config.Error` then the pod will never get scheduled (unless the scheduler is restarted).

One of these (where it returns when `ForgetPod` fails instead of continuing and reporting an error) is a regression from [this refactor](https://github.com/kubernetes/kubernetes/commit/ecb962e6585#diff-67f2b61521299ca8d8687b0933bbfb19L234), and with the [old behavior](80f26fa8a8/plugin/pkg/scheduler/scheduler.go (L233-L237)) the error was reported correctly. As far as I can tell changing the error handling in that refactor wasn't intentional.

When AssumePod fails there's never been an error reported but I think adding this will help the scheduler recover when something goes wrong instead of letting pods possibly never get scheduled.

This will help prevent issues like https://github.com/kubernetes/kubernetes/issues/49314 in the future.

**Release note**:

```release-note
Fix incorrect retry logic in scheduler
```
2017-08-07 01:35:17 -07:00
sakeven e3537425e1 getHashEquivalencePod also returns if equivalence pod is found
Signed-off-by: sakeven <jc5930@sina.cn>
2017-08-07 09:27:37 +08:00
Kubernetes Submit Queue fa5877de18 Merge pull request #47408 from shiywang/follow-go-code-style
Automatic merge from submit-queue (batch tested with PRs 47416, 47408, 49697, 49860, 50162)

follow our go code style: error->err

Fixes https://github.com/kubernetes/kubernetes/issues/50189
```release-note
NONE
```
2017-08-05 03:22:54 -07:00
Kubernetes Submit Queue 90a45b2df3 Merge pull request #49547 from k82cn/k8s_42001_0
Automatic merge from submit-queue (batch tested with PRs 50119, 48366, 47181, 41611, 49547)

Task 0: Added node taints labels and feature flags

**What this PR does / why we need it**:
Added node taint const for node condition.

**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
None
```
2017-08-04 14:29:42 -07:00
Julia Evans 2d9c6dfae8 Handle errors more consistently in scheduler 2017-08-04 12:00:22 -07:00
Kubernetes Submit Queue 898b1b3330 Merge pull request #50028 from julia-stripe/fix-incorrect-scheduler-bind-call
Automatic merge from submit-queue

Fix incorrect call to 'bind' in scheduler

I previously submitted https://github.com/kubernetes/kubernetes/pull/49661 -- I'm not sure if that PR is too big or what, but this is an attempt at a smaller PR that makes progress on the same issue and is easier to review.

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

In this refactor (https://github.com/kubernetes/kubernetes/commit/ecb962e6585#diff-67f2b61521299ca8d8687b0933bbfb19R223) the scheduler code was refactored into separate `bind` and `assume` functions. When that happened, `bind` was called with `pod` as an argument. The argument to `bind` should be the assumed pod, not the original pod. Evidence that `assumedPod` is the correct argument bind and not `pod`: 80f26fa8a8/plugin/pkg/scheduler/scheduler.go (L229-L234). (and it says `assumed` in the function signature for `bind`, even though it's not called with the assumed pod as an argument).

This is an issue (and causes #49314, where pods that fail to bind to a node get stuck indefinitely) in the following scenario:

1. The pod fails to bind to the node
2. `bind` calls `ForgetPod` with the `pod` argument
3. since `ForgetPod` is expecting the assumed pod as an argument (because that's what's in the scheduler cache), it fails with an error like `scheduler cache ForgetPod failed: pod test-677550-rc-edit-namespace/nginx-jvn09 state was assumed on a different node`
4. The pod gets lost forever because of some incomplete error handling (which I haven't addressed here in the interest of making a simpler PR)

In this PR I've fixed the call to `bind` and modified the tests to make sure that `ForgetPod` gets called with the correct argument (the assumed pod) when binding fails.

**Which issue this PR fixes**: fixes #49314

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-08-04 10:33:10 -07:00
Kubernetes Submit Queue 6065a0daab Merge pull request #49863 from resouer/eclass-test
Automatic merge from submit-queue (batch tested with PRs 46685, 49863, 50098, 50070, 50096)

Cover equivalence cache tests in scheduler core

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

Finish the last part of equivalence class scheduling #17390 : complete unit tests.

Also, removed `InvalidateCachedPredicateItemForPod` which is unused in latest design.

```
godep go test -v equivalence_cache_test.go  equivalence_cache.go  -cover

PASS
coverage: 92.3% of statements
ok  	command-line-arguments	0.071s
```

**Release note**:

```release-note
NONE
```
2017-08-04 00:20:52 -07:00
Kubernetes Submit Queue 0a4903b0e0 Merge pull request #46685 from xilabao/fix-err-message-in-namespace_policy
Automatic merge from submit-queue

fix err message in namespace_policy

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

**Which issue this PR fixes**: fixes #49541

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-08-03 23:59:05 -07:00
Julia Evans d584bf4d50 Fix incorrect call to 'bind' in scheduler 2017-08-03 13:55:00 -07:00
Harry Zhang f8309d7598 Update generated files 2017-08-03 23:03:52 +08:00
Harry Zhang a0787358b5 Cover get equivalence cache in core
Fix testing method
2017-08-03 23:03:52 +08:00
Klaus Ma c8ecd92269 Moved node condition check into Predicats. 2017-08-03 15:39:11 +08:00
Kubernetes Submit Queue 84e0326eb1 Merge pull request #49782 from supereagle/update-generated-deepcopy
Automatic merge from submit-queue (batch tested with PRs 50029, 48517, 49739, 49866, 49782)

Update generated deepcopy code

**What this PR does / why we need it**:
In generated deepcopy code, the method names in comments do not match the real method names.

**Which issue this PR fixes**: fixes #49755

**Special notes for your reviewer**:
/assign @sttts @caesarxuchao 


**Release note**:
```release-note
NONE
```
2017-08-02 12:46:57 -07:00
Avesh Agarwal 0dad8dd459 Do not allow empty topology key for pod affinities. 2017-08-02 09:41:29 -04:00
Kubernetes Submit Queue 2c521d7d9a Merge pull request #49284 from luxas/csr_cluster_roles
Automatic merge from submit-queue (batch tested with PRs 49284, 49555, 47639, 49526, 49724)

Add clusterroles for approving CSRs easily

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

Adds ClusterRoles for CSR approving. Currently consumers like kubeadm and GKE have to create these rules by themselves, but are doing it slightly differently which leads to sprawl. Instead, the ClusterRoles are created by core, and the actual bindings created by respective deployment method.

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

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

**Special notes for your reviewer**:

**Release note**:

```release-note
The API Server now automatically creates RBAC ClusterRoles for CSR approving. 
Each deployment method should bind users/groups to the ClusterRoles if they are using this feature.
```
cc @kubernetes/sig-auth-pr-reviews @kubernetes/sig-cluster-lifecycle-pr-reviews
2017-08-01 01:41:53 -07:00
Lucas Käldström e0ff623db0
Add clusterroles for approving CSRs easily 2017-07-31 23:44:50 +03:00
Bobby (Babak) Salamat e25476a6ed autogenerated files 2017-07-31 10:16:35 -07:00
supereagle a1c880ece3 update generated deepcopy code 2017-07-31 22:33:00 +08:00
Klaus Ma ec4aa192cc Added taints node by condition feature flag. 2017-07-31 19:30:34 +08:00
Kubernetes Submit Queue 740ca9a052 Merge pull request #49538 from supereagle/versioned-coreclient
Automatic merge from submit-queue (batch tested with PRs 49538, 49708, 47665, 49750, 49528)

Use the core client with version

**What this PR does / why we need it**:
Replace the **deprecated** `clientSet.Core()` with `clientSet.CoreV1()`.

**Which issue this PR fixes**: fixes #49535

**Special notes for your reviewer**:

**Release note**:
```release-note
NONE
```
2017-07-29 05:28:49 -07:00
Bobby (Babak) Salamat de8689c99b Add priority admission controller 2017-07-27 18:44:40 -07:00
Jordan Liggitt d65610bf2f
Remove default binding of system:node role to system:nodes group 2017-07-26 13:53:14 -04:00
supereagle edce96c5b6 use the core client with version 2017-07-26 19:16:02 +08:00
Kubernetes Submit Queue 4399fb2b87 Merge pull request #49071 from foxish/foxish-api
Automatic merge from submit-queue (batch tested with PRs 43443, 46193, 49071, 47252)

Add v1beta2.DaemonSet

Depends on https://github.com/kubernetes/kubernetes/pull/48746
Partly implements https://github.com/kubernetes/kubernetes/issues/49135

```release-note
Adding type apps/v1beta2.DaemonSet
```
2017-07-25 21:52:50 -07:00
Anirudh c7a25a3786 DS: Api Machinery Fixes 2017-07-25 13:33:21 -07:00
Kubernetes Submit Queue 9350afd772 Merge pull request #48976 from supereagle/cleanup-api-package
Automatic merge from submit-queue (batch tested with PRs 48976, 49474, 40050, 49426, 49430)

Remove duplicated import and wrong alias name of api package

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

**Which issue this PR fixes**: fixes #48975

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

**Release note**:
```release-note
NONE
```
2017-07-25 12:14:38 -07:00
foxish ef7203563b DS: RBAC changes 2017-07-25 11:51:22 -07:00
Kubernetes Submit Queue 48ac1b1a98 Merge pull request #48775 from vikaschoudhary16/test_assumed_pod
Automatic merge from submit-queue (batch tested with PRs 48224, 45431, 45946, 48775, 49396)

Enhance scheduler cache unit tests to cover OIR in pod spec

/kind test

**What this PR does / why we need it**:
More code coverage. This PR covers the scenario when pod requests opaque-integer-resources and unit test the logic in scheduler which deals with parsing oirs in the pod object and stores the same in node info.


Signed-off-by: vikaschoudhary16 <choudharyvikas16@gmail.com>
2017-07-25 11:06:54 -07:00
Kubernetes Submit Queue 9c3d0e8a96 Merge pull request #48224 from deads2k/controller-11-reflectormetrics
Automatic merge from submit-queue (batch tested with PRs 48224, 45431, 45946, 48775, 49396)

add reflector metrics

This adds metrics (optionally prometheus) to reflectors so that you can see when one reflector is behaving poorly and just how poorly its doing.

@eparis 

```release-note
Adds metrics for checking reflector health.
```
2017-07-25 11:06:47 -07:00
deads2k 151d39682e add reflector metrics 2017-07-25 09:01:37 -04:00
vikaschoudhary16 df4f4d341b Enhance scheduler cache unit tests to cover OIR in pod spec
Signed-off-by: vikaschoudhary16 <choudharyvikas16@gmail.com>
2017-07-25 06:35:23 -04:00
Klaus Ma c85e4dc1de Added node taints labels. 2017-07-25 15:21:51 +08:00
Kubernetes Submit Queue e623fed778 Merge pull request #48636 from jingxu97/July/allocatable
Automatic merge from submit-queue (batch tested with PRs 48636, 49088, 49251, 49417, 49494)

Fix issues for local storage allocatable feature

This PR fixes the following issues:
1. Use ResourceStorageScratch instead of ResourceStorage API to represent
local storage capacity
2. In eviction manager, use container manager instead of node provider
(kubelet) to retrieve the node capacity and reserved resources. Node
provider (kubelet) has a feature gate so that storagescratch information
may not be exposed if feature gate is not set. On the other hand,
container manager has all the capacity and allocatable resource
information.

This PR fixes issue #47809
2017-07-24 19:30:33 -07:00
supereagle adc0eef43e remove duplicated import and wrong alias name of api package 2017-07-25 10:04:25 +08:00
Kubernetes Submit Queue 633079eb01 Merge pull request #47864 from droot/podpreset-conflict-fix
Automatic merge from submit-queue (batch tested with PRs 49444, 47864, 48584, 49395, 49118)

fixed conflict resolution behavior while apply podpresets

**What this PR does / why we need it**:
This fixes the PodPreset application behavior in case of conflicts occur during the merging of Pod's information with PodPreset's. More details are in issue #47861 

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

**Special notes for your reviewer**:
We are splitting the PodPreset application logic in two phases. In first phase, we try to detect the conflicts in information merging without modifying the Pod at all. If conflict occurs, then we reject the PodPresets injection. Incase of no conflicts, we apply the PodPresets and merge the information.

**Release note**:

```release-note
PodPreset is not injected if conflict occurs while applying PodPresets to a Pod.
```
2017-07-24 13:52:34 -07:00
Kubernetes Submit Queue c71ea19656 Merge pull request #49448 from smarterclayton/client_lock
Automatic merge from submit-queue (batch tested with PRs 45345, 49470, 49407, 49448, 49486)

Use a client interface instead of a concrete type
2017-07-24 07:40:57 -07:00
Kubernetes Submit Queue 4d2a721223 Merge pull request #48707 from danielfm/node-restriction-pod-eviction-subresource
Automatic merge from submit-queue

Allow nodes to create evictions for its own pods in NodeRestriction admission controller

**What this PR does / why we need it**: This PR adds support for `pods/eviction` sub-resource to the NodeRestriction admission controller so it allows a node to evict pods bound to itself.

**Which issue this PR fixes**: fixes #48666

**Special notes for your reviewer**: The NodeRestriction already allows nodes to delete pods bound to itself, so allowing nodes to also delete pods via the Eviction API probably makes sense.

```release-note
NodeRestriction allows a node to evict pods bound to itself
```
2017-07-23 04:16:51 -07:00
Clayton Coleman b9bebe8a4e
Use a client interface instead of a concrete type
Aids testing
2017-07-22 20:29:48 -04:00
Kubernetes Submit Queue b0c6537de6 Merge pull request #49409 from aveshagarwal/master-scheduler-fix-duplicaton
Automatic merge from submit-queue (batch tested with PRs 49409, 49352, 49266, 48418)

Fix duplication in scheduler.

**What this PR does / why we need it**:
This fixes duplicate code in scheduler.

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

**Release note**:

```release-note
```
@kubernetes/sig-scheduling-pr-reviews @bsalamat
2017-07-22 02:05:12 -07:00
Avesh Agarwal 2ca4563be9 Fix duplication in scheduler. 2017-07-21 16:45:57 -04:00
Sunil Arora 4d5b96f94e fixed conflict resolution behavior while apply podpresets 2017-07-21 13:19:57 -07:00
Avesh Agarwal 985ce82126 Pass clientset's Interface to CreateScheduler. 2017-07-21 08:52:30 -04:00
Kubernetes Submit Queue afdfdac3d0 Merge pull request #48526 from jianglingxia/jlx0706
Automatic merge from submit-queue

word spell error

**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
```NONE
2017-07-21 04:20:45 -07:00
Daniel Fernandes Martins 81ba522bbe Make NodeRestriction admission allow evictions for bounded pods 2017-07-20 14:20:03 -03:00
Kubernetes Submit Queue 2faf7ff2bc Merge pull request #36238 from resouer/eclass-2-dev
Automatic merge from submit-queue (batch tested with PRs 48043, 48200, 49139, 36238, 49130)

Implement equivalence cache by caching and re-using predicate result

The last part of #30844, I opened a new PR instead of overwrite the old one because we changed some basic assumption by allowing invalidating equivalence cache item by individual predicate.

The idea of this PR is based on discussion in https://github.com/kubernetes/kubernetes/issues/32024

- [x]  Pods belong to same controllerRef considered to be equivalent
- [x] ` podFitsOnNode` will use cached predicate result if it's available
- [x] Equivalence cache will be updated when if a fresh new predicate is done
- [x] `factory.go` will invalid specific predicate cache(s) based on the object change
- [x] Since `schedule` and `bind` are async, we need to optimistically invalid affected cache(s) before `bind`
- [x] Fully unit test of affected files
- [x] e2e test to verify cache update/invalid workflow
- [x] performance test results

- [x] Some nits fixes related but expected to result in `needs-rebase` so they are split to: #36060 #35968 #37512

cc @wojtek-t @davidopp
2017-07-19 01:57:32 -07:00
Kubernetes Submit Queue 1bb6b815e2 Merge pull request #49120 from jpeeler/podpreset-nonamespace
Automatic merge from submit-queue (batch tested with PRs 49120, 46755, 49157, 49165, 48950)

Modify podpreset lister to use correct namespace

Previously a pod with an empty namespace field submitted to a given namespace
was incorrectly matching preset labels in a different namespace.

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

Release note:
```release-note
Fix pod preset to ignore input pod namespace in favor of request namespace
```
2017-07-19 00:06:20 -07:00
Kubernetes Submit Queue 2492477f0d Merge pull request #49110 from xiangpengzhao/remove-annotation-affinity
Automatic merge from submit-queue (batch tested with PRs 49055, 49128, 49132, 49134, 49110)

Remove affinity annotations leftover

**What this PR does / why we need it**:
This is a further cleanup for affinity annotations, following #47869.

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

**Special notes for your reviewer**:
- I remove the commented test cases and just leave TODOs instead. I think converting these untestable test cases for now is not necessary. We can add new test cases in future.
- I remove the e2e test case `validates that embedding the JSON PodAffinity and PodAntiAffinity setting as a string in the annotation value work` because we have a test case `validates that InterPod Affinity and AntiAffinity is respected if matching` to test the same thing.

/cc @aveshagarwal @bsalamat  @gyliu513 @k82cn @timothysc 

**Release note**:

```release-note
NONE
```
2017-07-18 21:54:25 -07:00
Chao Xu 590793f9a7 generated 2017-07-18 15:20:05 -07:00
Chao Xu 57a96ca40a move admission/v1alpha1 to k8s.io/api 2017-07-18 13:26:20 -07:00
Kubernetes Submit Queue 5bbdfc6661 Merge pull request #48544 from sttts/sttts-typed-deepcopy-1.8
Automatic merge from submit-queue (batch tested with PRs 46094, 48544, 48807, 49102, 44174)

Static deepcopy – phase 1

This PR is the follow-up of https://github.com/kubernetes/kubernetes/pull/36412, replacing the
dynamic reflection based deepcopy with static DeepCopy+DeepCopyInto methods on API types.

This PR **does not yet** include the code dropping the cloner from the scheme and all the
porting of the calls to scheme.Copy. This will be part of a follow-up "Phase 2" PR.

A couple of the commits will go in first:
- [x] audit: fix deepcopy registration  https://github.com/kubernetes/kubernetes/pull/48599
- [x] apimachinery+apiserver: separate test types in their own packages #48601 
- [x] client-go: remove TPR example #48604
- [x] apimachinery: remove unneeded GetObjectKind() impls #48608 
- [x] sanity check against origin, that OpenShift's types are fine for static deepcopy https://github.com/deads2k/origin/pull/34

TODO **after** review here:
- [x] merge https://github.com/kubernetes/gengo/pull/32 and update vendoring commit
2017-07-18 11:20:51 -07:00
Jeff Peeler 74463e5e66 Modify podpreset lister to use correct namespace
Previously a pod with an empty namespace field submitted to a given namespace
was incorrectly matching preset labels in a different namespace.
2017-07-18 13:52:50 -04:00
Harry Zhang f817b8a6f6 Update generated bazel 2017-07-18 23:58:32 +08:00
Harry Zhang 0e8517875e Update factory.go informers to update equivalence cache
Fix tombstone

Add e2e to verify equivalence cache

Addressing nits in factory,go and e2e

Update build files
2017-07-18 23:55:01 +08:00
Kubernetes Submit Queue 686e93bbf1 Merge pull request #48333 from sakeven/master
Automatic merge from submit-queue (batch tested with PRs 48333, 48806, 49046)

use v1.ResourcePods instead of hard coding "pods"

Signed-off-by: sakeven <jc5930@sina.cn>



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

use v1.ResourcePods instead of hard coding 'pods'


**Special notes for your reviewer**:

**Release note**:

```
NONE
```
2017-07-18 06:24:58 -07:00
xiangpengzhao d9d3396566 Remove affinity annotations leftover 2017-07-18 19:42:52 +08:00
Dr. Stefan Schimanski 8dd0989b39 Update generated code 2017-07-18 09:28:49 +02:00
Dr. Stefan Schimanski 39d95b9b06 deepcopy: add interface deepcopy funcs
- add DeepCopyObject() to runtime.Object interface
- add DeepCopyObject() via deepcopy-gen
- add DeepCopyObject() manually
- add DeepCopySelector() to selector interfaces
- add custom DeepCopy func for TableRow.Cells
2017-07-18 09:28:47 +02:00
Kubernetes Submit Queue 9995212ed3 Merge pull request #48869 from sakeven/rm_error
Automatic merge from submit-queue

[Scheduler] Remove error since err is always nil

Signed-off-by: sakeven <jc5930@sina.cn>



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

No need to log error since err is always nil.

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

```
NONE
```
2017-07-17 23:08:39 -07:00
Kubernetes Submit Queue bddddb5d81 Merge pull request #49057 from ericchiang/deleted-bootstrap-token
Automatic merge from submit-queue (batch tested with PRs 49043, 49001, 49057, 49066, 48102)

bootstrap token auth: don't accept deleted tokens

Closes #48345

Same fix as #48343


```release-note
Previously a deleted bootstrapping token secret would be considered valid until it was reaped.  Now it is invalid as soon as the deletionTimestamp is set.
```

cc @luxas @kubernetes/sig-auth-pr-reviews
2017-07-17 22:21:17 -07:00
Eric Chiang f719b2670c bootstrap token auth: don't accept deleted tokens 2017-07-17 15:22:18 -07:00
Jacob Simpson 29c1b81d4c Scripted migration from clientset_generated to client-go. 2017-07-17 15:05:37 -07:00
Kubernetes Submit Queue a9afb931d4 Merge pull request #48805 from sakeven/use_const
Automatic merge from submit-queue (batch tested with PRs 48262, 48805)

[Scheduler] Use const value maxPriority instead of immediate value 10

Signed-off-by: sakeven <jc5930@sina.cn>



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

Use const value maxPriority instead of immediate value 10.

**Special notes for your reviewer**:

**Release note**:

```
NONE
```
2017-07-17 04:40:53 -07:00
Kubernetes Submit Queue 4f6af5faa4 Merge pull request #48451 from sakeven/fix/ForgetPod_first_after_bind_failed
Automatic merge from submit-queue

forget pod first after binding failed

Signed-off-by: sakeven <jc5930@sina.cn>



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

In the implementation of scheduler cache, `FinishBinding` marks Pod expired, and then pod would be cleaned in ttl seconds. While `ForgetPod` checks Pod whether assumed,  if not, it reports an error.

So if binding failed and ttl(now 30s) is too short,  the error will occur when `ForgetPod`, thus we won't record `BindingRejected` event.

Although it's rare, we shouldn't depend on the value of ttl.

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

```
NONE
```
2017-07-17 03:27:41 -07:00
sakeven e9aee2b249 forget pod first after bind failed
Signed-off-by: sakeven <jc5930@sina.cn>
2017-07-17 16:46:49 +08:00
Kubernetes Submit Queue 94bca5ffef Merge pull request #47309 from xiang90/util
Automatic merge from submit-queue (batch tested with PRs 47309, 47187)

scheduler/util: remove bad print format

Fix https://github.com/kubernetes/kubernetes/issues/18834
2017-07-16 20:00:54 -07:00
sakeven 6aeb77aa6a Use const value maxPriority instead of immediate value 10
Signed-off-by: sakeven <jc5930@sina.cn>
2017-07-17 10:33:44 +08:00
Kubernetes Submit Queue 0c74c36b70 Merge pull request #46930 from k82cn/sched_integ_test
Automatic merge from submit-queue (batch tested with PRs 47417, 47638, 46930)

Added scheduler integration test owners.

**What this PR does / why we need it**:
Add OWNER file into scheduler integration test.

**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
```
2017-07-16 16:33:05 -07:00
Kubernetes Submit Queue b039c6e185 Merge pull request #47106 from gyliu513/ecache-test
Automatic merge from submit-queue

Improved code coverage for equivalence cache.

**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
none
```
2017-07-15 01:05:44 -07:00
Kubernetes Submit Queue 9548fbd514 Merge pull request #47955 from CaoShuFeng/trivial
Automatic merge from submit-queue

[trivial]fix function name in comment

**Release note**:

```
NONE
```
2017-07-13 18:50:19 -07:00
Jing Xu bb1920edcc Fix issues for local storage allocatable feature
This PR fixes the following issues:
1. Use ResourceStorageScratch instead of ResourceStorage API to represent
local storage capacity
2. In eviction manager, use container manager instead of node provider
(kubelet) to retrieve the node capacity and reserved resources. Node
provider (kubelet) has a feature gate so that storagescratch information
may not be exposed if feature gate is not set. On the other hand,
container manager has all the capacity and allocatable resource
information.
2017-07-13 12:06:19 -07:00
sakeven d9c65bce5c use v1.ResourcePods instead of hard coding 'pods'
Signed-off-by: sakeven <jc5930@sina.cn>
2017-07-13 18:20:47 +08:00
sakeven 5435268e06 remove error since err is always nil
Signed-off-by: sakeven <jc5930@sina.cn>
2017-07-13 17:45:14 +08:00
Kubernetes Submit Queue 80a0f555db Merge pull request #48748 from liggitt/node-restriction-message
Automatic merge from submit-queue (batch tested with PRs 48405, 48742, 48748, 48571, 48482)

Improve node restriction message

Help debug https://github.com/kubernetes/kubernetes/issues/48687#issuecomment-314224531

/assign @luxas
2017-07-12 08:05:20 -07:00
Kubernetes Submit Queue eb196f8c9b Merge pull request #48405 from k82cn/k8s_44188_1
Automatic merge from submit-queue (batch tested with PRs 48405, 48742, 48748, 48571, 48482)

Removed scheduler dependencies to testapi.

**What this PR does / why we need it**:
When refactor scheduler to use client-go, k8s.io/api, it's also need to remove the dependeny to testapi.

prefer to only include import/BUILD changes for #44188, so created separated PR for other enhancement removal.

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

**Release note**:

```release-note-none
```
2017-07-12 08:05:13 -07:00
Kubernetes Submit Queue 0e461035cb Merge pull request #48734 from tallclair/namechange
Automatic merge from submit-queue (batch tested with PRs 48698, 48712, 48516, 48734, 48735)

Name change: s/timstclair/tallclair/

I changed my name, and I'm migrating my user name to be consistent.
2017-07-12 04:56:32 -07:00
Kubernetes Submit Queue b8f1bb4105 Merge pull request #48614 from xing-yang/function_name
Automatic merge from submit-queue (batch tested with PRs 46865, 48661, 48598, 48658, 48614)

Fix function names in the comments

This patch fixes function and type names in the comments
in predicates.go.



**What this PR does / why we need it**: 
It fixes function and type names in the comments in predicates.go.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
This does not have an issue # because it is a trivial fix.

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-07-12 03:02:22 -07:00
Kubernetes Submit Queue b66be98174 Merge pull request #39173 from caesarxuchao/include-leaderelection
Automatic merge from submit-queue (batch tested with PRs 47232, 48625, 48613, 48567, 39173)

Include leaderelection in client-go; 

Fix #39117
Fix https://github.com/kubernetes/client-go/issues/28

This PR:
* includes the leaderelection to the staging client-go
* to avoid conflict with golang's testing package, renames package /testing to /testutil, and renames cache/testing to cache/testframework

```release-note
client-go now includes the leaderelection package
```
2017-07-12 00:10:20 -07:00
Kubernetes Submit Queue 33718a8fae Merge pull request #48335 from sakeven/fix/close_resp_Body
Automatic merge from submit-queue (batch tested with PRs 48402, 47203, 47460, 48335, 48322)

HTTPExtender: should close resp.Body even when StatusCode not ok

Signed-off-by: sakeven <jc5930@sina.cn>



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

close resp.Body even when StatusCode isn't ok

**Special notes for your reviewer**:

**Release note**:

```
NONE
```
2017-07-11 21:01:37 -07:00
Jordan Liggitt e3e25df5df
Improve node restriction message 2017-07-10 22:44:24 -04:00
Tim Allclair a2f2e1d491 Name change: s/timstclair/tallclair/ 2017-07-10 14:05:46 -07:00
Xing Yang e94e50c999 Fix function and type names in the comments
This patch fixes function and type names in the comments
in predicates.go.
2017-07-10 04:59:58 -07:00
Cao Shufeng 0c577c47d5 Use glog.*f when a format string is passed
ref:
https://godoc.org/github.com/golang/glog

I use the following commands to search all the invalid usage:
$ grep "glog.Warning(" * -r | grep %
$ grep "glog.Info(" * -r | grep %
$ grep "glog.Error(" * -r | grep %
$ grep ").Info(" * -r | grep % | grep "glog.V("
2017-07-10 19:04:03 +08:00
Guangya Liu cc719382ab Commit-1: Improved code coverage for equivalence cache.
Improved coverage for functions:
1) PredicateWithECache
2) UpdateCachedPredicateItem
2017-07-09 19:08:04 +08:00
Kubernetes Submit Queue 093dd52db2 Merge pull request #48337 from sakeven/fix/validation_test
Automatic merge from submit-queue

scheduler: fix validation test

Signed-off-by: sakeven <jc5930@sina.cn>



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

Without setting `Weight`, `ValidatePolicy` will report
```
Priority for extender http://127.0.0.1:8081/extender should have a positive weight applied to it
```

**Besides**, it seems it's not a good way to test ValidatePolicy by```if ValidatePolicy(extenderPolicy) == nil```, because we can't determine specific reason which causes error.

**Special notes for your reviewer**:

**Release note**:

```
NONE
```
2017-07-07 22:38:28 -07:00
Chao Xu 65cedeeb43 update bazel 2017-07-07 19:04:26 -07:00
Chao Xu 016963b955 let scheduler use client-go's client when initilaizer leaderelection 2017-07-07 19:04:26 -07:00
Chao Xu 24d5279c59 move leaderelection package to client-go 2017-07-07 17:01:04 -07:00
Shiyang Wang 9a96ff94af follow our go code style: error->err 2017-07-07 09:34:38 +08:00
jianglingxia f183dec4a2 word spell error 2017-07-06 10:07:45 +08:00
Kubernetes Submit Queue e773c88b0a Merge pull request #48399 from k82cn/ordered_pkgs
Automatic merge from submit-queue (batch tested with PRs 48399, 48450, 48144)

Group and order imported packages.

**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
```
2017-07-05 08:58:36 -07:00
sakeven 86c453a192 schduler: fix validation test
Signed-off-by: sakeven <jc5930@sina.cn>
2017-07-05 14:36:53 +08:00
Kubernetes Submit Queue 2f1ea7efcf Merge pull request #47515 from zhangxiaoyu-zidif/replace-scheduler-havesame
Automatic merge from submit-queue (batch tested with PRs 47043, 48448, 47515, 48446)

Refactor slice intersection

**What this PR does / why we need it**:
In worst case, the original method is O(N^2), while current method is 3 * O(N).
I think it is better.

**Release note**:

```release-note
NONE
```
2017-07-04 09:12:26 -07:00
Klaus Ma 90e7acf6c3 Removed dependencies to testapi. 2017-07-04 22:50:00 +08:00
Kubernetes Submit Queue 3bfcd74ace Merge pull request #46926 from k82cn/k8s_46924
Automatic merge from submit-queue (batch tested with PRs 46926, 48468)

Added helper funcs to schedulercache.Resource.

**What this PR does / why we need it**:
Avoid duplicated code slice by helper funcs.

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

**Release note**:

```release-note-none
```
2017-07-04 06:56:22 -07:00
Kubernetes Submit Queue eb2a560679 Merge pull request #48189 from mikedanese/fixds
Automatic merge from submit-queue

support NoSchedule taints correctly in DaemonSet controller

Fixes https://github.com/kubernetes/kubernetes/issues/48190
```release-note
Support NoSchedule taints correctly in DaemonSet controller.
```
cc @kubernetes/sig-apps-pr-reviews
2017-07-03 08:46:32 -07:00
Klaus Ma 8eb3a66d3f Group and order imported packages. 2017-07-02 21:25:48 +08:00
Klaus Ma 7541496a4f Updated OWNERS_ALIASES for scheduler, and added scheduler integration test owners. 2017-07-01 09:28:52 +08:00
Faraaz Khan 7b6727f7f7 allow heapster clusterrole to see deployments 2017-06-30 19:17:01 +00:00
sakeven 82dff5fbd0 HTTPExtender: shoud close resp.Body even when StatusCode not ok
Signed-off-by: sakeven <jc5930@sina.cn>
2017-06-30 19:11:09 +08:00
Mike Danese 8e6c2ea4d0 support NoExecute and NoSchedule taints correctly in DaemonSet controller
And add some unit tests.
2017-06-29 10:16:36 +02:00
Guangya Liu e0d02f140e Used const variable in scheduler test. 2017-06-29 11:07:47 +08:00
Matthew Wong 9fbb705e64 Log get PVC/PV errors in MaxPD predicate only at high verbosity 2017-06-28 17:31:04 -04:00
Guangya Liu aaac9228a2 godoc update for scheduler predicates. 2017-06-26 17:00:56 +08:00
Kubernetes Submit Queue 53a66020e4 Merge pull request #47225 from NickrenREN/fix-operation
Automatic merge from submit-queue

Fix mismatched types Verbose and bool

Fix invalid operation: mismatched types Verbose and bool


**Release note**:
```release-note
NONE
```
2017-06-25 19:00:25 -07:00
Kubernetes Submit Queue c885c70c9b Merge pull request #47566 from zhangxiaoyu-zidif/cleanup-add-comment-for-scheduler-predicates
Automatic merge from submit-queue

Cleanup predicates.go

**What this PR does / why we need it**:
cleanup some comments and errors.New().

**Special notes for your reviewer**:
/cc @jayunit100
 
**Release note**:

```release-note
NONE
```
2017-06-25 17:59:29 -07:00
Kubernetes Submit Queue beb5b9dd4d Merge pull request #47869 from timothysc/affinity_cleanup
Automatic merge from submit-queue

Removes alpha feature gate for affinity annotations.  

**What this PR does / why we need it**:
In 1.5 we added a backstop to support alpha affinity annotations.  This PR removes that support in favor of the Beta fields per discussions.  

It also serves as a precursor to some of the component config work that @ncdc has done around @mikedanese design proposal.  

xref: https://github.com/kubernetes/kubernetes/pull/41617 

**Special notes for your reviewer**:

**Release note**:

```
Removes alpha feature gate for pod affinity annotations.  
```

/cc @kubernetes/sig-scheduling-pr-reviews @kubernetes/sig-cluster-lifecycle-misc
2017-06-24 06:11:42 -07:00
Kubernetes Submit Queue 171f48af7b Merge pull request #47179 from ddysher/local-isolation-fix
Automatic merge from submit-queue (batch tested with PRs 47883, 47179, 46966, 47982, 47945)

Fix local isolation for pod requesting only overlay or scratch

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

Fix overlay resource predicates for pod with only overlay or scratch storage request.

E.g. the following pod can pass predicate even if overlay is only 512Gi.
```yaml
apiVersion: v1
kind: Pod
metadata:
  name: pod
spec:
  containers:
  - name: nginx
    image: nginx
    resources:
      requests:
        storage.kubernetes.io/overlay: 1024Gi
```

similarly, following pod will also pass predicate
```yaml
apiVersion: v1
kind: Pod
metadata:
  name: pod
spec:
  containers:
  - name: nginx
    image: nginx
    volumeMounts:
    - name: data
      mountPath: /data
  volumes:
  - name: data
    emptyDir:
      sizeLimit: 1024Gi
```

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes https://github.com/kubernetes/kubernetes/issues/47798

**Special notes for your reviewer**:

**Release note**:

```release-note
```

@jingxu97 @vishh @dashpole
2017-06-23 15:48:38 -07:00
Timothy St. Clair 4aea626944 Removes alpha feature gate for affinity annotations. Beta fields should be used. 2017-06-23 10:02:14 -05:00
Cao Shufeng fad8b45667 [trivial]fix function name in comment 2017-06-23 17:53:35 +08:00