Commit Graph

967 Commits (3b1407af70ac54c925fe5abb060e83d625d77b88)

Author SHA1 Message Date
Kubernetes Submit Queue 2537f66f0e Merge pull request #29230 from luxas/goimport
Automatic merge from submit-queue

Run goimport for the whole repo

While removing GOMAXPROC and running goimports, I noticed quite a lot of other files also needed a goimport format. Didn't commit `*.generated.go`, `*.deepcopy.go` or files in `vendor`

This is more for testing if it builds.
The only strange thing here is the gopkg.in/gcfg.v1 => github.com/scalingdata/gcfg replace.
cc @jfrazelle @thockin
2016-08-05 16:22:01 -07:00
deads2k 32920b5617 add subjectaccessreviews resource 2016-08-05 11:20:56 -04:00
Kubernetes Submit Queue 353df20854 Merge pull request #29926 from derekwaynecarr/ns_lifecycle_informer
Automatic merge from submit-queue

Move NamespaceLifecycle to use shared informers

This was a follow-up to https://github.com/kubernetes/kubernetes/pull/29634

Moves the `NamespaceLifecycle` plug-in to a shared infomer cache.

/cc @kubernetes/rh-cluster-infra @deads2k @hodovska
2016-08-04 19:22:59 -07:00
Kubernetes Submit Queue 5230bb7a8e Merge pull request #29860 from ericchiang/fix-openid-connect-provider-with-trailing-slash
Automatic merge from submit-queue

oidc authentication plugin: don't trim issuer URLs with trailing slashes

The issuer URL passed to the plugin must identically match the issuer
URL returned by OpenID Connect discovery. However, the plugin currently
trims all trailing slashes from issuer URLs, causing a mismatch. Since
the go-oidc client already handles this case correctly, don't trim the
path.

Closes #29749

cc @hanikesn @kubernetes/sig-auth
2016-08-04 16:25:49 -07:00
derekwaynecarr 4c37a813df Move NamespaceLifecycle to use shared informers 2016-08-04 11:01:09 -04:00
Kubernetes Submit Queue 2ff8280123 Merge pull request #29915 from wojtek-t/prepare_for_controller_ref_in_scheduler
Automatic merge from submit-queue

Prepare for using "ControllerRef" in scheduler

This is part of a PR that I already have to avoid a bunch of rebases in the future (controller ref probably won't happen in 1.4 release).

@davidopp
2016-08-04 02:23:31 -07:00
Kubernetes Submit Queue 5273ac9b94 Merge pull request #29912 from wojtek-t/enable_pod_affinity
Automatic merge from submit-queue

Enable PodAffinity by default in scheduler

Ref #26144

@gmarek - FYI
2016-08-04 01:51:17 -07:00
Kubernetes Submit Queue 544851a19f Merge pull request #29796 from deads2k/token-review
Automatic merge from submit-queue

Token review endpoint

Unrevert of #28788, which was rolled back because of https://github.com/kubernetes/kubernetes/issues/29375


@cjcullen @wojtek-t I'd like to remerge if possible.  Have we gotten the field checking mentioned here relaxed? https://github.com/kubernetes/kubernetes/pull/28788#discussion_r71918442
2016-08-03 20:48:31 -07:00
deads2k 60dd4a5d26 interesting changes to add tokenreviews endpoint to implement webhook 2016-08-03 08:37:45 -04:00
deads2k 1e7adaa5c0 allow restricting subresource access 2016-08-03 08:19:57 -04:00
Wojciech Tyczynski c092e15edf SelectorSpreading using controllerRef. 2016-08-02 16:24:48 +02:00
k8s-merge-robot ac3e8303f5 Merge pull request #29634 from derekwaynecarr/fix-flake-in-admission
Automatic merge from submit-queue

Fix usage of namespace shared informers in existing admission controllers

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

/cc @liggitt @ncdc
2016-08-02 06:51:17 -07:00
Wojciech Tyczynski 022719b323 Enable PodAffinity by default in scheduler 2016-08-02 15:06:45 +02:00
Lucas Käldström c88a07ce1a Run goimports 2016-08-02 15:12:39 +03:00
Wojciech Tyczynski 4bc410e47a Speedup pod affintiy predicate function 2016-08-02 08:01:04 +02:00
Eric Chiang bc3dc12203 oidc authentication plugin: don't trim issuer URLs with trailing slashes
The issuer URL passed to the plugin must identically match the issuer
URL returned by OpenID Connect discovery. However, the plugin currently
trims all trailing slashes from issuer URLs, causing a mismatch. Since
the go-oidc client already handles this case correctly, don't trim the
path.
2016-08-01 11:23:05 -07:00
derekwaynecarr 0339ef7961 Fix usage of shared informer in namespace admission controllers 2016-08-01 13:40:34 -04:00
k8s-merge-robot 821ff657f9 Merge pull request #27199 from derekwaynecarr/disk_eviction
Automatic merge from submit-queue

Initial support for pod eviction based on disk

This PR adds the following:

1. node reports disk pressure condition based on configured thresholds
1. scheduler does not place pods on nodes reporting disk pressure
1. kubelet will not admit any pod when it reports disk pressure
1. kubelet ranks pods for eviction when low on disk
1. kubelet evicts greediest pod

Follow-on PRs will need to handle:

1. integrate with new image gc PR (https://github.com/kubernetes/kubernetes/pull/27199)
1. container gc policy should always run (will not be launched from eviction, tbd who does that)
  1. this means kill pod is fine for all eviction code paths since container gc will remove dead container
1. min reclaim support will just poll summary provider (derek will do follow-on)
1. need to know if imagefs is same device as rootfs from summary (derek follow-on)

/cc @vishh @kubernetes/sig-node
2016-07-28 20:18:54 -07:00
k8s-merge-robot 27af240d4f Merge pull request #29539 from wojtek-t/optimize_pod_affinity_3
Automatic merge from submit-queue

Optimize PodAffinity priority function
2016-07-28 16:59:30 -07:00
derekwaynecarr 0de1e62b30 modify fsStats to fsStatsType to avoid confusion with cadvisor types 2016-07-28 16:01:38 -04:00
derekwaynecarr 9604b47c13 Scheduler does not place pods on nodes that have disk pressure 2016-07-28 16:01:38 -04:00
Wojciech Tyczynski d3b9d583a2 Optimize PodAffinity priority function. 2016-07-28 16:57:28 +02:00
Wojciech Tyczynski 898a6444e3 Return pointer for Affinity in api helper 2016-07-28 16:57:28 +02:00
k8s-merge-robot e008087e0a Merge pull request #29457 from derekwaynecarr/service-node-port-quota-fix
Automatic merge from submit-queue

Quota was not counting services with multiple nodeports properly

```release-note
If a service of type node port declares multiple ports, quota on "services.nodeports" will charge for each port in the service.
```

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

/cc @kubernetes/rh-cluster-infra @sdminonne
2016-07-27 18:09:40 -07:00
k8s-merge-robot 3301f6d14f Merge pull request #29356 from smarterclayton/init_containers
Automatic merge from submit-queue

LimitRanger and PodSecurityPolicy need to check more on init containers

Container limits not applied to init containers. HostPorts not checked on podsecuritypolicy

@pweil- @derekwaynecarr
2016-07-27 16:09:34 -07:00
Wojciech Tyczynski a63cccfafc Cache pods with pod (anti)affinity constraints 2016-07-27 17:31:53 +02:00
derekwaynecarr 09c97a2acc Disable flaky unit test in admission plugin in NamespaceAutoProvision 2016-07-26 17:36:14 -04:00
k8s-merge-robot df2cf16ddb Merge pull request #26709 from hodovska/master
Automatic merge from submit-queue

Allow shareable resources for admission control plugins.

Changes allow admission control plugins to share resources. This is done via new PluginInitialization structure. The structure can be extended for other resources, for now it is an shared informer for namespace plugins (NamespiceLifecycle, NamespaceAutoProvisioning, NamespaceExists).

If a plugins needs some kind of shared resource e.g. client, the client shall be added to PluginInitializer and Wants methods implemented to every plugin which will use it.
2016-07-22 11:07:05 -07:00
derekwaynecarr 305411b59b Fix bug in node port counting in quota not counting multi-node ports 2016-07-22 13:56:55 -04:00
k8s-merge-robot 6fd685b54b Merge pull request #29207 from fgrzadkowski/ha_master_leader_elect
Automatic merge from submit-queue

Add default leader election for scheduler and controller manager.

#21124
2016-07-22 04:49:44 -07:00
Wojciech Tyczynski fad876b6f9 PodAffinity code refinements 2016-07-22 08:49:28 +02:00
Dominika Hodovska 037d116add Factory for SharedIndexInformers 2016-07-21 14:04:48 +02:00
k8s-merge-robot 9b1f3efab4 Merge pull request #29261 from wojtek-t/improve_scheduler_throughput
Automatic merge from submit-queue

Improve scheduler throughput

Ref #28590

This improves scheduler throughput by another 10-15%.

@davidopp @kubernetes/sig-scheduling
2016-07-21 03:16:15 -07:00
Wojciech Tyczynski 4d0d115690 Revert "add tokenreviews endpoint to implement webhook" 2016-07-21 09:40:35 +02:00
Wojciech Tyczynski fc6d38baa2 Avoid locking when computing predicates. 2016-07-21 08:21:07 +02:00
Wojciech Tyczynski cab7db3a64 Use []*api.Node instead of NodeLister in priority functions. 2016-07-21 08:21:07 +02:00
Clayton Coleman 522930b39d
Init containers are not respected in initial resources
Seeds init containers just like regular containers
2016-07-20 23:19:38 -04:00
Clayton Coleman 51f4d7c5fb
Container limits are not applied to InitContainers
InitContainers should be checked against limit rangers
2016-07-20 23:19:38 -04:00
Clayton Coleman affd79fdc0
InitContainers are not checked for hostPort ranges
PodSecurityPolicy must verify that host port ranges are guarded on init
containers.
2016-07-20 23:19:34 -04:00
deads2k 2c4a9f2e8d interesting changes to add tokenreviews endpoint to implement webhook 2016-07-20 15:11:56 -04:00
mksalawa fea8d0aebf Fix generic scheduler test 2016-07-20 14:47:44 +02:00
Dominika Hodovska fc0a3c6dcb Allow shareable resources for admission control plugins 2016-07-20 12:53:52 +02:00
Filip Grzadkowski 69e9786383 Change defaults for leader election for scheduler and controller manager 2016-07-20 11:36:15 +02:00
Davanum Srinivas ee8507a5ae Use Infof/Warningf when appropriate
When we use a format string, we should use Infof/Warningf instead
of Info/Warning
2016-07-19 12:10:53 -04:00
k8s-merge-robot 4466531382 Merge pull request #29094 from luxas/gomaxproc
Automatic merge from submit-queue

Remove GOMAXPROCS() calls because they are unnecessary


Now we're setting GOMAXPROCS when every binary starts up, but we don't have to do that anymore, since we've upgraded to Go 1.6

Documentation for it:

> func GOMAXPROCS(n int) int

> GOMAXPROCS sets the maximum number of CPUs that can be executing simultaneously and returns the previous setting. If n < 1, it does not change the current setting. The number of logical CPUs on the local machine can be queried with NumCPU. This call will go away when the scheduler improves. 

A simple program to prove it's unnecessary:

```go
package main
import (
    "fmt"
    "runtime"
)
func main(){
    numCPUBefore := runtime.GOMAXPROCS(runtime.NumCPU())
    numCPUAfter := runtime.GOMAXPROCS(runtime.NumCPU())
    fmt.Println(numCPUBefore, numCPUAfter)
}
```

Output with Go 1.4.2: `1 4`
Output with Go 1.6.2: `4 4`

So I think we should remove calls to GOMAXPROCS now, and it should be pretty straightforward

@thockin @wojtek-t @gmarek @lavalamp @vishh
2016-07-19 08:11:24 -07:00
k8s-merge-robot 9a7507c4db Merge pull request #29186 from wojtek-t/cleanup_resource_request
Automatic merge from submit-queue

Reuse existing Resource struct instead of new resourceRequest

@davidopp
2016-07-19 07:31:19 -07:00
k8s-merge-robot b0bcb8f7b2 Merge pull request #29100 from wojtek-t/pods_can_never_be_scheduled_again
Automatic merge from submit-queue

Fix disappearing pods in scheduler

Fix #29098
2016-07-19 03:26:16 -07:00
Wojciech Tyczynski dcb5a6d1a6 Reuse existing Resource struct instead of new resourceRequest 2016-07-19 12:21:09 +02:00
Lucas Käldström 88ea80b572 Remove GOMAXPROCS() calls because they are unnecessary 2016-07-19 11:08:21 +03:00
Wojciech Tyczynski 66009877bc Fix disappearing pods in scheduler 2016-07-19 08:18:04 +02:00