Commit Graph

947 Commits (eb207eb88281818b1fe8a2cdd4747f97663632bb)

Author SHA1 Message Date
Klaus Ma a92766d0c7 Update comments for golint. 2017-03-29 09:36:45 +08:00
ravisantoshgudimetla 55d3c82782 Selector spreading improving code readability 2017-03-28 15:41:43 -04:00
Harry Zhang 63197e53a1 Update generated BUILD files 2017-03-28 13:25:48 +02:00
Harry Zhang 2c4514c325 Enable equivalence cache in generic scheduler 2017-03-28 13:25:47 +02:00
Harry Zhang 819554f514 Update equivalence cache to use predicate as key
Remove Invalid field from host predicate
2017-03-28 13:25:01 +02:00
Kubernetes Submit Queue b6d187d5f2 Merge pull request #42087 from cblecker/scheduler-lint
Automatic merge from submit-queue

Add plugin/pkg/scheduler to linted packages

**What this PR does / why we need it**:
Adds plugin/pkg/scheduler to linted packages to improve style correctness.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-03-27 15:14:15 -07:00
Kubernetes Submit Queue 2d7ecce878 Merge pull request #43008 from ravisantoshgudimetla/taints_small_changes
Automatic merge from submit-queue (batch tested with PRs 43681, 40423, 43562, 43008, 43381)

Changes for removing deadcode in taint_tolerations

**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 #43007
2017-03-27 12:49:27 -07:00
ravisantoshgudimetla 043f39b496 Changes for removing deadcode in taint_tolerations
Code cleanup with some modifications and a test-case in taints and tolerations

Code cleanup with some modifications and a test-case in taints and tolerations

Removed unnecessary code from my last commit

Code cleanup with some modifications and a test-case in taints and tolerations

SUggested changes for taints_tolerations

Changes for removing deadcode in taint_tolerations

small changes again

small changes again

Small changes for clear documentation.
2017-03-24 17:03:21 -04:00
Christoph Blecker ca24afe778
Additional plugin/pkg/scheduler golint fixes 2017-03-19 09:47:58 -07:00
Christoph Blecker 6a6ee160e8
golint fixes to plugin/pkg/scheduler/scheduler.go 2017-03-19 09:44:15 -07:00
Jordan Liggitt 8fda1c716b
Remove 'all namespaces' meaning of empty list in PodAffinityTerm 2017-03-17 00:32:07 -04:00
Kubernetes Submit Queue 9e8114655f Merge pull request #40404 from tanshanshan/unit-test-scheduler4
Automatic merge from submit-queue (batch tested with PRs 40404, 43134, 43117)

Improve code coverage for scheduler/api/validation

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

Improve code coverage for scheduler/api/validation from #39559

Thanks
**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-03-15 08:27:20 -07:00
Timothy St. Clair 6cc40678b6 Initial breakout of scheduling e2es to help assist in both assignment
and refactoring.
2017-03-13 22:34:57 -05:00
tanshanshan 6fd76dc139 fix 2017-03-10 10:44:21 +08:00
Kubernetes Submit Queue 342ef1115c Merge pull request #42778 from k82cn/sched_cache_sync
Automatic merge from submit-queue (batch tested with PRs 42762, 42739, 42425, 42778)

Fixed potential OutOfSync of nodeInfo.

The cloned NodeInfo still share the same resource objects in cache; it may make `requestedResource` and Pods OutOfSync, for example, if the pod was deleted, the `requestedResource` is updated by Pods are not in cloned info. Found this when investigating #32531 , but seems not the root cause, as nodeInfo are readonly in predicts & priorities.

Sample codes for `&(*)`:

```
package main

import (
	"fmt"
)

type Resource struct {
	A int
}

type Node struct {
	Res *Resource
}

func main() {
	r1 := &Resource { A:10 }
	n1 := &Node{Res: r1}
	r2 := &(*n1.Res)
	r2.A = 11

	fmt.Printf("%t, %d %d\n", r1==r2, r1, r2)
}
```

Output:

```
true, &{11} &{11}
```
2017-03-09 02:51:42 -08:00
Klaus Ma 9b1e5ec507 Fixed potential OutOfSync of nodeInfo. 2017-03-09 11:09:38 +08:00
Kubernetes Submit Queue 7491fb865d Merge pull request #42708 from timchenxiaoyu/prioritytypo
Automatic merge from submit-queue (batch tested with PRs 42652, 42681, 42708, 42730)

fix priority typo
2017-03-08 11:38:09 -08:00
timchenxiaoyu 8780e29dea fix priority typo 2017-03-08 12:35:25 +08:00
Connor Doyle 364dbc0ca5 Revert "Revert "Pods pending due to insufficient OIR should get scheduled once sufficient OIR becomes available.""
- This reverts commit 60758f3fff.
- Disabled opaque integer resource end-to-end tests.
2017-03-06 17:48:09 -08:00
Dawn Chen 60758f3fff Revert "Pods pending due to insufficient OIR should get scheduled once sufficient OIR becomes available." 2017-03-06 14:27:17 -08:00
Klaus Ma 1c5292bc2c Aggregated used ports at the NodeInfo level. 2017-03-05 11:09:42 +08:00
Connor Doyle 8a42189690 Fix unbounded growth of cached OIRs in sched cache
- Added schedulercache.Resource.SetOpaque helper.
- Amend kubelet allocatable sync so that when OIRs are removed from capacity
  they are also removed from allocatable.
- Fixes #41861.
2017-03-04 09:26:22 -08:00
Kubernetes Submit Queue 79b5ccc176 Merge pull request #41708 from bsalamat/statefulset_spreading2
Automatic merge from submit-queue (batch tested with PRs 42200, 39535, 41708, 41487, 41335)

Add support for statefulset spreading to the scheduler

**What this PR does / why we need it**:
The scheduler SelectorSpread priority funtion didn't have the code to spread pods of StatefulSets. This PR adds StatefulSets to the list of controllers that SelectorSpread supports.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
Add the support to the scheduler for spreading pods of StatefulSets.
```
2017-02-28 20:16:08 -08:00
Kubernetes Submit Queue 56f70b4097 Merge pull request #40269 from tanshanshan/unittest-scheduler-default
Automatic merge from submit-queue (batch tested with PRs 41937, 41151, 42092, 40269, 42135)

Improve code coverage for scheduler/algorithmprovider/defaults

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

Improve code coverage for scheduler/algorithmprovider/defaults from #39559

Thanks for your review.
**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-02-28 01:24:11 -08:00
Bobby Salamat ef686716ba Add support for statefulset spreading to the scheduler 2017-02-27 18:04:08 -08:00
Janet Kuo 4c882477e9 Make DaemonSet respect critical pods annotation when scheduling 2017-02-27 09:59:45 -08:00
Kubernetes Submit Queue 18fe59264c Merge pull request #41875 from wanghaoran1988/fix_issue
Automatic merge from submit-queue (batch tested with PRs 41954, 40528, 41875, 41165, 41877)

Move the scheduler Fake* to testing folder

Address this issue: https://github.com/kubernetes/kubernetes/issues/41662
@timothysc I moved the interface to the types.go, and the Fake* to the testing package, not sure whether you like or not.
2017-02-26 14:54:52 -08:00
Kubernetes Submit Queue 11b9a2d038 Merge pull request #41119 from sarat-k/master
Automatic merge from submit-queue (batch tested with PRs 41701, 41818, 41897, 41119, 41562)

Optimization of on-wire information sent to scheduler extender interfaces that are stateful

The changes are to address the issue described in https://github.com/kubernetes/kubernetes/issues/40991

```release-note
Added support to minimize sending verbose node information to scheduler extender by sending only node names and expecting extenders to cache the rest of the node information
```

cc @ravigadde
2017-02-26 14:02:54 -08:00
Kubernetes Submit Queue 1359ffc502 Merge pull request #41818 from aveshagarwal/master-taints-tolerations-api-fields-pod-spec-updates
Automatic merge from submit-queue (batch tested with PRs 41701, 41818, 41897, 41119, 41562)

Allow updates to pod tolerations.

Opening this PR to continue discussion for pod spec tolerations updates when a pod has been scheduled already. This PR is built on top of https://github.com/kubernetes/kubernetes/pull/38957.

@kubernetes/sig-scheduling-pr-reviews @liggitt @davidopp @derekwaynecarr @kubernetes/rh-cluster-infra
2017-02-26 14:02:51 -08:00
Kubernetes Submit Queue 16f87fe7d8 Merge pull request #40952 from dashpole/premption
Automatic merge from submit-queue (batch tested with PRs 41994, 41969, 41997, 40952, 40576)

Guaranteed admission for Critical Pods

This is the first step in implementing node-level preemption for critical pods.
It defines the AdmissionFailureHandler interface, which allows callers, like the kubelet, to define how failed predicates are handled, and take steps to correct failures if necessary.
In the kubelet's implementation, it triggers preemption if the pod being admitted is critical, and if the only failed predicates are InsufficientResourceErrors, then it prempts (not yet implemented) other other pods to allow admission of the critical pod.

cc: @vishh
2017-02-26 12:57:59 -08:00
Haoran Wang 4540bb9e77 move the lister.go to testing folder 2017-02-25 23:36:27 +08:00
David Ashpole c58970e47c critical pods can preempt other pods to be admitted 2017-02-23 10:31:20 -08:00
Sarat Kamisetty dda62ec207 - scheduler extenders that are capable of maintaining their own
node cache don't need to get all the information about every
  candidate node. For huge clusters, sending full node information
  of all nodes in the cluster on the wire every time a pod is scheduled
  is expensive. If the scheduler is capable of caching node information
  along with its capabilities, sending node name alone is sufficient.
  These changes provide that optimization in a backward compatible way

- removed the inadvertent signature change of Prioritize() function
- added defensive checks as suggested
-  added annotation specific test case
- updated the comments in the scheduler types
- got rid of apiVersion thats unused
- using *v1.NodeList as suggested
- backing out pod annotation update related changes made in the
  1st commit
- Adjusted the comments in types.go and v1/types.go as suggested
  in the code review
2017-02-23 10:25:42 -08:00
Avesh Agarwal b9d95b4426 Allow toleration updates via pod spec. 2017-02-23 11:06:13 -05:00
Andy Goldstein 9d8d6ad16c Switch scheduler to use generated listers/informers
Where possible, switch the scheduler to use generated listers and
informers. There are still some places where it probably makes more
sense to use one-off reflectors/informers (listing/watching just a
single node, listing/watching scheduled & unscheduled pods using a field
selector).
2017-02-23 09:57:12 -05:00
tanshanshan 13f7b31711 add unit test for scheduler 2017-02-23 09:09:35 +08:00
Avesh Agarwal b4d3d24eaf Update tests. 2017-02-22 09:27:42 -05:00
Avesh Agarwal 9b640838a5 Change taint/toleration annotations to api fields. 2017-02-22 09:27:42 -05:00
Kubernetes Submit Queue f2e234e47f Merge pull request #41398 from codablock/azure_max_pd
Automatic merge from submit-queue

Add scheduler predicate to filter for max Azure disks attached

**What this PR does / why we need it**: This PR adds scheduler predicates for maximum Azure Disks count. This allows to use the environment variable KUBE_MAX_PD_VOLS on scheduler the same as it's already possible with GCE and AWS.

This is needed as we need a way to specify the maximum attachable disks on Azure to avoid permanently failing disk attachment in cases k8s scheduled too many PODs with AzureDisk volumes onto the same node. 

I've chosen 16 as the default value for DefaultMaxAzureDiskVolumes even though it may be too high for many smaller VM types and too low for the larger VM types. This means, the default behavior may change for clusters with large VM types. For smaller VM types, the behavior will not change (it will keep failing attaching).

In the future, the value should be determined at run time on a per node basis, depending on the VM size. I know that this is already implemented in the ongoing Azure Managed Disks work, but I don't remember where to find this anymore and also forgot who was working on this. Maybe @colemickens can help here.

**Release note**:

```release-note
Support KUBE_MAX_PD_VOLS on Azure
```

CC @colemickens @brendandburns
2017-02-21 06:11:09 -08:00
Kubernetes Submit Queue ba6dca94bc Merge pull request #41458 from humblec/iscsi-nodisk-conflict
Automatic merge from submit-queue

Adjust nodiskconflict support based on iscsi multipath.

With the multipath support is in place, to declare whether both iscsi disks are same, we need to only depend on IQN.

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-02-20 03:54:41 -08:00
Alexander Block 73a0083a84 Add scheduler predicate to filter for max Azure disks attached 2017-02-20 09:00:18 +01:00
Kubernetes Submit Queue b3d627c2e2 Merge pull request #41387 from gyliu513/most-request
Automatic merge from submit-queue

Improved code coverage for plugin/pkg/scheduler/algorithm/priorities…

…/most_requested.go



**What this PR does / why we need it**:
Part of #39559 , code coverage improved from 70+% to 80+%
2017-02-19 23:04:02 -08:00
Timothy St. Clair 2bcd63c524 Cleanup work to enable feature gating annotations 2017-02-18 09:25:57 -06:00
Robert Rati 32c4683242 Feature-Gate affinity in annotations 2017-02-18 09:08:38 -06:00
Wojciech Tyczynski 3de7195cf8 Remove default failure domains from anti-affinity feature 2017-02-16 13:32:34 +01:00
Humble Chirammal 7a1ac6c6db Adjust nodiskconflict support based on iscsi multipath feature.
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-02-16 16:24:53 +05:30
Harry Zhang 3bdc3f25ec Use fnv.New32a() in hash instead adler32 2017-02-15 14:03:54 +08:00
Kubernetes Submit Queue be9b58e95f Merge pull request #40743 from jayunit100/schedulercore
Automatic merge from submit-queue (batch tested with PRs 41378, 41413, 40743, 41155, 41385)

'core' package to prevent dependency creep and isolate core functiona…

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

Solves these two problems: 

- Top level Scheduler root directory has several files in it that are needed really by the factory and algorithm implementations.  Thus they should be subpackages of scheduler.
- In addition scheduler.go and generic_scheduler.go don't naturally differentiate themselves when they are in the same package.  scheduler.go is eseentially the daemon entry point and so it should be isolated from the core 

*No release note needed*
2017-02-14 19:54:13 -08:00
Guangya Liu b602a97aea Improved code coverage for plugin/pkg/scheduler/algorithm/priorities/most_requested.go 2017-02-14 16:15:28 +08:00
Kubernetes Submit Queue 4ed86f5d46 Merge pull request #41076 from gyliu513/port-forward
Automatic merge from submit-queue

Removed a space in portforward.go.

**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
```
2017-02-08 07:59:10 -08:00
Guangya Liu 9607edc556 Clean up for some typo.
1) Removed a space in portforward.go.
2) Renamed `lockAquisitionFunc` to `lockAcquisitionFunc` in
controller.go.
3) Fixed typo in predicates.go.
2017-02-08 09:39:03 +08:00
gmarek 37585b06e0 Scheduler doesn't schedule Pods not tolerating NoExecute Taints 2017-02-07 13:56:48 +01:00
Kubernetes Submit Queue 9642104e82 Merge pull request #39914 from kevin-wangzefeng/forgiveness-library-changes
Automatic merge from submit-queue (batch tested with PRs 40696, 39914, 40374)

Forgiveness library changes

**What this PR does / why we need it**:
Splited from #34825, contains library changes that are needed to implement forgiveness:

1. ~~make taints-tolerations matching respect timestamps, so that one toleration can just tolerate a taint for only a period of time.~~ As TaintManager is caching taints and observing taint changes, time-based checking is now outside the library (in TaintManager). see #40355.
2. make tolerations respect wildcard key.
3. add/refresh some related functions to wrap taints-tolerations operation.

**Which issue this PR fixes**: 
Related issue: #1574
Related PR: #34825, #39469 
~~Please note that the first 2 commits in this PR come from #39469 .~~

**Special notes for your reviewer**:

~~Since currently we have `pkg/api/helpers.go` and `pkg/api/v1/helpers.go`, there are some duplicated periods of code laying in these two files.~~

~~Ideally we should move taints-tolerations related functions into a separate package (pkg/util/taints), and make it a unified set of implementations. But I'd just suggest to do it in a follow-up PR after Forgiveness ones done, in case of feature Forgiveness getting blocked to long.~~

**Release note**:

```release-note
make tolerations respect wildcard key
```
2017-02-03 15:05:55 -08:00
jayunit100 e42642693c 'core' package to prevent dependency creep and isolate core functionality from daemon.
Add core build file
2017-02-01 13:07:37 -05:00
Klaus Ma f88ebfad3e Empty label is equal for topologies. 2017-02-01 19:55:34 +08:00
deads2k 8a12000402 move client/record 2017-01-31 19:14:13 -05:00
Kevin 36dcb57407 forgiveness library changes 2017-01-31 21:39:17 +08:00
Kubernetes Submit Queue abbb3fa72f Merge pull request #38601 from yarntime/fix_typo_needed
Automatic merge from submit-queue (batch tested with PRs 40405, 38601, 40083, 40730)

fix typo

**What this PR does / why we need it**:
    fix typo.

**Release note**:

```NONE
```
2017-01-31 04:44:41 -08:00
Kubernetes Submit Queue 3dbbd0bdf4 Merge pull request #40606 from deads2k/client-17-sync
Automatic merge from submit-queue (batch tested with PRs 34543, 40606)

sync client-go and move util/workqueue

The vision of client-go is that it provides enough utilities to build a reasonable controller.  It has been copying `util/workqueue`.  This makes it authoritative.

@liggitt I'm getting really close to making client-go authoritative ptal.

approved based on https://github.com/kubernetes/kubernetes/issues/40363
2017-01-30 08:19:10 -08:00
Kubernetes Submit Queue 83791b0ee4 Merge pull request #34543 from ivan4th/dont-require-failure-domains-for-pod-affinity-checker
Automatic merge from submit-queue

Don't require failureDomains in PodAffinityChecker

`failureDomains` are only used for `PreferredDuringScheduling` pod
anti-affinity, which is ignored by `PodAffinityChecker`.
This unnecessary requirement was making it hard to move
`PodAffinityChecker` to `GeneralPredicates` because that would require
passing `--failure-domains` to both `kubelet` and `kube-controller-manager`.
2017-01-30 08:18:32 -08:00
deads2k 2c1c0f3f72 move workqueue to client-go 2017-01-30 09:08:21 -05:00
Dr. Stefan Schimanski 44ea6b3f30 Update generated files 2017-01-29 21:41:45 +01:00
Dr. Stefan Schimanski bc6fdd925d pkg/api/resource: move to apimachinery 2017-01-29 21:41:44 +01:00
Dr. Stefan Schimanski a12c661773 pkg/util: move trace.go to k8s.io/apiserver/pkg/util/trace 2017-01-29 21:41:44 +01:00
Kubernetes Submit Queue 7213816258 Merge pull request #39999 from tanshanshan/unit-test-scheduler1
Automatic merge from submit-queue (batch tested with PRs 40543, 39999)

Improve code coverage for scheduler/algorithm/priorities

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

Improve code coverage for scheduler/algorithm/priorities from #39559 

This is my first unit test  for kubernetes , thanks for your review.

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-01-26 18:07:28 -08:00
Kubernetes Submit Queue bb323d8dea Merge pull request #40188 from jayunit100/NewSchedulerFromInterface
Automatic merge from submit-queue (batch tested with PRs 39538, 40188, 40357, 38214, 40195)

Decoupling scheduler creation from creation of scheduler.Config struc…

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

Adds functionality to the scheduler to initialize from an Configurator interface, rather then via a Config struct.

**Which issue this PR fixes** 

Reduces coupling to `scheduler.Config` data structure format so that we can proliferate more interface driven composition of scheduler components.
2017-01-25 17:47:12 -08:00
Kubernetes Submit Queue 5c5ce3baee Merge pull request #40362 from deads2k/client-14-move-pkgs
Automatic merge from submit-queue

move client/cache and client/discovery to client-go

mechanical changes to move those packages.  Had to create a `k8s.io/kubernetes/pkg/client/tests` package for tests that were blacklisted from client-go.  We can rewrite these tests later and move them, but for now they'll still run at least.

@caesarxuchao @sttts
2017-01-25 08:17:15 -08:00
jayunit100 8439f81f2d NewSchedulerFromInterface implementation 2017-01-25 10:21:27 -05:00
Kubernetes Submit Queue 6873d2a5d2 Merge pull request #39081 from ChenLingPeng/no-schedule-deleting-pod
Automatic merge from submit-queue

Skip schedule deleting pod

Since binding a deleting pod will always return fail, we should skip that kind of pod early
2017-01-25 06:06:47 -08:00
deads2k b0b156b381 make tools/cache authoritative 2017-01-25 08:29:45 -05:00
deads2k 5a8f075197 move authoritative client-go utils out of pkg 2017-01-24 08:59:18 -05:00
forrestchen e2a465ae68 skip schedule deleting pod
Signed-off-by: forrestchen <forrestchen@tencent.com>

skip schedule deleting pod

Signed-off-by: forrestchen <forrestchen@tencent.com>
2017-01-24 10:13:54 +08:00
tanshanshan fb36d9a546 add unit test for scheduler 2017-01-24 09:31:08 +08:00
Clayton Coleman 469df12038
refactor: move ListOptions references to metav1 2017-01-23 17:52:46 -05:00
Antoine Pelisse 62af7dd33d OWNERS: Update latest OWNERS files
These files have been created lately, so we don't have much information
about them anyway, so let's just:
- Remove assignees and make them approvers
- Copy approves as reviewers
2017-01-23 10:05:48 -08:00
deads2k 1ce0637b27 move listers out of cache to reduce import tree 2017-01-20 15:01:38 -05:00
Kubernetes Submit Queue 22a405055d Merge pull request #40170 from deads2k/client-10-restclient
Automatic merge from submit-queue (batch tested with PRs 36693, 40154, 40170, 39033)

make client-go authoritative for pkg/client/restclient

Moves client/restclient to client-go and a util/certs, util/testing as transitives.
2017-01-20 09:18:52 -08:00
Kubernetes Submit Queue b2e134a724 Merge pull request #36693 from ConnorDoyle/oir-cleanup
Automatic merge from submit-queue (batch tested with PRs 36693, 40154, 40170, 39033)

Minor hygiene in scheduler.

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

Minor cleanups in scheduler, related to PR #31652.

- Unified lazy opaque resource caching.
- Deleted a commented-out line of code.

**Release note**:
```release-note
N/A
```
2017-01-20 09:18:49 -08:00
deads2k ee6752ef20 find and replace 2017-01-20 08:04:53 -05:00
deads2k c587b8a21e re-run client-gen 2017-01-20 08:02:36 -05:00
Kubernetes Submit Queue e9d4e4341c Merge pull request #40087 from deads2k/generic-24-move-fields
Automatic merge from submit-queue

move pkg/fields to apimachinery

Purely mechanical move of `pkg/fields` to apimachinery.  

Discussed with @lavalamp on slack.  Moving this an `labels` to apimachinery.

@liggitt any concerns?  I think the idea of field selection should become generic and this ends up shared between client and server, so this is a more logical location.
2017-01-19 08:48:17 -08:00
Kubernetes Submit Queue 05c2a0825e Merge pull request #38871 from k82cn/k8s_25318
Automatic merge from submit-queue

Made multi-scheduler graduated to Beta and then v1.

fixes #25318
2017-01-19 07:58:51 -08:00
deads2k 11e8068d3f move pkg/fields to apimachinery 2017-01-19 09:50:16 -05:00
Klaus Ma c8c4b81963 Made multi-scheduler graduated to Beta and then v1. 2017-01-19 20:16:01 +08:00
Dr. Stefan Schimanski 3d9449a353 genericapiserver: fix imports 2017-01-19 13:06:47 +01:00
Kubernetes Submit Queue 9dd96e3120 Merge pull request #39904 from jayunit100/scheduler_factory_iface_2
Automatic merge from submit-queue (batch tested with PRs 39898, 39904)

[scheduler] interface for config

**What this PR fixes**

This PR converts the Scheduler configuration factory into an interface, so that
- the scheduler_perf and scheduler integration tests dont rely on the struct for their implementation
- the exported functionality of the factory (i.e. what it needs to provide to create a scheduler configuration) is completely explicit, rather then completely coupled to a struct.
- makes some parts of the factory immutable, again to minimize possible coupling.  

This makes it easier to make a custom factory in instances where we might specifically want to import scheduler logic without actually reusing the entire scheduler codebase.
2017-01-18 14:31:09 -08:00
jayunit100 a98d14d2c5 [scheduler] interface for configuration factory, configurator. 2017-01-18 15:06:16 -05:00
Klaus Ma aea7b1faab Improve code coverage for algorithm/predicates. 2017-01-18 23:23:26 +08:00
Clayton Coleman bcde05753b
Correct import statements 2017-01-17 16:18:18 -05:00
Clayton Coleman 9a2a50cda7
refactor: use metav1.ObjectMeta in other types 2017-01-17 16:17:19 -05:00
Connor Doyle 94b9c0e20c Minor hygiene in scheduler.
- Unified lazy opaque resource caching.
- Deleted a commented-out line of code.
2017-01-17 07:00:07 -08:00
Kubernetes Submit Queue 0bd13332e9 Merge pull request #39447 from gyliu513/patch1
Automatic merge from submit-queue

Corrected a typo in scheduler factory.go.

**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
```
2017-01-17 04:12:44 -08:00
Kubernetes Submit Queue b1506004cc Merge pull request #39601 from mqliang/upstream-tolerates-taints-bugfix
Automatic merge from submit-queue (batch tested with PRs 39945, 39601)

bugfix for PodToleratesNodeTaints

`PodToleratesNodeTaints`predicate func should return true if pod has no toleration annotations and node's taint effect is `PreferNoSchedule`
2017-01-17 04:08:47 -08:00
Kubernetes Submit Queue 7b471136ba Merge pull request #39968 from timothysc/sched_owners
Automatic merge from submit-queue (batch tested with PRs 37680, 39968)

Update Owners for Scheduler

Update Owners file for scheduler component to spread the reviews around. 

/cc @davidopp  per previous sig-mtg.
2017-01-17 00:04:34 -08:00
Kubernetes Submit Queue e1900f704b Merge pull request #39993 from k82cn/pod_anti_affinity_issue
Automatic merge from submit-queue

Fixed pod anti-affinity bugs.

Broken by https://github.com/kubernetes/kubernetes/pull/39478/files#diff-fa4312d87a8e13262ade8a784ada4693R1036

/cc @timothysc @rrati
2017-01-16 23:12:47 -08:00
Klaus Ma c184fef6e6 Fixed pod anti-affinity bugs. 2017-01-17 13:28:54 +08:00
Timothy St. Clair 78574926df Update Owners for Scheduler 2017-01-16 19:30:17 -06:00
deads2k 77b4d55982 mechanical 2017-01-16 09:35:12 -05:00
Kubernetes Submit Queue eb9f953496 Merge pull request #39876 from deads2k/generic-20-deps-03
Automatic merge from submit-queue

move more things to apiserver

```
pkg/genericapiserver/api/handlers/negotiation/ -> apiserver/pkg/handlers/negotiation
pkg/genericapiserver/api/metrics -> apiserver/pkg/metrics
pkg/genericapiserver/api/request -> apiserver/pkg/request
pkg/util/wsstream -> apiserver/pkg/util/wsstream
plugin/pkg/auth/authenticator/request/headerrequest -> apiserver/pkg/authentication/request/headerrequest
plugin/pkg/webhook -> apiserver/pkg/webhook
```

and mechanicals.

`k8s.io/kubernetes/pkg/genericapiserver/routes/data/swagger` needs to be sorted out.
2017-01-16 04:14:37 -08:00
Kubernetes Submit Queue 6b5d82b512 Merge pull request #37505 from k82cn/use_controller_inf
Automatic merge from submit-queue (batch tested with PRs 39807, 37505, 39844, 39525, 39109)

Made cache.Controller to be interface.

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

#37504
2017-01-13 13:40:41 -08:00
deads2k 31b6ba4e94 mechanicals 2017-01-13 16:33:09 -05:00
Kubernetes Submit Queue a6fa5c2bfd Merge pull request #39814 from deads2k/api-58-multi-register
Automatic merge from submit-queue

replace global registry in apimachinery with global registry in k8s.io/kubernetes

We'd like to remove all globals, but our immediate problem is that a shared registry between k8s.io/kubernetes and k8s.io/client-go doesn't work.  Since client-go makes a copy, we can actually keep a global registry with other globals in pkg/api for now.

@kubernetes/sig-api-machinery-misc @lavalamp @smarterclayton @sttts
2017-01-13 12:37:02 -08:00
deads2k f1176d9c5c mechanical repercussions 2017-01-13 08:27:14 -05:00
Klaus Ma 25fe1e0d82 Made cache.Controller to be interface. 2017-01-13 13:33:23 +08:00
Kubernetes Submit Queue 082ce00eca Merge pull request #39478 from rrati/pod-affinity-api-fields
Automatic merge from submit-queue (batch tested with PRs 39803, 39698, 39537, 39478)

[scheduling] Moved pod affinity and anti-affinity from annotations to api fields #25319

Converted pod affinity and anti-affinity from annotations to api fields

Related: #25319
Related: #34508

**Release note**:
```Pod affinity and anti-affinity has moved from annotations to api fields in the pod spec.  Pod affinity or anti-affinity that is defined in the annotations will be ignored.```
2017-01-12 15:06:33 -08:00
Kubernetes Submit Queue b932c82739 Merge pull request #39803 from jayunit100/sched_cleanup_config_1
Automatic merge from submit-queue (batch tested with PRs 39803, 39698, 39537, 39478)

Use controller interface for everything in config factory

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

We want to replace controller structs with interfaces 
- per the TODO in `ControllerInterface`
- Specifically this will make the decoupling from Config and reuse of the scheduler's subcomponents cleaner.
2017-01-12 15:06:27 -08:00
Robert Rati 6a3ad93d6c [scheduling] Moved pod affinity and anti-affinity from annotations to api
fields. #25319
2017-01-12 14:54:29 -05:00
jayunit100 272b5dd1b2 Use controller interface for everything in config factory 2017-01-12 09:32:07 -05:00
NickrenREN a12dea14e0 fix redundant alias clientset 2017-01-12 10:21:05 +08:00
deads2k 6a4d5cd7cc start the apimachinery repo 2017-01-11 09:09:48 -05:00
Kubernetes Submit Queue ba611194f7 Merge pull request #39718 from foxish/remove-statefulset-special-case
Automatic merge from submit-queue (batch tested with PRs 39230, 39718)

Remove special case for StatefulSets in scheduler

**What this PR does / why we need it**: Removes special case for StatefulSet in scheduler code
/ref: https://github.com/kubernetes/kubernetes/issues/39687

**Special notes for your reviewer**:

**Release note**:

```release-note
Scheduler treats StatefulSet pods as belonging to a single equivalence class.
```
2017-01-11 00:23:11 -08:00
Anirudh dda3b01d01 Remove special case for StatefulSets in scheduler 2017-01-10 22:48:11 -08:00
Kubernetes Submit Queue 3f9f7471af Merge pull request #38989 from sjenning/set-qos-field
Automatic merge from submit-queue (batch tested with PRs 39684, 39577, 38989, 39534, 39702)

Set PodStatus QOSClass field

This PR continues the work for https://github.com/kubernetes/kubernetes/pull/37968

It converts all local usage of the `qos` package class types to the new API level types (first commit) and sets the pod status QOSClass field in the at pod creation time on the API server in `PrepareForCreate` and in the kubelet in the pod status update path (second commit).  This way the pod QOS class is set even if the pod isn't scheduled yet.

Fixes #33255

@ConnorDoyle @derekwaynecarr @vishh
2017-01-10 22:24:13 -08:00
Seth Jennings 4c30459e49 switch from local qos types to api types 2017-01-10 10:54:30 -06:00
jayunit100 9cdc4ae0ad Update FitError as a message component into the PodConditionUpdater. 2017-01-09 10:24:14 -05:00
mqliang d473646855 bugfix for PodToleratesNodeTaints 2017-01-09 18:16:43 +08:00
Jeff Grafton 20d221f75c Enable auto-generating sources rules 2017-01-05 14:14:13 -08:00
Guangya Liu ec35e0447e Corrected a typo in scheduler factory.go. 2017-01-05 06:37:56 +08:00
Kubernetes Submit Queue bd100b3b80 Merge pull request #38084 from tanshanshan/fix-little1
Automatic merge from submit-queue

Fix comment and optimize code

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

Fix comment and optimize code.

Thanks.

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-01-04 06:56:32 -08:00
tanshanshan d1fd1d3516 fix comment and so on 2017-01-04 17:16:11 +08:00
Kubernetes Submit Queue 63eec9608d Merge pull request #39353 from sttts/sttts-requestcontextmapper-move
Automatic merge from submit-queue (batch tested with PRs 39075, 39350, 39353)

Move pkg/api.{Context,RequestContextMapper} into pkg/genericapiserver/api/request

**Based on #39350**
2017-01-03 07:40:30 -08:00
Dr. Stefan Schimanski 87dd990bb7 Move pkg/api.{Context,RequestContextMapper} into pkg/genericapiserver/api/request 2017-01-03 14:57:33 +01:00
Kubernetes Submit Queue 2b7899ae46 Merge pull request #38503 from dshulyak/ttlassumed
Automatic merge from submit-queue

Ensure that assumed pod won't be expired until the end of binding

In case if api server is overloaded and will reply with 429 too many requests error, binding may take longer than ttl of scheduler cache for assumed pods 1199d42210/pkg/client/restclient/request.go (L787-L850) 

This problem was mitigated by using this fix e4d215d508 and increased rate limit for api server. But it is possible that it will occur again.
2017-01-03 04:15:06 -08:00
Dmitry Shulyak 530ee716e3 Count ttl for assumed pod when binding is finished
In such cases when api server is overloaded and returns a lot of
429 (too many requests) errors - binding may take a lot of time
to succeed due to retry policy implemented in rest client.
In such events cache ttl for assumed pods wasn't big enough.

In order to minimize probability of such errors ttl for assumed pods
will be counted from the time when binding for particular pod is finished
(either with error or success)

Change-Id: Ib0122f8a76dc57c82f2c7c52497aad1bdd8be411
2017-01-03 12:45:11 +02:00
Mike Danese 161c391f44 autogenerated 2016-12-29 13:04:10 -08:00
Kubernetes Submit Queue 69ddd8eb27 Merge pull request #39247 from wojtek-t/optimize_controller_manager_memory
Automatic merge from submit-queue

Avoid unnecessary memory allocations

Low-hanging fruits in saving memory allocations. During our 5000-node kubemark runs I've see this:

ControllerManager:
- 40.17% k8s.io/kubernetes/pkg/util/system.IsMasterNode
- 19.04% k8s.io/kubernetes/pkg/controller.(*PodControllerRefManager).Classify

Scheduler:
- 42.74% k8s.io/kubernetes/plugin/pkg/scheduler/algrorithm/predicates.(*MaxPDVolumeCountChecker).filterVolumes

This PR is eliminating all of those.
2016-12-28 00:02:59 -08:00
Wojciech Tyczynski ba07a36651 Avoid copying volumes in scheduler 2016-12-27 16:11:11 +01:00
Kubernetes Submit Queue 7b134995e5 Merge pull request #37513 from xiaolou86/podAffinity
Automatic merge from submit-queue

Optimize pod affinity when predicate

Optimize by returning as early as possible to avoid invoking priorityutil.PodMatchesTermsNamespaceAndSelector.
2016-12-27 06:46:54 -08:00
Joe Finney b4c87a94a8 Remove two zany unit tests. 2016-12-16 14:49:05 -08:00
Robert Rati 91931c138e [scheduling] Moved node affinity from annotations to api fields. #35518 2016-12-16 11:42:43 -05:00
Mike Danese 8fdec87d19 bazel: fix some unit tests 2016-12-15 18:36:22 -08:00
Kubernetes Submit Queue 59ad9a30ca Merge pull request #36060 from resouer/fix-service-affinity
Automatic merge from submit-queue

Add use case to service affinity

Also part of nits in refactoring predicates, I found the explanation of `serviceaffinity` in its comment is very hard to understand. So I added example instead here to help user/developer to digest it.
2016-12-15 04:10:08 -08:00
Kubernetes Submit Queue d8efc779ed Merge pull request #38154 from caesarxuchao/rename-release_1_5
Automatic merge from submit-queue (batch tested with PRs 38154, 38502)

Rename "release_1_5" clientset to just "clientset"

We used to keep multiple releases in the main repo. Now that [client-go](https://github.com/kubernetes/client-go) does the versioning, there is no need to keep releases in the main repo. This PR renames the "release_1_5" clientset to just "clientset", clientset development will be done in this directory.

@kubernetes/sig-api-machinery @deads2k 

```release-note
The main repository does not keep multiple releases of clientsets anymore. Please find previous releases at https://github.com/kubernetes/client-go
```
2016-12-14 14:21:51 -08:00
Chao Xu 03d8820edc rename /release_1_5 to /clientset 2016-12-14 12:39:48 -08:00
Kubernetes Submit Queue 9705bb728e Merge pull request #38747 from yarntime/fix_typo_registers
Automatic merge from submit-queue (batch tested with PRs 38648, 38747)

fix typo

**What this PR does / why we need it**:
    fix typo.

**Release note**:

```NONE
```
2016-12-14 03:49:47 -08:00
Harry Zhang a0e836a378 Add use case to service affinity 2016-12-14 16:59:35 +08:00
Kubernetes Submit Queue f8c5d2c47a Merge pull request #37090 from humblec/iscsi-nodiskconf
Automatic merge from submit-queue (batch tested with PRs 35436, 37090, 38700)

Make iscsi pv/pvc aware of nodiskconflict feature

Being iscsi a `RWO, ROX` volume we should conflict if more than one pod is using same iscsi LUN.  

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2016-12-13 12:36:34 -08:00
Humble Chirammal 28088159c3 Make iscsi pv claim aware of nodiskconflict feature.
Being ISCSI a RWO/ROX volumes it should inherit nodiskconflict feature.

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2016-12-13 10:07:09 +05:30
Mike Danese c87de85347 autoupdate BUILD files 2016-12-12 13:30:07 -08:00
yarntime@163.com 2a3b67c20f fix typo 2016-12-12 14:10:25 +08:00
yarntime@163.com 80e37cc04a fix typo 2016-12-12 13:49:09 +08:00
Hongchao Deng 479f507532 scheduler test: fix test due to nil pod assumption 2016-12-11 20:46:38 -08:00
Hongchao Deng a2426bd48a generic_scheduler: Schedule() pod param should never be nil 2016-12-11 19:30:48 -08:00
LouZhengwei 5c65088c18 optimize pod affinity when predicate 2016-12-11 23:49:45 +08:00
Clayton Coleman c52d510a24
refactor: generated 2016-12-10 18:05:53 -05:00
Clayton Coleman 3c72ee2189
Change references to OwnerReference 2016-12-10 18:05:36 -05:00
Jordan Liggitt d5afb71cf4
Remove json serialization annotations from internal types 2016-12-09 16:26:03 -05:00
Wojciech Tyczynski aa7da5231f Update bazel files 2016-12-09 09:42:02 +01:00
Wojciech Tyczynski e8d1cba875 GetOptions in client calls 2016-12-09 09:42:01 +01:00
Kubernetes Submit Queue f2f107124b Merge pull request #37691 from dshulyak/term_selector
Automatic merge from submit-queue (batch tested with PRs 38377, 36365, 36648, 37691, 38339)

Do not create selector and namespaces in a loop where possible

With 1000 nodes and 5000 pods (5 pods per node) with anti-affinity a lot of CPU wasted on creating LabelSelector and sets.String (map). 

With this change we are able to deploy that number of pods in ~25 minutes. Without - it takes 30 minutes to deploy 500 pods with anti-affinity configured.
2016-12-08 10:52:01 -08:00
Kubernetes Submit Queue 6484efbc2f Merge pull request #37369 from yarntime/fix_typo_in_predicates
Automatic merge from submit-queue (batch tested with PRs 35884, 37305, 37369, 37429, 35679)

fix typo in predicates
2016-12-08 03:55:15 -08:00
Ivan Shvedunov d40a8f3279 Don't require failureDomains in PodAffinityChecker
failureDomains are only used for PreferredDuringScheduling pod
anti-affinity, which is ignored by PodAffinityChecker.
This unnecessary requirement was making it hard to move
PodAffinityChecker to GeneralPredicates because that would require
passing --failure-domains to both kubelet and kube-controller-manager.
2016-12-08 14:08:28 +03:00
Dmitry Shulyak 55b413f504 Do not create selector and namespaces in a loop where possible
Change-Id: Ib8e62df92a3ea6b8ee6b90cb0b73af71332481d7
2016-12-08 13:04:38 +02:00
Kubernetes Submit Queue 1b5666fc35 Merge pull request #35275 from wojtek-t/cache_conditions
Automatic merge from submit-queue

Cache additional information in schedulercache.NodeInfo to speedup scheduler

Ref #35117
2016-12-07 02:23:19 -08:00
Kubernetes Submit Queue f299a0010a Merge pull request #37558 from jayunit100/scheduler_log_spam
Automatic merge from submit-queue (batch tested with PRs 38076, 38137, 36882, 37634, 37558)

[scheduler] Use V(10) for anything which may be O(N*P) logging

Fixes #37014

This PR makes sure that logging statements which are capable of being called on a perNode / perPod basis (i.e. non essential ones that will just clog up logs at large scale) are at V(10) level.

I dreamt of a levenstein filter that built a weak map of word frequencies and alerted once log throughput increased w/o varying information content....  but then I woke up and realized this is probably all we really need for now :)
2016-12-05 19:25:57 -08:00
Clayton Coleman 3454a8d52c
refactor: update bazel, codec, and gofmt 2016-12-03 19:10:53 -05:00
Clayton Coleman 5df8cc39c9
refactor: generated 2016-12-03 19:10:46 -05:00
gmarek cd2cceb364 Minor scheduler cleanup 2016-11-30 09:35:25 +01:00
Kubernetes Submit Queue a894bde225 Merge pull request #37379 from wojtek-t/safe_schedulercache
Automatic merge from submit-queue

Try self-repair scheduler cache or panic

Fix #37232
2016-11-29 08:15:03 -08:00
Wojciech Tyczynski f5ced35887 Log when pod expires in scheduler 2016-11-29 12:03:29 +01:00
jayunit100 7c94c51860 [scheduler] Use V(10) for anything which may be O(N*P) logging 2016-11-28 10:31:49 -05:00
Wojciech Tyczynski 7387bc0572 Cache node taints in scheduler NodeInfo 2016-11-24 16:54:06 +01:00
Wojciech Tyczynski be2bb39964 Cache node conditions in scheduler NodeInfo 2016-11-24 16:54:05 +01:00
Wojciech Tyczynski 8f1d240f73 Try self-repair scheduler cache or panic 2016-11-24 08:36:34 +01:00
Clayton Coleman 35a6bfbcee
generated: refactor 2016-11-23 22:30:47 -06:00
Chao Xu bcc783c594 run hack/update-all.sh 2016-11-23 15:53:09 -08:00
Chao Xu f782aba56e plugin/scheduler 2016-11-23 15:53:09 -08:00
yarntime@163.com 22e0bdcfaa fix typo in predicates 2016-11-23 18:15:17 +08:00
Wojciech Tyczynski e4d215d508 Reduce impact of scheduler bug 2016-11-22 17:19:45 +01:00
Kubernetes Submit Queue a85d352de9 Merge pull request #37234 from liggitt/revert-flex_node_conditions
Automatic merge from submit-queue

Revert "Avoid hard-coding list of Node Conditions"

* we don't know how other API consumers are using node conditions (there was no prior expectation that the scheduler would block on custom conditions)
* not all conditions map directly to schedulability (e.g. `MemoryPressure`/`DiskPressure`)
* not all conditions use True to mean "unschedulable" (e.g. `Ready`)

This reverts commit 511b2ecaa8 to avoid breaking existing API users and to avoid constraining future uses of the node conditions API
2016-11-21 17:41:59 -08:00
Jordan Liggitt c214abb5ff
Revert "Avoid hard-coding list of Node Conditions"
This reverts commit 511b2ecaa8.
2016-11-21 14:55:11 -05:00
Harry Zhang 5554dbf907 Fix invalid predicates describe 2016-11-19 22:30:15 +08:00
Justin Santa Barbara 511b2ecaa8 Avoid hard-coding list of Node Conditions
We assume that if a Condition isn't well-known, that it blocks
scheduling of pods, and that the "unhealthy" value is api.ConditionTrue
2016-11-14 14:25:45 -05:00
Kubernetes Submit Queue 5dd346ab75 Merge pull request #34693 from yarntime/add_pod_affinity_test_cases
Automatic merge from submit-queue

add podAntiAffinity test cases

add podAntiAffinity test cases.
2016-11-07 01:37:22 -08:00
Kubernetes Submit Queue f715b26d9c Merge pull request #35932 from jayunit100/sched_events_spam_reduce
Automatic merge from submit-queue

Reduce spam in Events from scheduler by counter aggregation of failure

Fixes #35842
Part of overall #35555
2016-11-06 17:48:31 -08:00
David Ashpole 9aca40dee6 revert #33218. dont need #36180. We only use diskpressure 2016-11-04 08:29:27 -07:00
jayunit100 5d5bc6759e Reduce spam in Events from scheduler by counter aggregation of failure
reasons.
2016-11-03 13:53:35 -04:00
gmarek 3971553298 Scheduler Reduce function can use nodeNameToNodeInfo map 2016-11-03 10:07:05 +01:00
gmarek c80d308128 Scheduler Reduce functions can use PriorityMetadata 2016-11-02 16:33:22 +01:00
Kubernetes Submit Queue 8c90bc35e2 Merge pull request #35612 from gmarek/scheduler2
Automatic merge from submit-queue

split scheduler priorities into separate files

In the current state it's really hard to find a thing one is looking for, if he doesn't know already know where to look. cc @davidopp
2016-11-02 05:26:55 -07:00
Connor Doyle c93646e8da Support opaque integer resource accounting.
- Prevents kubelet from overwriting capacity during sync.
- Handles opaque integer resources in the scheduler.
  - Adds scheduler predicate tests for opaque resources.
- Validates opaque int resources:
  - Ensures supplied opaque int quantities in node capacity,
    node allocatable, pod request and pod limit are integers.
  - Adds tests for new validation logic (node update and pod spec).
- Added e2e tests for opaque integer resources.
2016-10-28 10:15:13 -07:00
Kubernetes Submit Queue 6ce128c4b1 Merge pull request #35606 from gmarek/scheduler
Automatic merge from submit-queue

Small cleanup of scheduler default algorithm provider

It's a no-op PR that just moves stuff around.
2016-10-28 06:06:11 -07:00
Janet Kuo 10aee82ae3 Rename PetSet API to StatefulSet 2016-10-27 17:25:10 -07:00
gmarek 802ebf01e2 split scheduler priorities 2016-10-26 14:11:15 +02:00
gmarek fc8a771b1c Small cleanup of scheduler default algorithm provider 2016-10-26 10:50:15 +02:00
Clayton Coleman 07bd50be0d
Internal weight field for affinity must be int32 2016-10-25 19:28:40 -04:00
Kubernetes Submit Queue e3067f326f Merge pull request #34634 from mwielgus/pod-unschedulable
Automatic merge from submit-queue

Make "Unschedulable" reason a constant in api

String "Unschedulable" is used in couple places in K8S:
* scheduler
* federation replicaset and deployment controllers
* cluster autoscaler
* rescheduler
This PR makes the string a part of API so it not changed.

cc: @davidopp @fgrzadkowski @wojtek-t
2016-10-25 09:30:49 -07:00
Mike Danese df713b478c fix tests by declaring testdata 2016-10-21 17:32:32 -07:00
Mike Danese 3b6a067afc autogenerated 2016-10-21 17:32:32 -07:00
Kubernetes Submit Queue a7807eb5a4 Merge pull request #34138 from ingvagabund/create-restclient-interface
Automatic merge from submit-queue

Create restclient interface

Refactoring of code to allow replace *restclient.RESTClient with any RESTClient implementation that implements restclient.RESTClientInterface interface.
2016-10-21 16:02:04 -07:00
Jan Chaloupka 6079053407 Update clientset generator to use RESTClient interface instead of the RESTClient data type 2016-10-21 10:13:51 +02:00
Kubernetes Submit Queue b0a4216182 Merge pull request #33763 from jayunit100/sched-checkservice-predicateCache
Automatic merge from submit-queue

Predicate cacheing and cleanup

Fix to #31795 

First pass @ cleanup and caching of the CheckServiceAffinity function.  

The cleanup IMO is necessary because the logic around the pod listing and the use of the "implicit selector" (which is reverse engineered to enable the homogenous pod groups).

Should still pass the E2Es.

@timothysc @wojtek-t
2016-10-20 07:39:41 -07:00
jayunit100 08cff0157d PredicateMetadata factory and optimization, Cleaned up some comments,
Comments addressed, Make emptyMetadataProducer a func to avoid casting,
FakeSvcLister: remove error return for len(svc)=0.  New test for
predicatePrecomp to make method semantics explictly enforced when meta
is missing. Precompute wrapper.
2016-10-20 08:27:11 -04:00
Kubernetes Submit Queue 6306ab00d2 Merge pull request #34845 from derekwaynecarr/make_pvc_informer_list
Automatic merge from submit-queue

PVC informer lister supports listing

This will be used in follow-on PRs for quota evaluation backed by informers for pvcs.

/cc @deads2k @eparis @kubernetes/sig-storage
2016-10-19 19:29:02 -07:00
Clayton Coleman 1694cfb72d
Make defaulting part of versioning codec
Most normal codec use should perform defaulting. DirectCodecs should not
perform defaulting. Update the defaulting_test to fuzz the list of known
defaulters. Use the new versioning.NewDefaultingCodec() method.
2016-10-18 21:07:35 -04:00
derekwaynecarr 555231fad7 PVC informer lister supports listing 2016-10-18 14:36:33 -04:00
Kubernetes Submit Queue 6e2f5f8f6d Merge pull request #28742 from jessfraz/test-go1.7rc1
Automatic merge from submit-queue

Update to go 1.7

<!--
Checklist for submitting a Pull Request

Please remove this comment block before submitting.

1. Please read our [contributor guidelines](https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md).
2. See our [developer guide](https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md).
3. If you want this PR to automatically close an issue when it is merged,
   add `fixes #<issue number>` or `fixes #<issue number>, fixes #<issue number>`
   to close multiple issues (see: https://github.com/blog/1506-closing-issues-via-pull-requests).
4. Follow the instructions for [labeling and writing a release note for this PR](https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes) in the block below.
-->

Closes #33070
Closes #32999

```release-note
Updated Go to 1.7
```


[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()

This is to test go version 1.7
2016-10-18 05:59:04 -07:00
Kubernetes Submit Queue bcbdcd17f3 Merge pull request #34685 from resouer/eclass-2
Automatic merge from submit-queue

Refactor scheduler to enable switch on equivalence cache

Part 2 of #30844 

Refactoring to enable easier switch on of equivalence cache.
2016-10-18 04:21:33 -07:00
Harry Zhang 50eaeaa7bd Update ecache and add scheduler method 2016-10-17 11:42:16 -04:00
Kubernetes Submit Queue 669efd72a4 Merge pull request #34041 from pigmej/fix_typos_plugin
Automatic merge from submit-queue

Fix typos and englishify plugin/pkg

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

**Which issue this PR fixes**: `None`

**Special notes for your reviewer**: Just typos

**Release note**: `NONE`
2016-10-15 02:13:06 -07:00