Commit Graph

1083 Commits (37dab8017346dfd9c813e2501cc34eebf17c6527)

Author SHA1 Message Date
Hongchao Deng 8cd55e8e52 refactor scheduler test and include phantom test 2016-06-24 16:11:59 -07:00
Buddha Prakash c3551ae6cd Refactor qos package
Signed-off-by: Buddha Prakash <buddhap@google.com>
2016-06-24 15:36:04 -07:00
Rudi Chiarito 8db551f674 golint fixes for aws cloudprovider 2016-06-24 17:06:38 -04:00
k8s-merge-robot a405df4391 Merge pull request #25710 from xiangpengzhao/fix_predicate
Automatic merge from submit-queue

No need to log empty string in predicates.go

If `pvcName` is empty, we don't need to log it.
2016-06-24 13:56:26 -07:00
CJ Cullen 38a1042199 Add a 5x exponential backoff on 429s & 5xxs to the webhook Authenticator/Authorizer. 2016-06-23 18:15:39 -07:00
CJ Cullen ae67a4e209 Check HTTP Status code in webhook authorizer/authenticator. 2016-06-22 11:15:33 -07:00
k8s-merge-robot cd66fb7a55 Merge pull request #27772 from jsafrane/kubelet-volume-not-found
Automatic merge from submit-queue

Rephrase 'pv not found in cache' warnings.

When kubelet starts a pod that refers to non-existing PV, PVC or Node, it should clearly show that the requested element does not exist.

Previous `PersistentVolumeClaim 'default/ceph-claim-wm' is not in cache` looks like random kubelet hiccup, while `PersistentVolumeClaim 'default/ceph-claim-wm' not found` suggests that the object may not exist at all and it might be an user error.

Fixes #27523
2016-06-22 05:16:02 -07:00
bin liu fd27cd47f7 fix some typos
Signed-off-by: bin liu <liubin0329@gmail.com>
2016-06-22 18:14:26 +08:00
k8s-merge-robot 07471cf90f Merge pull request #27553 from justinsb/pvc_zone_spreading_2
Automatic merge from submit-queue

AWS/GCE: Spread PetSet volume creation across zones, create GCE volumes in non-master zones

Long term we plan on integrating this into the scheduler, but in the
short term we use the volume name to place it onto a zone.
    
We hash the volume name so we don't bias to the first few zones.
    
If the volume name "looks like" a PetSet volume name (ending with
-<number>) then we use the number as an offset.  In that case we hash
the base name.
2016-06-22 01:22:16 -07:00
Harry Zhang 49fe9d1b41 Add unit test to ensure no error thrown 2016-06-21 22:23:37 -04:00
Jan Safranek c9a60e2d2c Rephrase 'pv not found in cache' warnings.
When kubelet starts a pod that refers to non-existing PV, PVC or Node, it
should clearly show that the requested element does not exist.

Previous "PersistentVolumeClaim 'default/ceph-claim-wm' is not in cache"
looks like random kubelet hiccup, while "PersistentVolumeClaim
'default/ceph-claim-wm' not found" suggests that the object may not exist at
all and it might be an user error.

Fixes #27523
2016-06-21 14:56:11 +02:00
Harry Zhang 080b49276e Omit invalid affinity error in admission 2016-06-21 11:06:34 +08:00
k8s-merge-robot 6fbf99b11a Merge pull request #26753 from ericchiang/rbac-authorizer-tests
Automatic merge from submit-queue

add unit and integration tests for rbac authorizer

This PR adds lots of tests for the RBAC authorizer. 

The plan over the next couple days is to add a lot more test cases.

Updates #23396

cc @erictune
2016-06-19 19:19:08 -07:00
k8s-merge-robot 090e6ff660 Merge pull request #27625 from goltermann/spell2
Automatic merge from submit-queue

Fix several spelling errors in comments

What the title says
2016-06-18 23:08:28 -07:00
Justin Santa Barbara 9c2566572d GCE Multizone: Allow volumes to be created in non-master zone
We had a long-lasting bug which prevented creation of volumes in
non-master zones, because the cloudprovider in the volume label
admission controller is not initialized with the multizone setting
(issue #27656).

This implements a simple workaround: if the volume is created with the
failure-domain zone label, we look for the volume in that zone.  This is
more efficient, avoids introducing a new semantic, and allows users (and
the dynamic provisioner) to create volumes in non-master zones.

Fixes #27657
2016-06-17 23:27:41 -04:00
k8s-merge-robot 8b7d842203 Merge pull request #27227 from abhgupta/issue_27198
Automatic merge from submit-queue

Counting pod volume towards PV limit even if PV/PVC is missing

Fixes #27198 

Implements option 3 from https://github.com/kubernetes/kubernetes/issues/27198#issuecomment-225298492

/cc @smarterclayton @markturansky @childsb
2016-06-17 12:40:51 -07:00
goltermann 218645b346 Fix several spelling errors in comments. 2016-06-17 10:41:18 -07:00
k8s-merge-robot f830a2ceec Merge pull request #27237 from xiangpengzhao/fix_priorityscoreinfo
Automatic merge from submit-queue

Make priority score info clearer

When I trace the scheduler workflow, the log info makes me a bit confused:
Taint Toleration Priority Score info is lacking.
The values of Absolute and Requested resources are in the reverse order.
The values of resources have no type and unit.

This PR tries to make the log info clearer.

before:
```
I0609 15:18:17.978739   32560 node_affinity.go:92] mongo -> vm: NodeAffinityPriority, Score: (0)
I0609 15:18:17.978756   32560 priorities.go:69] mongo -> vm: Least Requested Priority, Absolute/Requested: (100, 209715200) / (4000, 8372678656) Score: (9, 9)
I0609 15:18:17.978896   32560 priorities.go:262] mongo -> vm: Balanced Resource Allocation, Absolute/Requested: (100, 209715200) / (4000, 8372678656) Score: (9)
I0609 15:18:17.978971   32560 selector_spreading.go:233] mongo -> vm: SelectorSpreadPriority, Score: (10)
I0609 15:18:17.979043   32560 generic_scheduler.go:301] Host vm Score 38
```

after:
```
I0611 06:58:23.132306   28814 taint_toleration.go:108] mongo -> vm: Taint Toleration Priority, Score: (10)
I0611 06:58:23.132326   28814 priorities.go:69] mongo -> vm: Least Requested Priority, Absolute/Requested(CPU:millicores, memory:bytes): (4000, 8372678656) / (100, 209715200) Score: (9, 9)
I0611 06:58:23.132367   28814 node_affinity.go:92] mongo -> vm: NodeAffinityPriority, Score: (0)
I0611 06:58:23.132400   28814 priorities.go:262] mongo -> vm: Balanced Resource Allocation, Absolute/Requested(CPU:millicores, memory:bytes): (4000, 8372678656) / (100, 209715200) Score: (9)
I0611 06:58:23.132544   28814 selector_spreading.go:233] mongo -> vm: SelectorSpreadPriority, Score: (10)
I0611 06:58:23.132567   28814 generic_scheduler.go:301] Host vm Score 38
```
2016-06-17 00:56:55 -07:00
Eric Chiang d13e351028 add unit and integration tests for rbac authorizer 2016-06-14 11:07:48 -07:00
Wojciech Tyczynski 5d702a32c1 Fix race in informer 2016-06-14 16:40:12 +02:00
Abhishek Gupta 20ce8b71ab Improving error messages and naming to be clear 2016-06-13 15:23:17 -07:00
Abhishek Gupta 07bc06ba50 Counting pod volume towards PV limit even if PV/PVC is missing 2016-06-13 15:17:42 -07:00
derekwaynecarr ce44b3b98a Quota can look for a previous object from admission rather than do a lookup 2016-06-13 09:50:53 -04:00
xiangpengzhao f1d98ba961 Make priority score info more clear 2016-06-12 02:31:41 -04:00
k8s-merge-robot 9a2ad73cee Merge pull request #22568 from abhgupta/abhgupta-dev
Automatic merge from submit-queue

Considering all nodes for the scheduler cache to allow lookups

Fixes the actual issue that led me to create https://github.com/kubernetes/kubernetes/issues/22554

Currently the nodes in the cache provided to the predicates excludes the unschedulable nodes using field level filtering for the watch results. This results in the above issue as the `ServiceAffinity` predicate uses the cached node list to look up the node metadata for a peer pod (another pod belonging to the same service). Since this peer pod could be currently hosted on a node that is currently unschedulable, the lookup could potentially fail, resulting in the pod failing to be scheduled.

As part of the fix, we are now including all nodes in the watch results and excluding the unschedulable nodes using `NodeCondition`

@derekwaynecarr PTAL
2016-06-11 12:22:46 -07:00
k8s-merge-robot 4793372a85 Merge pull request #25888 from rootfs/attacher-aws-cinder
Automatic merge from submit-queue

implement EBS and Cinder attacher/detacher 

follow up with #21709

@kubernetes/sig-storage
2016-06-10 05:39:22 -07:00
k8s-merge-robot ade299c18f Merge pull request #27146 from mikedanese/nil-ptr
Automatic merge from submit-queue

oidc: fix test nil pointer

```
2016-06-09 13:12:37.262983 I | http: TLS handshake error from 127.0.0.1:32814: remote error: bad certificate
PASS
--- FAIL: TestNewOIDCAuthProvider (0.87s)
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
        panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x5d91ca]

goroutine 12 [running]:
panic(0x124bd00, 0xc8200101f0)
        /usr/local/google/home/mikedanese/.gimme/versions/go1.6.1.linux.amd64/src/runtime/panic.go:464 +0x3e6
testing.tRunner.func1(0xc820023b90)
        /usr/local/google/home/mikedanese/.gimme/versions/go1.6.1.linux.amd64/src/testing/testing.go:467 +0x192
panic(0x124bd00, 0xc8200101f0)
        /usr/local/google/home/mikedanese/.gimme/versions/go1.6.1.linux.amd64/src/runtime/panic.go:426 +0x4e9
k8s.io/kubernetes/plugin/pkg/auth/authenticator/token/oidc/testing.(*OIDCProvider).AddMinimalProviderConfig(0xc820020580, 0x0)
        /usr/local/google/home/mikedanese/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/plugin/pkg/auth/authenticator/token/oidc/testing/provider.go:85 +0x2a
k8s.io/kubernetes/plugin/pkg/client/auth/oidc.TestNewOIDCAuthProvider(0xc820023b90)
        /usr/local/google/home/mikedanese/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/plugin/pkg/client/auth/oidc/oidc_test.go:51 +0x367
testing.tRunner(0xc820023b90, 0x1d0a360)
        /usr/local/google/home/mikedanese/.gimme/versions/go1.6.1.linux.amd64/src/testing/testing.go:473 +0x98
created by testing.RunTests
        /usr/local/google/home/mikedanese/.gimme/versions/go1.6.1.linux.amd64/src/testing/testing.go:582 +0x892
FAIL    k8s.io/kubernetes/plugin/pkg/client/auth/oidc   3.081s
```

cc @bobbyrullo @yifan-gu
2016-06-10 00:12:28 -07:00
Mike Danese c0cda8535e oidc: fix test nil pointer 2016-06-09 13:15:59 -07:00
Abhishek Gupta bc9c461402 Adding test case for scheduler NodeConditionPredicate 2016-06-08 14:41:38 -07:00
Abhishek Gupta 623e7dfa39 Considering all nodes for the scheduler cache to allow lookups 2016-06-08 14:41:18 -07:00
Eric Chiang c8ca49ec88 plugin/pkg/auth/authorizer/webhook: log request errors
Currently the API server only checks the errors returned by an
authorizer plugin, it doesn't return or log them[0]. This makes
incorrectly configuring the wehbook authorizer plugin extremely
difficult to debug.

Add a logging statement if the request to the remove service fails
as this indicates misconfiguration.

[0] https://goo.gl/9zZFv4
2016-06-08 13:19:23 -07:00
Huamin Chen d1e0a13924 support AWS and Cinder attacher
Signed-off-by: Huamin Chen <hchen@redhat.com>
2016-06-08 12:56:24 +00:00
Matt Liggett 421950eecb Avoid pathname collisions in TestNewOICAuthProvider.
May fix #26815
2016-06-07 18:01:29 -07:00
k8s-merge-robot 2253f3d824 Merge pull request #26021 from hongchaodeng/random
Automatic merge from submit-queue

scheduler: remove unused random generator

The way scheduler selecting host has been changed to round-robin.
Clean up leftover.
2016-05-29 12:35:00 -07:00
k8s-merge-robot 577cdf937d Merge pull request #26415 from wojtek-t/network_not_ready
Automatic merge from submit-queue

Add a NodeCondition "NetworkUnavaiable" to prevent scheduling onto a node until the routes have been created 

This is new version of #26267 (based on top of that one).

The new workflow is:
- we have an "NetworkNotReady" condition
- Kubelet when it creates a node, it sets it to "true"
- RouteController will set it to "false" when the route is created
- Scheduler is scheduling only on nodes that doesn't have "NetworkNotReady ==true" condition

@gmarek @bgrant0607 @zmerlynn @cjcullen @derekwaynecarr @danwinship @dcbw @lavalamp @vishh
2016-05-29 03:06:59 -07:00
k8s-merge-robot 9ef7693c0b Merge pull request #26496 from hongchaodeng/fix
Automatic merge from submit-queue

scheduler cache: print err if AssumePod fail

ref:
* https://github.com/kubernetes/kubernetes/issues/19681#issuecomment-222337964
* #26043

Print error to help debug flake.
2016-05-28 23:46:16 -07:00
Hongchao Deng 54acae1281 scheduler cache: print err if AssumePod fail 2016-05-28 18:47:12 -07:00
k8s-merge-robot e543bd6452 Merge pull request #26007 from smarterclayton/watch_opt
Automatic merge from submit-queue

Additional optimizations to the encode/decode paths

Builds on top of #25983 with a number of other optimizations.
2016-05-28 06:27:00 -07:00
Wojciech Tyczynski be1b57100d Change to NotReadyNetworking and use in scheduler 2016-05-27 19:32:49 +02:00
Eric Chiang ef40aa9572 pkg/master: enable certificates API and add rbac authorizer 2016-05-25 14:24:47 -07:00
k8s-merge-robot e5cb165ecc Merge pull request #25091 from deads2k/reduce-conflicts
Automatic merge from submit-queue

reduce conflict retries

Eliminates quota admission conflicts due to latent caches on the same API server.

@derekwaynecarr
2016-05-25 05:33:23 -07:00
Hongchao Deng e2704c9168 scheduler: remove unused random generator 2016-05-24 20:12:21 -07:00
k8s-merge-robot 5303794ef0 Merge pull request #25787 from liggitt/update-admission
Automatic merge from submit-queue

plumb Update resthandler to allow old/new comparisons in admission

Rework how updated objects are passed to rest storage Update methods (first pass at https://github.com/kubernetes/kubernetes/pull/23928#discussion_r61444342)

* allows centralizing precondition checks (uid and resourceVersion)
* allows admission to have the old and new objects on patch/update operations (sets us up for field level authorization, differential quota updates, etc)
* allows patch operations to avoid double-GETting the object to apply the patch

Overview of important changes:
* pkg/api/rest/rest.go
  * changes `rest.Update` interface to give rest storage an `UpdatedObjectInfo` interface instead of the object directly. To get the updated object, the storage must call `UpdatedObject()`, passing in the current object
* pkg/api/rest/update.go
  * provides a default `UpdatedObjectInfo` impl
  * passes a copy of the updated object through any provided transforming functions and returns it when asked
  * builds UID preconditions from the updated object if they can be extracted
* pkg/apiserver/resthandler.go
  * Reworks update and patch operations to give old objects to admission
* pkg/registry/generic/registry/store.go
  * Calls `UpdatedObject()` inside `GuaranteedUpdate` so it can provide the old object

Todo:
- [x] Update rest.Update interface:
  * Given the name of the object being updated
  * To get the updated object data, the rest storage must pass the current object (fetched using the name) to an `UpdatedObject(ctx, oldObject) (newObject, error)` func. This is typically done inside a `GuaranteedUpdate` call.
- [x] Add old object to admission attributes interface
- [x] Update resthandler Update to move admission into the UpdatedObject() call
- [x] Update resthandler Patch to move the patch application and admission into the UpdatedObject() call
- [x] Add resttest tests to make sure oldObj is correctly passed to UpdatedObject(), and errors propagate back up

Follow-up:
* populate oldObject in admission for delete operations?
* update quota plugin to use `GetOldObject()` in admission attributes
* admission plugin to gate ownerReference modification on delete permission
* Decide how to handle preconditions (does that belong in the storage layer or in the resthander layer?)
2016-05-24 08:41:31 -07:00
Filip Grzadkowski 55a1c826bb Refactor scheduler to expose predicates to cluster autoscaler 2016-05-24 09:04:31 +02:00
Jordan Liggitt 29252acd1a Change rest storage Update interface to retrieve updated object
Add OldObject to admission attributes

Update resthandler Patch/Update admission plumbing
2016-05-23 21:09:26 -04:00
Hai Huang 235020ad64 getting emailAddress from TLS cert 2016-05-23 18:36:14 -04:00
deads2k 02c0181f26 reduce conflict retries 2016-05-23 13:09:37 -04:00
k8s-merge-robot 180ab70df0 Merge pull request #25560 from ping035627/ping035627-patch-3
Automatic merge from submit-queue

A optimization for “RegisterCustomFitPredicate” function, avoiding redundancy
2016-05-22 19:37:23 -07:00
PingWang e2af16b1d5 Update generic_scheduler.go 2016-05-23 09:18:15 +08:00
PingWang 36740719d9 exec gofmt -s 2016-05-23 09:17:17 +08:00
k8s-merge-robot fe1588ebb2 Merge pull request #26024 from dims/fix-issue-25950
Automatic merge from submit-queue

Fix useless error message in scheduler log

Print the Namespace and Name instead of Kind/ApiVersion.

fixes #25950
2016-05-21 23:33:42 -07:00
k8s-merge-robot 529135dd01 Merge pull request #25863 from ping035627/ping035627-patch-2
Automatic merge from submit-queue

Fix the bug of the "removePod" function in node_info.go
2016-05-21 21:34:28 -07:00
Clayton Coleman c6961d6fd6
Remove runtime.Typer, reduce to ObjectKinds(1) (3)
Remove the unnecessary variants, which avoids allocations in several
core paths.
2016-05-21 23:55:42 -04:00
k8s-merge-robot 9e8282c586 Merge pull request #25838 from cjcullen/authzcache
Automatic merge from submit-queue

Cache webhook authorization responses

Similar to #25694, but for authorization.
2016-05-21 20:34:34 -07:00
k8s-merge-robot c17465be03 Merge pull request #25531 from ingvagabund/introduce-memory-pressure-to-scheduler
Automatic merge from submit-queue

Introduce node memory pressure condition to scheduler

Following the work done by @derekwaynecarr at https://github.com/kubernetes/kubernetes/pull/21274, introducing memory pressure predicate for scheduler.

Missing:

* write down unit-test
* test the implementation

At the moment this is a heads up for further discussion how the new node's memory pressure condition should be handled in the generic scheduler.

**Additional info**

* Based on [1], only best effort pods are subject to filtering.
* Based on [2], best effort pods are those pods "iff requests & limits are not specified for any resource across all containers".

[1] 542668cc79/docs/proposals/kubelet-eviction.md (scheduler)
[2] https://github.com/kubernetes/kubernetes/pull/14943
2016-05-21 19:37:15 -07:00
k8s-merge-robot 009ae748a5 Merge pull request #25830 from smarterclayton/init_container_psp
Automatic merge from submit-queue

Add init containers to PSP admission

Treat them just like regular containers.

@pweil-
2016-05-21 16:01:13 -07:00
Jan Chaloupka b95b30bbd7 Scheduler: introduce CheckNodeMemoryPressurePredicate, don't schedule pods for nodes that reports memory pressury.
Introduce unit-test for CheckNodeMemoryPressurePredicate

Following work done in #14943
2016-05-22 00:40:28 +02:00
CJ Cullen d03dbbcc14 Add LRU Expire cache to webhook authorizer. 2016-05-21 14:50:50 -07:00
Davanum Srinivas 57f6321788 Fix useless error message in scheduler log
Print the Namespace and Name instead of Kind/ApiVersion.

fixes #25950
2016-05-21 16:02:36 -04:00
k8s-merge-robot 682c188fc8 Merge pull request #25738 from wojtek-t/default_protobuf
Automatic merge from submit-queue

Use protobufs by default to communicate with apiserver (still store JSONs in etcd)

@lavalamp @kubernetes/sig-api-machinery
2016-05-21 11:48:25 -07:00
k8s-merge-robot 346f965871 Merge pull request #25694 from cjcullen/authncache
Automatic merge from submit-queue

Cache Webhook Authentication responses

Add a simple LRU cache w/ 2 minute TTL to the webhook authenticator.

Kubectl is a little spammy, w/ >= 4 API requests per command. This also prevents a single unauthenticated user from being able to DOS the remote authenticator.
2016-05-21 10:48:38 -07:00
Wojciech Tyczynski 0f881d6120 Use protobufs by default to communicate with apiserver 2016-05-21 11:38:32 +02:00
Mike Danese 7170c8910d Merge pull request #25270 from bobbyrullo/deps
Implement OIDC client AuthProvider
2016-05-20 16:43:23 -07:00
Filip Grzadkowski ab10484330 Merge pull request #25741 from fgrzadkowski/unschedulable_pod
Stop setting Message when updating PodScheduled condition
2016-05-20 10:02:13 +02:00
PingWang 901011f242 Update node_info.go 2016-05-20 09:07:43 +08:00
PingWang b973670344 Add the length detection of the "predicateFuncs" in generic_scheduler.go
The PR add the length detection of the "predicateFuncs" for "findNodesThatFit" function of generic_scheduler.go. 
In “findNodesThatFit” function, if the length of the "predicateFuncs" parameter is 0, it can set filtered equals nodes.Items, and needn't to traverse the nodes.Items.
2016-05-20 08:49:53 +08:00
Clayton Coleman 88b39cadf8
Have the service account controller force retry
Service account controller, when API token not found, now sends 500 with
Retry-After: 1s. Also change the apiserver to actually write the error.
2016-05-19 09:08:57 -04:00
PingWang 85f1e0ea6a Fix the bug of the "removePod" function in node_info.go
It should reduce the resource data after finding the pod in the pods, because perhaps no corresponding pod in the pods of the node, at this time it shouldn't reduce the resource data of the node.
2016-05-19 17:19:54 +08:00
Clayton Coleman 588f15844b
Add init container support to other admission controllers 2016-05-18 22:32:25 -04:00
Clayton Coleman e2afc97587
Add init containers to PSP admission
Treat them just like regular containers.
2016-05-18 22:32:22 -04:00
Bobby Rullo f575f89cd7 add tests for the OIDC WrapTransport
tests that tokens gets refreshed, passed along as bearers, etc.
2016-05-18 17:03:12 -07:00
Bobby Rullo 94ffa344a8 OIDC authprovider more testable, and add backoff
* Use an interface for OIDC Client, so that we're testing the behavior
  of the client, not the go-oidc package itself
* add backoff and retry when server rejects token
2016-05-18 17:03:12 -07:00
Bobby Rullo e85940ed17 add tests for newOIDCAuthProvider 2016-05-18 17:03:11 -07:00
Bobby Rullo c990462d0f Refactor test oidc provider into its own package
This makes it easier to test other OIDC code.
2016-05-18 17:03:11 -07:00
Bobby Rullo f2135bdf90 Implement new OIDC client AuthProvider
This commit handles:
     * Passing ID Token as Bearer token
     * Refreshing of tokens using refresh-tokens
     * Persisting refreshed tokens
     * ability to add arbitrary extra scopes via config
       * this is what enables the cross-client/azp stuff
2016-05-18 17:02:48 -07:00
CJ Cullen 57f96a932f Add expiration LRU cache for webhook token authenticator. 2016-05-18 11:58:11 -07:00
Kevin 52fb89ff73 implement taints and tolerations 2016-05-18 15:06:23 +00:00
k8s-merge-robot e4e6e46197 Merge pull request #24799 from thockin/validation_pt8-2
Automatic merge from submit-queue

Make IsValidLabelValue return error strings

Part of the larger validation PR, broken out for easier review and merge.  Builds on previous PRs in the series.
2016-05-18 04:08:15 -07:00
Tim Hockin 66d0d87829 Make IsValidLabelValue return error strings 2016-05-17 21:36:10 -07:00
root 74901ae150 No need to log empty string 2016-05-17 10:01:37 -04:00
Filip Grzadkowski 9cba3fc5ae Stop setting Message when updating PodScheduled condition 2016-05-17 15:27:43 +02:00
Clayton Coleman f2008152f4
Update limit ranging to handle init containers 2016-05-17 00:29:54 -04:00
Clayton Coleman 1b6591312d
Update the scheduler to handle init containers 2016-05-17 00:29:54 -04:00
k8s-merge-robot c20dcfc406 Merge pull request #25641 from ping035627/master
Automatic merge from submit-queue

Improve fatal error description in plugins.go of scheduler

The PR add more information for the fatal error in plugins.go of scheduler.
2016-05-16 01:45:58 -07:00
PingWang cefaa06a43 Improve fatal error description in plugins.go of scheduler
The PR add more information to fatal error in plugins.go of scheduler.
2016-05-16 10:58:07 +08:00
k8s-merge-robot 4ac32179bf Merge pull request #24798 from thockin/validation_pt8-1
Automatic merge from submit-queue

Make IsQualifiedName return error strings

Part of the larger validation PR, broken out for easier review and merge.

@lavalamp FYI, but I know you're swamped, too.
2016-05-14 22:14:17 -07:00
Jeff Lowdermilk 1661df4554 Merge pull request #25487 from derekwaynecarr/verify_resources
pod constraints func for quota validates resources
2016-05-13 15:07:23 -07:00
PingWang 82009eb5db A optimization for “RegisterCustomFitPredicate” function, avoiding redundancy
In RegisterCustomFitPredicate, when policy.Argument is nil and fitPredicateMap has the policy.Name, it can return the policy.Name directly. Subsequent operations are redundant.
2016-05-13 12:40:13 +08:00
k8s-merge-robot 08440b5dcc Merge pull request #24836 from Clarifai/gpu-impl
Automatic merge from submit-queue

WIP v0 NVIDIA GPU support

```release-note
* Alpha support for scheduling pods on machines with NVIDIA GPUs whose kubelets use the `--experimental-nvidia-gpus` flag, using the alpha.kubernetes.io/nvidia-gpu resource 
```

Implements part of #24071 for  #23587

I am not familiar with the scheduler enough to know what to do with the scores. Mostly punting for now.

Missing items from the implementation plan: limitranger, rkt support, kubectl
support and docs

cc @erictune @davidopp @dchen1107 @vishh @Hui-Zhi @gopinatht
2016-05-12 14:04:15 -07:00
k8s-merge-robot 667f586083 Merge pull request #25196 from luxas/auto_create_kube_system
Automatic merge from submit-queue

Automatically create the kube-system namespace

At the same time we ensure that the `default` namespace is present, it also creates `kube-system` if it doesn't exist.

`kube-system` will now exist from the beginning, and will be recreated every 10s if deleted, in the same manner as the `default` ns

This makes UX much better, no need for `kubectl`ing a `kube-system.yaml` file anymore for a function that is essential to Kubernetes (addons). For instance, this makes dashboard deployment much easier when there's no need to check for the `kube-system` ns first.

A follow up in the future may remove places where logic to manually create the kube-system namespace is present.

Also fixed a small bug where `CreateNamespaceIfNeeded` ignored the `ns` parameter and was hardcoded to `api.NamespaceDefault`.

@davidopp @lavalamp @thockin @mikedanese @bryk @cheld @fgrzadkowski @smarterclayton @wojtek-t @dlorenc @vishh @dchen1107 @bgrant0607 @roberthbailey

<!-- Reviewable:start -->
---
This change is [<img src="http://reviewable.k8s.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](http://reviewable.k8s.io/reviews/kubernetes/kubernetes/25196)
<!-- Reviewable:end -->
2016-05-12 11:17:09 -07:00
k8s-merge-robot 132ebb091a Merge pull request #24459 from fgrzadkowski/unschedulable_pod
Automatic merge from submit-queue

Add pod condition PodScheduled to detect situation when scheduler tried to schedule a Pod, but failed

Set `PodSchedule` condition to `ConditionFalse` in `scheduleOne()` if scheduling failed and to `ConditionTrue` in `/bind` subresource.

Ref #24404

@mml (as it seems to be related to "why pending" effort)

<!-- Reviewable:start -->
---
This change is [<img src="http://reviewable.k8s.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](http://reviewable.k8s.io/reviews/kubernetes/kubernetes/24459)
<!-- Reviewable:end -->
2016-05-12 05:54:06 -07:00
Filip Grzadkowski a80b1798c4 Add pod condition PodScheduled to detect situation
when scheduler tried to schedule a Pod, but failed.

Ref #24404
2016-05-12 10:21:21 +02:00
k8s-merge-robot 0ef4c6407b Merge pull request #24902 from cjcullen/webhookAuthn
Automatic merge from submit-queue

Webhook Token Authenticator

Add a webhook token authenticator plugin to allow a remote service to make authentication decisions.
2016-05-11 22:08:58 -07:00
Paul Weil 4970f0c02d PSP admission 2016-05-11 18:07:36 -04:00
Paul Weil 56193b7140 PSP types 2016-05-11 18:07:35 -04:00
derekwaynecarr 8b8a22b143 pod constraints func for quota validates resources 2016-05-11 14:30:46 -04:00
derekwaynecarr fc3e71894d Improve quota integration test to not use events, reduce number of pods provisioned 2016-05-10 19:50:36 -04:00
CJ Cullen eb3b0e78b4 Add a webhook token authenticator plugin. 2016-05-10 14:54:35 -07:00
CJ Cullen 1d096d29cb Pull common webhook code into generic webhook plugin. 2016-05-10 14:41:14 -07:00
Tim Hockin 72955770f3 Make IsQualifiedName return error strings 2016-05-10 11:23:23 -07:00
k8s-merge-robot dee24333ff Merge pull request #25161 from derekwaynecarr/format_quota_error
Automatic merge from submit-queue

Sort resources in quota errors to avoid duplicate events

Bugzilla:
https://bugzilla.redhat.com/show_bug.cgi?id=1333122

Errors describing why a request was rejected to quota would get variable responses (cpu=x,memory=y or memory=x,cpu=y) which caused duplicate events for the same root cause.

/cc @ncdc @jwforres
2016-05-10 04:39:11 -07:00
Rudi Chiarito 362c763fca WIP v0 NVIDIA GPU support
Implements part of #24071

I am not familiar with the scheduler enough to know what to do with the scores. Punting for now.

Missing items from the implementation plan: limitranger, rkt support, kubectl
support and user docs
2016-05-09 19:20:05 -04:00
Kevin b7014561c1 Add admission controller to limit pod anti affinity topologykey to node level 2016-05-09 12:23:41 +00:00
k8s-merge-robot f40fe7173b Merge pull request #24304 from cjcullen/cacheauth
Automatic merge from submit-queue

Support persisting config from kubecfg AuthProvider plugins

Plumbs through an interface to the plugin that can persist a `map[string]string` config for just that plugin. Also adds `config` to the AuthProvider serialization type, and `Login()` to the AuthProvider plugin interface.
Modified the gcp AuthProvider to cache short-term access tokens in the kubecfg file.

Builds on #23066 
@bobbyrullo @deads2k @jlowdermilk @erictune
2016-05-08 13:27:57 -07:00
k8s-merge-robot 5988080396 Merge pull request #23795 from mqliang/rc-ns-index
Automatic merge from submit-queue

add namespace index for cache

@wojtek-t 

Implement in this approach make the change of lister.go small, but we should replace all `NewInformer()` to `NewIndexInformer()`, even when someone not want to filter by namespace(eg. gc_controller and scheduler). Any suggestion?
2016-05-08 12:09:01 -07:00
CJ Cullen 13a7d92d0f Add a ConfigPersister for AuthProvider plugins in kubectl/clients. 2016-05-07 18:15:18 -07:00
David Oppenheimer b0bd3ff167 Move inter-pod affinity predicate and priority functions from default to
non-default due to negative performance effects even when not using
the feature.
2016-05-07 16:57:07 -07:00
derekwaynecarr ca7a8b50e6 Sort resources in quota errors to avoid duplicate events 2016-05-06 17:44:28 -04:00
Wojciech Tyczynski a51f266ebf Remove nodeName from predicate signature. 2016-05-06 11:23:37 +02:00
mqliang 9011207f18 add namespace index to rc and pod 2016-05-06 17:12:36 +08:00
Kevin 82ba4f077e implement inter pod topological affinity and anti-affinity 2016-05-06 06:46:23 +00:00
Lucas Käldström 8ea3a9319c Automatically create the kube-system namespace 2016-05-05 22:27:49 +03:00
Clayton Coleman e0ebcf4216
Split the storage and negotiation parts of Codecs
The codec factory should support two distinct interfaces - negotiating
for a serializer with a client, vs reading or writing data to a storage
form (etcd, disk, etc). Make the EncodeForVersion and DecodeToVersion
methods only take Encoder and Decoder, and slight refactoring elsewhere.

In the storage factory, use a content type to control what serializer to
pick, and use the universal deserializer. This ensures that storage can
read JSON (which might be from older objects) while only writing
protobuf. Add exceptions for those resources that may not be able to
write to protobuf (specifically third party resources, but potentially
others in the future).
2016-05-05 12:08:23 -04:00
Wojciech Tyczynski 3aadafd411 Use NegotiatedSerializer in client 2016-05-04 10:57:36 +02:00
Clayton Coleman fdb110c859
Fix the rest of the code 2016-04-29 17:12:10 -04:00
k8s-merge-robot 2347d0f047 Merge pull request #24601 from deads2k/qualify-admission-attributes
Automatic merge from submit-queue

fully qualify admission resources and kinds

Fully qualifies the `Kind` and `Resource` fields for admission attributes.  The information was getting filtered at the `RESTHandler` before.

@derekwaynecarr
2016-04-28 05:12:28 -07:00
k8s-merge-robot 00308f7a9f Merge pull request #24598 from wojtek-t/improve_scheduler_predicates
Automatic merge from submit-queue

Store node information in NodeInfo

This is significantly improving scheduler throughput.

On 1000-node cluster:
- empty cluster: ~70pods/s
- full cluster: ~45pods/s
Drop in throughput is mostly related to priority functions, which I will be looking into next (I already have some PR #24095, but we need for more things before).

This is roughly ~40% increase.
However, we still need better understanding of predicate function, because in my opinion it should be even faster as it is now. I'm going to look into it next week.

@gmarek @hongchaodeng @xiang90
2016-04-28 02:17:59 -07:00
k8s-merge-robot d0b887e4e0 Merge pull request #24595 from zhouhaibing089/httpserverclose
Automatic merge from submit-queue

Uncomment the code that caused by #19254

Fix https://github.com/kubernetes/kubernetes/issues/24546.

@lavalamp
2016-04-28 01:41:16 -07:00
k8s-merge-robot c7d1637a0b Merge pull request #24525 from wojtek-t/scheduler_traces
Automatic merge from submit-queue

Add traces to scheduler

This will simplify performance debugging of scheduler.

@davidopp @hongchaodeng @xiang90
2016-04-27 07:16:07 -07:00
deads2k 0061479890 fully qualify admission resources and kinds 2016-04-26 07:55:33 -04:00
zhouhaibing089 bf1a3f99c0 Uncomment the code that cause by #19254 2016-04-25 23:21:31 +08:00
deads2k d3c6363093 use single writer to improve quota performance 2016-04-25 10:42:26 -04:00
Wojciech Tyczynski 1835c8528d Store node information in NodeInfo 2016-04-25 10:08:05 +02:00
k8s-merge-robot c5df0bf23e Merge pull request #24502 from cjcullen/subresource
Automatic merge from submit-queue

Add Subresource & Name to webhook authorizer.

Pass through the Subresource and Name fields from the `authorization.Attributes` to the `SubjectAccessReviewSpec.ResourceAttributes`.
2016-04-24 01:14:43 -07:00
k8s-merge-robot 733832c15a Merge pull request #24377 from hongchaodeng/sched
Automatic merge from submit-queue

schedulercache: remove bind() from AssumePod

Due to #24197, we make bind() asynchronous and don't need it anymore.
Submit this PR to clean it up.
2016-04-23 02:19:48 -07:00
gmarek e0712f7e57 Fix MaxPods feature in scheduler 2016-04-22 22:49:50 +02:00
k8s-merge-robot f4beccf000 Merge pull request #23066 from cjcullen/clientplugin
Automatic merge from submit-queue

Client auth provider plugin framework

Allows client plugins to modify the underlying transport to, for example, add custom authorization headers.
2016-04-21 17:30:28 -07:00
k8s-merge-robot 34fc7f0401 Merge pull request #24461 from wojtek-t/enable_components_to_use_protobufs
Automatic merge from submit-queue

Allow components to use protobufs while talking to apiserver.
2016-04-21 12:46:17 -07:00
Wojciech Tyczynski d6896fa45a Allow setting content-type in binaries 2016-04-21 14:12:13 +02:00
Chao Xu 8537095415 use fully qualified resource in fake clients actions 2016-04-20 19:44:40 -07:00
Wojciech Tyczynski 80901a5542 Add traces to scheduler 2016-04-20 15:19:19 +02:00
Wojciech Tyczynski a4b3f47347 Add RC and container pors to scheduler benchmark 2016-04-20 15:10:57 +02:00
CJ Cullen e53aa93836 Add Subresource & Name to webhook authorizer. 2016-04-19 21:43:40 -07:00
HaiyangDING a5efb009c5 change predicate error format. 2016-04-17 08:48:03 +08:00
k8s-merge-robot 7664509c73 Merge pull request #24248 from wojtek-t/parallel_predicates
Automatic merge from submit-queue

Parallelize computing predicates in scheduler

@davidopp
2016-04-16 09:51:45 -07:00
Hongchao Deng 1eb331e009 schedulercache: remove bind() from AssumePod 2016-04-16 20:30:28 +08:00
CJ Cullen 03f9b5adc0 Add client auth plugin framework for kubectl with GCP auth plugin. 2016-04-14 17:49:16 -07:00
Wojciech Tyczynski 5a73a9d235 Parallelize computing predicates 2016-04-14 16:32:52 +02:00
Wojciech Tyczynski 545bf184ef Simplify FailedPredicateMap 2016-04-14 10:58:35 +02:00
Wojciech Tyczynski 254b05761f Asynchronous bindings 2016-04-14 09:52:25 +02:00
goltermann a3104ba96c Final vet fixes; enabling vet checks in verify scripts. 2016-04-13 13:51:51 -07:00
k8s-merge-robot 8eb19c7889 Merge pull request #22154 from sdminonne/service_nodeports_quotas
Automatic merge from submit-queue

Adding nodeports services to quota

To fix #21677
@derekwaynecarr
2016-04-13 05:50:27 -07:00
k8s-merge-robot e93c0d727f Merge pull request #20204 from HaiyangDING/predlib
Automatic merge from submit-queue

Move predicates into library

This PR tries to implement #12744 

Any suggestions/ideas are welcome. @davidopp 

current state: integration test fails if including podCount check in Kubelet.
    
DONE:
    1. refactor all predicates: predicates return fitOrNot(bool) and error(Error) in which the latter is of type PredicateFailureError or InsufficientResourceError
    2. GeneralPredicates() is a predicate function, which includes serveral other predicate functions (PodFitsResource, PodFitsHost, PodFitsHostPort). It is registered as one of the predicates in DefaultAlgorithmProvider, and is also called in canAdmitPod() in Kubelet and should be called by other components (like rescheduler, etc if necessary. See discussion in issue #12744
TODO:
    1. determine which predicates should be included in GeneralPredicates()
    2. separate GeneralPredicates() into: a.) GeneralPredicatesEvictPod() and b.) GeneralPredicatesNotEvictPod()
    3. DaemonSet should use GeneralPredicates()
2016-04-12 07:44:45 -07:00
Salvatore Dario Minonne 15b7577454 Adding nodeports services to quota 2016-04-12 11:09:16 +02:00
k8s-merge-robot bf0e6e0047 Merge pull request #23261 from hongchaodeng/sched
Automatic merge from submit-queue

kube-scheduler: cleanup duplicate GetAlgorithmProvider()

See [here](ae88f08af0/plugin/pkg/scheduler/factory/factory.go (L177-L180)).
The check is duplicate since CreateFromProvider will also do it.
2016-04-11 10:01:16 -07:00
HaiyangDING 41ed85479a move predicates into library (address #12744)
DONE:
1. refactor all predicates: predicates return fitOrNot(bool) and error(Error) in which the latter is of type
	PredicateFailureError or InsufficientResourceError. (For violation of either MaxEBSVolumeCount or
        MaxGCEPDVolumeCount, returns one same error type as ErrMaxVolumeCountExceeded)
2. GeneralPredicates() is a predicate function, which includes serveral other predicate functions (PodFitsResource,
        PodFitsHost, PodFitsHostPort). It is registered as one of the predicates in DefaultAlgorithmProvider, and
        is also called in canAdmitPod() in Kubelet and should be called by other components (like rescheduler, etc)
        if necessary. See discussion in issue #12744
3. remove podNumber check from GeneralPredicates
4. HostName is now verified in Kubelet's canAdminPod(). add TestHostNameConflicts in kubelet_test.go
5. add getNodeAnyWay() method in Kubelet to get node information in standaloneMode

TODO:
1. determine which predicates should be included in GeneralPredicates()
2. separate GeneralPredicates() into:
	a. GeneralPredicatesEvictPod() and
	b. GeneralPredicatesNotEvictPod()
3. DaemonSet should use GeneralPredicates()
2016-04-11 00:57:03 +08:00
Jeff Lowdermilk 524bfde377 Merge pull request #23883 from liggitt/attis
Externalize immortal namespaces
2016-04-08 20:56:04 -07:00
Jeff Lowdermilk 2fb745f01d Merge pull request #23661 from spxtr/oidc
Remove retries from most oidc tests.
2016-04-08 14:33:34 -07:00
Joe Finney ae79677fd0
Remove global var for OIDC retry/backoff, and remove retries from unit tests. 2016-04-07 14:18:29 -07:00
Jordan Liggitt bef1d6e82e Externalize immortal namespaces 2016-04-05 16:28:00 -04:00
Wojciech Tyczynski 2699be2e7e Switch api.ObjetaMetaFor to meta.Accessor 2016-03-31 17:52:31 +02:00
k8s-merge-robot 1ad3049ed6 Merge pull request #23288 from smarterclayton/refactor_codec
Auto commit by PR queue bot
2016-03-26 10:47:58 -07:00
goltermann 32d569d6c7 Fixing all the "composite literal uses unkeyed fields" Vet errors. 2016-03-25 15:25:09 -07:00
k8s-merge-robot 79d1e53b94 Merge pull request #23428 from wojtek-t/fix_scheduler_test
Auto commit by PR queue bot
2016-03-25 06:17:19 -07:00
k8s-merge-robot 4e4ad61260 Merge pull request #23366 from goltermann/vet
Auto commit by PR queue bot
2016-03-24 21:50:56 -07:00
Wojciech Tyczynski 1471a5b96b Fix scheduler_test race 2016-03-24 12:31:57 +01:00
k8s-merge-robot 4bfd42bbc2 Merge pull request #23240 from zhouhaibing089/keystone_fix
Auto commit by PR queue bot
2016-03-24 00:17:18 -07:00
Clayton Coleman 54eaa56b92 Add a streaming and "raw" abstraction to codec factory 2016-03-23 17:25:20 -04:00
k8s-merge-robot 76369c42be Merge pull request #22939 from resouer/util-sub-dir
Auto commit by PR queue bot
2016-03-23 03:34:33 -07:00
k8s-merge-robot 6441e1fc33 Merge pull request #23280 from pweil-/limitrange-supportsfunc
Auto commit by PR queue bot
2016-03-22 22:00:47 -07:00
goltermann 34d4eaea08 Fixing several (but not all) go vet errors. Most are around string formatting, or unreachable code. 2016-03-22 17:26:50 -07:00
zhouhaibing089 83248a9783 move keystone package to password since it is a password authenticator 2016-03-22 23:27:28 +08:00
Wojciech Tyczynski ebcc8f737c Parallelize computing selector spreading priority in scheduler. 2016-03-22 14:09:58 +01:00
Paul Weil 14620447c1 allow supported resource overrides in the limitranger plugin 2016-03-21 13:03:18 -04:00
harry b0900bf0d4 Refactor diff into sub pkg 2016-03-21 20:21:39 +08:00
Harry Zhang a4d04095d0 Refactor crlf & crypto 2016-03-21 20:20:05 +08:00
Hongchao Deng dc91b82a3f kube-scheduler: cleanup duplicate GetAlgorithmProvider() 2016-03-20 14:29:10 -07:00
k8s-merge-robot e4dd8c1e1f Merge pull request #22852 from miminar/no-admit-without-namespace
Auto commit by PR queue bot
2016-03-18 16:09:28 -07:00
deads2k ab03317d96 support CIDRs in NO_PROXY 2016-03-16 16:22:54 -04:00
Phillip Wittrock 8a952748a1 Merge pull request #22942 from jsafrane/devel/aws-more-devices
Allow up to 39 PVs attached to AWS node
2016-03-15 12:41:15 -07:00
Jan Safranek f270cb1b9b Allow 39 atached EBS devices.
AWS has soft support limit for 40 attached EBS devices. Assuming there is just
one root device, use the rest for persistent volumes.

The devices will have name /dev/xvdba - /dev/xvdcm, leaving /dev/sda - /dev/sdz
to the system.

Also, add better error handling and propagate error
"Too many EBS volumes attached to node XYZ" to a pod.
2016-03-15 17:28:59 +01:00
Michal Minar 2601ee56ab Set a missing namespace on object to admit
Custom quota evaluators may need to query a target namespace of an input
object during quota admission check. For this, namespace needs to be
known.

Signed-off-by: Michal Minar <miminar@redhat.com>
2016-03-15 17:03:55 +01:00
k8s-merge-robot 73017b6de9 Merge pull request #22381 from hongchaodeng/cache
Auto commit by PR queue bot
2016-03-15 06:33:31 -07:00
derekwaynecarr 775c5a2652 Reduce namespace deletion test flakes by forcing a cache refresh when a namespace is initially deleted 2016-03-14 16:08:01 -04:00
Hongchao Deng ae88f08af0 Scheduler: replace system modeler with scheduler cache 2016-03-14 09:03:41 -07:00
harry f19d59cf35 Move flag into sub pkg 2016-03-14 21:30:38 +08:00
Mike Metral 2da0dbd6fd fix typo 2016-03-12 14:06:41 +00:00
Brian Grant 58ba9ebf8c Merge pull request #22865 from deads2k/fix-downward-api-leak
prevent disallowed secret refs from leaking via the downward API
2016-03-11 12:23:02 -08:00
Brian Grant ac068cd178 Merge pull request #22727 from mml/racey
Guarantee we finish writing to the test log before the test exits.
2016-03-11 12:20:36 -08:00
deads2k 9d22f8b5a7 prevent disallowed secret refs from leaking via the downward API 2016-03-11 13:27:50 -05:00
k8s-merge-robot 5d58c74398 Merge pull request #22304 from ericchiang/bump_go_oidc
Auto commit by PR queue bot
2016-03-11 02:57:09 -08:00
Matt Liggett 547c3b449f Guarantee we finish writing to the test log before the test exits.
Should fix #22614
2016-03-09 13:27:27 -08:00
gmarek 2c52e62622 Change scheduler logic from random to round-robin 2016-03-07 13:47:56 +01:00
Piotr Szczesniak 33cc3c7653 Fixed logging in scheduler 2016-03-05 10:53:06 +01:00
Wojciech Tyczynski 2f6d034cea Workaround long latency of POST pods 2016-03-03 10:45:43 +01:00
k8s-merge-robot d81d823ca5 Merge pull request #22393 from eparis/blunderbuss
Auto commit by PR queue bot
2016-03-02 18:51:56 -08:00
Eric Paris 5e5a823294 Move blunderbuss assignees into tree 2016-03-02 20:46:32 -05:00
Marek Grabowski eb2f5153b3 Revert "Scheduler: replace system modeler with scheduler cache and do O(1) lookup for resource req" 2016-03-02 15:38:56 +01:00
Eric Chiang 8df55ddbe5 plugin/pkg/auth/authenticator/token/oidc: update test to new go-oidc types
The provider config has changed a little bit in go-oidc. It is more
complete and now throws errors when unmarshaling provider configs
that are missing required fields (as defined by the OpenID Connect
Discovery spec).

Update the oidc plugin to use the new type.
2016-03-01 11:39:18 -08:00
k8s-merge-robot e7d0f06c4a Merge pull request #21736 from resouer/check-register
Auto commit by PR queue bot
2016-03-01 02:21:56 -08:00
Kris e664ef922f Move restclient to its own package 2016-02-29 12:05:13 -08:00
k8s-merge-robot 6f8a951f87 Merge pull request #20446 from derekwaynecarr/quota_scopes
Auto commit by PR queue bot
2016-02-27 19:46:42 -08:00
k8s-merge-robot 03f356edb9 Merge pull request #20669 from hongchaodeng/sched
Auto commit by PR queue bot
2016-02-27 00:58:55 -08:00
k8s-merge-robot f0c0af2561 Merge pull request #20528 from mikedanese/varz
Auto commit by PR queue bot
2016-02-27 00:27:18 -08:00
k8s-merge-robot 00d99ac261 Merge pull request #20347 from ericchiang/authz_grpc
Auto commit by PR queue bot
2016-02-26 22:00:42 -08:00
derekwaynecarr 95df07aa9d Improve overlapping quota behavior when there is a resource conflict 2016-02-26 20:34:15 -05:00
derekwaynecarr af85fb57c3 Make ResourceQuota admission and controller work generically 2016-02-26 20:34:15 -05:00
Fabio Yeon 658f7ef397 Merge pull request #21738 from jsafrane/devel/fix-admission
Hot-fix admission of volumes that are being provisioned.
2016-02-26 16:05:04 -08:00
Hongchao Deng f29a1d6c5c scheduler: Scheduler: replace system modeler with scheduler cache
We're using the scheduler cache to do O(1) lookup for resource request
2016-02-26 09:22:29 -08:00
Harry Zhang 636e982ecd Implement checking in predicates 2016-02-25 21:25:36 +08:00
Mike Danese 5ec02bd021 add http handler to export configuration state 2016-02-24 14:12:28 -08:00
derekwaynecarr 4858b484da Fix flake in LimitRange e2e 2016-02-23 16:03:31 -05:00
k8s-merge-robot 7f1b699880 Merge pull request #21071 from soltysh/server_close
Auto commit by PR queue bot
2016-02-23 06:34:27 -08:00
Jan Safranek a304e3478d Hot-fix admission of volumes that are being provisioned.
This is a first-aid bandage to let admission controller ignore persistent
volumes that are being provisioned right now and thus may not exist in
external cloud infrastructure yet.
2016-02-23 09:46:40 +01:00
harry b90550de25 Implement check for priority 2016-02-23 11:59:32 +08:00
Eric Chiang 3116346161 *: add webhook implementation of authorizer.Authorizer plugin 2016-02-22 11:39:07 -08:00
k8s-merge-robot 9b395b558e Merge pull request #15476 from burmanm/hawkular_save
Auto commit by PR queue bot
2016-02-20 19:09:18 -08:00
k8s-merge-robot 807344da0b Merge pull request #21235 from davidopp/affinity-docs
Auto commit by PR queue bot
2016-02-20 11:15:02 -08:00
k8s-merge-robot 3639e43df2 Merge pull request #21016 from hongchaodeng/cache
Auto commit by PR queue bot
2016-02-20 02:47:53 -08:00
k8s-merge-robot 94ad715f90 Merge pull request #21470 from deads2k/fix-limit-ranger
Auto commit by PR queue bot
2016-02-19 12:08:06 -08:00
deads2k 24d5329130 fix limitranger to handle latent caches without live lookups every time 2016-02-19 13:47:43 -05:00
k8s-merge-robot 057b8352ec Merge pull request #21182 from vishh/repoTagsRename
Auto commit by PR queue bot
2016-02-19 08:56:09 -08:00
k8s-merge-robot eb45154996 Merge pull request #21348 from caesarxuchao/generate-fake-for-1-2
Auto commit by PR queue bot
2016-02-18 23:02:05 -08:00
David Oppenheimer 053f1c6008 Update user guide and scheduler documentation to describe node affinity.
Register image priority locality function, which the original PR that introduced
it forgot to do. Change zone and region labels to beta.
2016-02-18 17:09:41 -08:00
Chao Xu ad46715f51 generate fake client for release_1_2 2016-02-17 16:10:02 -08:00
laushinka 7ef585be22 Spelling fixes inspired by github.com/client9/misspell 2016-02-18 06:58:05 +07:00
Vishnu kannan 2623fdde17 Improve the naming of fields in ContainerImage struct used in NodeStatus.
Signed-off-by: Vishnu kannan <vishnuk@google.com>
2016-02-16 15:45:22 -08:00
Hongchao Deng 5c3d303ba9 scheduler cache: API and implementation 2016-02-16 08:10:20 -08:00
k8s-merge-robot 8a815b919d Merge pull request #21074 from mqliang/scheduler-ReplicaSet
Auto commit by PR queue bot
2016-02-16 01:48:33 -08:00
mqliang 0aab44a00d add ReplicaSet support in scheduler 2016-02-16 14:34:46 +08:00
k8s-merge-robot f366baeaeb Merge pull request #21128 from yifan-gu/fix_oidc_tailing_slash_issuer
Auto commit by PR queue bot
2016-02-15 17:46:49 -08:00
derekwaynecarr a03361bd84 Make default format right for nil values 2016-02-15 13:55:33 -05:00
k8s-merge-robot 4ff418ca50 Merge pull request #21057 from davidopp/work1
Auto commit by PR queue bot
2016-02-14 20:48:17 -08:00
David Oppenheimer 66368efad5 Comment out NodeAffinity.RequiredDuringSchedulingRequiredDuringExecution
because it is not yet implemented.
2016-02-14 17:46:13 -08:00
k8s-merge-robot 43fb544a4a Merge pull request #21001 from ericchiang/oidc_groups
Auto commit by PR queue bot
2016-02-14 05:24:43 -08:00
k8s-merge-robot a2ce07e554 Merge pull request #20752 from dcbw/oidc-test-flake
Auto commit by PR queue bot
2016-02-13 13:51:51 -08:00
Eric Chiang 92d37d5cc5 plugin/pkg/auth/authenticator/token/oidc: get groups from custom claim 2016-02-12 09:58:18 -08:00
Dan Williams 905dfd9b77 Fix another instance of golang #12262
Reliably reproducible on two up-to-date Fedora 23 machines using
go 1.5.3, both one Core i7-4770R and a Core i7-4790.

https://github.com/golang/go/issues/12262
2016-02-12 10:04:48 -06:00
Michael Burman 528be97b41 Hawkular support for the Initial Resources 2016-02-12 17:36:11 +02:00
Yifan Gu 36bd693d3a oidc: Remove tailing slash before fetching the provider config. 2016-02-12 16:40:45 +08:00
Maciej Szulik 72654d347c Comment out calls to httptest.Server.Close() to work around
https://github.com/golang/go/issues/12262 . See #19254 for
more details. This change should be reverted when we upgrade
to Go 1.6.
2016-02-11 16:16:11 +01:00
Hongchao Deng 1cf4540b5d priorities: move getNonzeroRequests() into util/ package 2016-02-10 08:35:00 -08:00
Hongchao Deng 9236e4a0b4 scheduler: change fit predicates and priority func as needed for optimization 2016-02-09 09:38:28 -08:00
k8s-merge-robot fec0d127b3 Merge pull request #15938 from justinsb/aws_ebs_cleanup
Auto commit by PR queue bot
2016-02-08 21:42:52 -08:00
Oleg Shaldybin 3a36dfb306 Minor selectHost optimization in scheduler
Instead of sorting hosts by score, find max score and choose one of
the hosts with max score directly. Saves a little time on sorting and
avoids extra copying of HostPriorityList entries.

Test had to be updated as one of the test cases relied on having a
stable order from pre-sorting.
2016-02-08 12:37:37 -05:00
Jan Chaloupka 4389b3f0d6 Rewritte util.* -> wait.* wherever reasonable 2016-02-07 12:02:20 +01:00
k8s-merge-robot d001f4afea Merge pull request #20254 from hongchaodeng/plugin
Auto commit by PR queue bot
2016-02-06 13:23:43 -08:00
k8s-merge-robot 8e56494ec5 Merge pull request #20140 from resouer/scheduler
Auto commit by PR queue bot
2016-02-05 20:08:31 -08:00
Mike Danese b1743a6887 this is a manual reversion of #20702
I can't revert with github which says "Sorry, this pull request couldn’t be
reverted automatically. It may have already been reverted, or the content may
have changed since it was merged."

Reverts commit: 0c191e787b
2016-02-05 16:34:02 -08:00
Chao Xu 184440f8ef rename release_1_2 to internalclientset 2016-02-05 14:02:28 -08:00
k8s-merge-robot 175d0c57f2 Merge pull request #19880 from DirectXMan12/feature/limit-ebs-scheduler-predicate
Auto commit by PR queue bot
2016-02-05 09:26:42 -08:00
gmarek 0c191e787b Split controller flags between controllers 2016-02-05 12:17:51 +01:00
k8s-merge-robot ce6fd46637 Merge pull request #20539 from mikedanese/kube-scheduler-external
Auto commit by PR queue bot
2016-02-05 01:56:43 -08:00
Chao Xu 1b047f8e67 rename legacy to core 2016-02-04 14:26:56 -08:00
k8s-merge-robot 65ebe19164 Merge pull request #20584 from caesarxuchao/release_1_2
Auto commit by PR queue bot
2016-02-03 19:46:27 -08:00
Kevin c8c82c1d8f implement Node affinity and NodeSelector 2016-02-04 01:53:14 +00:00
Chao Xu f9f5736b01 grep sed 2016-02-03 13:06:07 -08:00
Justin Santa Barbara f61a5d0400 AWS: Switch arguments to AttachDisk/DetachDisk to match GCE 2016-02-03 20:43:23 +00:00
Justin Santa Barbara 6c87a4be7c AWS: Handle deleting volume that no longer exists
The tests in particular double-delete volumes, so we need to handle this
graciously.
2016-02-03 20:43:14 +00:00
Justin Santa Barbara 1ae1db6027 AWS: Update copy-paste of GCE PD code to latest version
We are (sadly) using a copy-and-paste of the GCE PD code for AWS EBS.
This code hasn't been updated in a while, and it seems that the GCE code
has some code to make volume mounting more robust that we should copy.
2016-02-03 20:43:14 +00:00
harry 233a601130 Caculate priorities based on image locality
Add test for image score

Update generated docs
2016-02-03 21:01:26 +08:00
k8s-merge-robot 843c11e06a Merge pull request #20452 from caesarxuchao/replace-client-kubelet
Auto commit by PR queue bot
2016-02-02 23:46:58 -08:00
Mike Danese 7df86e1ecf create external api for scheduler config
move defaulting into external pacakge
2016-02-02 23:17:18 -08:00
Chao Xu cddd7b56a4 replace client with clientset in kubelet and other places 2016-02-02 20:28:45 -08:00
Jeff Lowdermilk caa9433234 Merge pull request #20433 from lavalamp/fix-bad-rv
Add timeout, fix potential startup hang
2016-02-02 17:27:23 -08:00
Solly Ross 2d436ff080 Scheduler predicate for capping node volume count
For certain volume types (e.g. AWS EBS or GCE PD), a limitted
number of such volumes can be attached to a given node.  This commit
introduces a predicate with allows cluster admins to cap
the maximum number of volumes matching a particular type attached to a
given node.

The volume type is configurable by passing a pair of filter functions,
and the maximum number of such volumes is configurable to allow node
admins to reserve a certain number of volumes for system use.

By default, the predicate is exposed as MaxEBSVolumeCount and
MaxGCEPDVolumeCount (for AWS ElasticBlocKStore and GCE PersistentDisk
volumes, respectively), each of which can be configured using the
`KUBE_MAX_PD_VOLS` environment variable.

Fixes #7835
2016-02-02 16:21:42 -05:00
k8s-merge-robot 32ab64ce5b Merge pull request #19778 from resouer/runtime
Auto commit by PR queue bot
2016-02-01 21:05:05 -08:00
Daniel Smith 4a7d70aef1 extend fake clock 2016-02-01 15:36:15 -08:00
k8s-merge-robot feb4b4857c Merge pull request #19890 from vishh/0-nodes
Auto commit by PR queue bot
2016-02-01 14:09:06 -08:00
harry 1032067ff9 Replace runtime reference by pkg 2016-02-01 21:06:44 +08:00
Marcin Wielgus a14f791d8c Revert "Merge pull request #20329 from kubernetes/revert-20323-bump-influxdb"
This reverts commit b4188ec459, reversing
changes made to 28951bd66a.
2016-02-01 12:12:37 +01:00
k8s-merge-robot 3e04a45a95 Merge pull request #19910 from hongchaodeng/res
Auto commit by PR queue bot
2016-02-01 00:08:28 -08:00
Mike Danese 126b1df879 Create componentconfig object for scheduler configuration.
Signed-off-by: Mike Danese <mikedanese@google.com>
2016-01-28 23:17:00 -08:00
Hongchao Deng 70408d2cbd PluginFactoryArgs: Expose explicit fields
None of the embedded fields are used for inheritance methods. Expose
them for better code analysis.
2016-01-27 18:59:12 -08:00
Clayton Coleman 38c7eded99 Prepare for content-type negotiation
Combine the fields that will be used for content transformation
(content-type, codec, and group version) into a single struct in client,
and then pass that struct into the rest client and request. Set the
content-type when sending requests to the server, and accept the content
type as primary.

Will form the foundation for content-negotiation via the client.
2016-01-26 17:44:30 -05:00
k8s-merge-robot 2a83f5d5c7 Merge pull request #19906 from hongchaodeng/fiterror
Auto commit by PR queue bot
2016-01-26 13:36:37 -08:00
k8s-merge-robot 2286bd3a38 Merge pull request #19961 from mamikonyana/newrepo
Auto commit by PR queue bot
2016-01-25 19:51:23 -08:00
Quinton Hoole 10f7985dfb Merge pull request #19995 from justinsb/gce_label_pd
Ubernetes-Lite GCE: Label volumes with zone information
2016-01-25 10:34:10 -08:00
Justin Santa Barbara 900567288b Ubernetes Lite: Label volumes with zone information
When volumes are labeled, they will only be scheduled onto nodes in the
same zone.
2016-01-22 17:16:31 -05:00
Clayton Coleman 4a6935b31f Remaining codec change refactors 2016-01-22 13:27:27 -05:00
Clayton Coleman 33085c0cf2 Update tests to handle codec changes 2016-01-22 13:27:26 -05:00
Arsen Mamikonyan 8b5e9e2885 Change repository references to https://github.com/kubernetes/kubernetes 2016-01-22 10:23:14 -05:00
Clayton Coleman c1d932e44a Switch API objects to not register per version codecs
Remove Codec from versionInterfaces in meta (RESTMapper is now agnostic
to codec and serialization). Register api/latest.Codecs as the codec
factory and use latest.Codecs.LegacyCodec(version) as an equvialent to
the previous codec.
2016-01-22 01:10:21 -05:00
Hongchao Deng 8e1bfad490 insufficient resource error: details of failure in failedPredicateMap 2016-01-21 21:49:00 -08:00
Alex Mohr 76f02d562a Merge pull request #19083 from resouer/allocatable
Use Allocatable to replace Capacity
2016-01-21 16:05:05 -08:00
Alex Mohr fd9310fa6e Merge pull request #18452 from xiang90/refactor_nodiskconflicts
scheduler: clean up NoDiskConflict code in predicates.go
2016-01-21 10:58:41 -08:00
Alex Mohr d2d349bc84 Merge pull request #19334 from resouer/network
Networking should be used to hold network related pkgs
2016-01-21 10:26:13 -08:00
Hongchao Deng 5331ffc82f FitError: return details of failure on each node 2016-01-20 22:38:41 -08:00
Vishnu kannan 21748701f1 Avoid nodes that have `0` cpu and memory capacity.
Signed-off-by: Vishnu kannan <vishnuk@google.com>
2016-01-20 15:34:58 -08:00
Harry Zhang 0202a206b8 Integration test to verify alloc works
Add integration test to verify allocatable can works
2016-01-20 15:36:19 +08:00
gmarek 106e66be3b Readd scheduler flags and mark them as deprecated 2016-01-19 14:20:00 +01:00
harry e64fe82245 Use Allocatable to replace Capacity
Use allocate instead in priorities
2016-01-18 15:26:40 +08:00
k8s-merge-robot 98b190acf4 Merge pull request #19527 from hongchaodeng/pred
Auto commit by PR queue bot
2016-01-17 03:52:16 -08:00
k8s-merge-robot 4969f11089 Merge pull request #19439 from bprashanth/compute_dep
Auto commit by PR queue bot
2016-01-16 10:38:11 -08:00
k8s-merge-robot f2d273d481 Merge pull request #19128 from resouer/qps-limit
Auto commit by PR queue bot
2016-01-16 10:03:00 -08:00
Mike Danese 936c8cd597 Merge pull request #19685 from resouer/testing
Replace fake handler using testing pkg
2016-01-15 17:47:53 -08:00
harry 98222b4d8b Replace to tag
Use a testing pkg to replace testing util codes
2016-01-15 15:07:21 +08:00
k8s-merge-robot ec002e52ab Merge pull request #19661 from mikedanese/le-config
Auto commit by PR queue bot
2016-01-14 22:27:14 -08:00
Harry Zhang 936a11e775 Use networking to hold network related pkgs
Change names of unclear methods

Use net as pkg name for short
2016-01-15 13:46:16 +08:00
Mike Danese f9f4b74a29 Merge pull request #19449 from hongchaodeng/fitport
PodFitsHostPorts: small refactor and speedup
2016-01-14 11:56:14 -08:00
Mike Danese daa7040195 move leader election configuration into component configuration
Signed-off-by: Mike Danese <mikedanese@google.com>
2016-01-14 11:20:09 -08:00
harry 080cb60dab Fix duplicated rate limit in scheduler
Remove BindingRateLimiterSaturation metrics

Update generated doc
2016-01-13 20:51:55 +08:00
Mike Danese f71657d9a6 retrofit the scheduler with the leader election client.
Signed-off-by: Mike Danese <mikedanese@google.com>
2016-01-12 21:37:03 -08:00
Hongchao Deng 252a956150 return error if got InsufficientResourceError and fit=true 2016-01-12 08:46:35 -08:00
Hongchao Deng 111b603c95 Remove FailedResourceType and return custom error 2016-01-12 08:41:30 -08:00
David Oppenheimer 8ac484793d Comment out calls to httptest.Server.Close() to work around
https://github.com/golang/go/issues/12262 . See #19254 for
more details. This change should be reverted when we upgrade
to Go 1.6.
2016-01-11 23:02:11 -08:00
Prashanth Balasubramanian cc09a603dd Code changes 2016-01-11 16:27:12 -08:00
Saad Ali 9b415f0300 Revert "Remove FailedResourceType and return custom error" 2016-01-11 11:27:50 -08:00
Hongchao Deng 91fa5f8c88 PodFitsHostPorts: small refactor and speedup 2016-01-09 20:03:52 -08:00
Hongchao Deng 40e5e688cc Remove FailedResourceType and return custom error 2016-01-07 13:47:23 -08:00