Commit Graph

109 Commits (284e8182a402cfd545fc000fedaea071fed873b0)

Author SHA1 Message Date
Rohit Agarwal e6db88b12d Resources prefixed with *kubernetes.io/ should remain unscheduled if they are not exposed on the node.
Currently, resources prefixed with *kubernetes.io/ get scheduled to any
node whether it's exposing that resource or not.

On the other hand, resources prefixed with someother.domain/ don't get
scheduled to a node until that node is exposing that resource (or if the
resource is ignored because of scheduler extender).

This commit brings the behavior of *kubernetes.io/ prefixed resources in
line with other extended resources and they will remain unscheduled
until some node exposes these resources.

This also includes renaming IsDefaultNamespaceResource() to
IsNativeResource().
2018-03-28 17:24:30 -07:00
jianglingxia 996cf36df7 Add UT test to TestMax if equal scenario 2018-03-01 10:30:06 +08:00
Kubernetes Submit Queue be041a54cc
Merge pull request #57375 from tianshapjq/cleanup-useless-func-core/services.go
Automatic merge from submit-queue (batch tested with PRs 60236, 60332, 57375, 60451, 57408). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

cleanup useless functions in pkg/quota/evaluator/core/services.go

**What this PR does / why we need it**:
cleanup useless functions in pkg/quota/evaluator/core/services.go

**Release note**:

```release-note
NONE
```
2018-02-28 01:12:29 -08:00
Kubernetes Submit Queue 228c9915ee
Merge pull request #57302 from lichuqiang/resourceQuota4extendedResource
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Support for resource quota on extended resources

**Which issue(s) this PR fixes** :
Fixes #46639 #57300 for  resource quota support

**Special notes for your reviewer**:
One thing to be determined is if it necessary to Explicitly prohibit defining limits for extended resources in quota, like we did for [hugepages](https://github.com/kubernetes/kubernetes/pull/54292#pullrequestreview-74982771), as the resource is not allowed to overcommit.

**Release note**:

```release-note
Support for resource quota on extended resources
```

/cc @jiayingz @vishh @derekwaynecarr
2018-02-20 14:10:46 -08:00
Jeff Grafton ef56a8d6bb Autogenerated: hack/update-bazel.sh 2018-02-16 13:43:01 -08:00
Di Xu 48388fec7e fix all the typos across the project 2018-02-11 11:04:14 +08:00
lichuqiang fde4f6f9b0 resourceQuota support for extended resources 2018-01-30 09:29:22 +08:00
Kubernetes Submit Queue 7e743a1fe1
Merge pull request #50286 from Pingan2017/modify0808
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

fix the typo of wtih

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

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-01-15 11:35:03 -08:00
Kubernetes Submit Queue 65acc6d6a7
Merge pull request #57027 from CaoShuFeng/resourcequota_validation_pod
Automatic merge from submit-queue (batch tested with PRs 49856, 56257, 57027, 57695, 57432). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

remove duplicated validation from pod's resourcequota admission

ResourceQuota is a validating admission plugin. Before it runs, pods
has already been validated. It's not necessary to validate it again.

**Release note**:
```release-note
NONE
```
2018-01-02 13:15:47 -08:00
Jeff Grafton efee0704c6 Autogenerate BUILD files 2017-12-23 13:12:11 -08:00
tianshapjq 08427e022a cleanup useless functions in pkg/quota/evaluator/core/services.go 2017-12-19 13:57:48 +08:00
David Eads 294a8e6040 add deads to quota owner 2017-12-18 09:39:25 -05:00
Cao Shufeng 208df08ea6 remove useless validation from pod's resourcequota admission
ResourceQuota is a validating admission plugin. Before it runs, pods
has already been validated. It's not necessary to validate it again.
2017-12-11 17:49:33 +08:00
lichuqiang 1029b54770 update unit test for hugepage resourceQuota support 2017-11-13 09:37:20 +08:00
lichuqiang e9ff036e8a ResourceQuota support for hugepages 2017-11-13 09:37:06 +08:00
Dr. Stefan Schimanski bec617f3cc Update generated files 2017-11-09 12:14:08 +01:00
Dr. Stefan Schimanski 012b085ac8 pkg/apis/core: mechanical import fixes in dependencies 2017-11-09 12:14:08 +01:00
Dr. Stefan Schimanski d13b936a2a pkg/apis/core: fixup conversion func names in dependencies 2017-11-09 12:14:07 +01:00
Derek Carr 13294a0abe Update core quota framework 2017-10-27 11:07:01 -04:00
Kevin 4c8539cece use core client with explicit version globally 2017-10-27 15:48:32 +08:00
Jeff Grafton aee5f457db update BUILD files 2017-10-15 18:18:13 -07:00
Kubernetes Submit Queue 935726f109 Merge pull request #52452 from gnufied/fix-quota-on-update
Automatic merge from submit-queue (batch tested with PRs 52452, 52115, 52260, 52290)

Fix support for updating quota on update

This PR implements support for properly handling quota when resources are updated. We never take negative values and add them up.

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

cc @derekwaynecarr 

/sig storage

```release-note
Make sure that resources being updated are handled correctly by Quota system
```
2017-09-15 01:59:56 -07:00
Hemant Kumar 066fcf785e Implement support for updating resources 2017-09-13 21:05:44 -04:00
Derek Carr da01c6d3a2 Ignore pods for quota that exceed deletion grace period 2017-09-11 13:31:52 -04:00
Chao Xu 4d1d33af46 bazel 2017-09-06 10:21:01 -07:00
Chao Xu b0c83c72c1 Charge quota for uninitialized objects at different time
Charge object count when object is created, no matter if the object is
initialized or not.
Charge the remaining quota when the object is initialized.

Also, checking initializer.Pending and initializer.Result when
determining if an object is initialized. We didn't need to check them
because before 51082, having 0 pending initializer and nil
initializers.Result is invalid.
2017-09-06 10:20:32 -07:00
Hemant Kumar e78d433150 Implement necessary API changes
Introduce feature gate for expanding PVs
Add a field to SC
Add new Conditions and feature tag pvc update
Add tests for size update via feature gate
register the resize admission plugin
Update golint failures
2017-09-04 09:02:34 +02:00
Kubernetes Submit Queue fe365b88e3 Merge pull request #49610 from NickrenREN/local-isolation
Automatic merge from submit-queue (batch tested with PRs 50932, 49610, 51312, 51415, 50705)

Add local storage support in Quota

Add local storage(scratch, overlay) support in quota

**Release note**:
```release-note
Add local ephemeral storage support to Quota
```

/cc @ddysher  @jingxu97
2017-08-29 01:17:34 -07:00
NickrenREN a3c180e549 Add local storage support in Quota 2017-08-26 14:13:43 +08:00
Chao Xu 4928c8d1bf let resourcequota evaluator handle uninitialid pod and pvc 2017-08-24 14:50:03 -07:00
Di Xu 75258b2763 update testcase err msg 2017-08-17 15:42:05 +08:00
Jeff Grafton a7f49c906d Use buildozer to delete licenses() rules except under third_party/ 2017-08-11 09:32:39 -07:00
Jeff Grafton 33276f06be Use buildozer to remove deprecated automanaged tags 2017-08-11 09:31:50 -07:00
Pingan2017 5834c9337a fix the typo of wtih 2017-08-08 20:20:37 +08:00
deads2k bbd291faa7 use informers for quota evaluation of core resources where possible 2017-07-19 15:52:39 -04:00
Jacob Simpson 29c1b81d4c Scripted migration from clientset_generated to client-go. 2017-07-17 15:05:37 -07:00
Chao Xu 60604f8818 run hack/update-all 2017-06-22 11:31:03 -07:00
Chao Xu f4989a45a5 run root-rewrite-v1-..., compile 2017-06-22 10:25:57 -07:00
Klaus Ma 83b7f77ee2 Moved qos to api.helpers. 2017-05-20 07:17:57 -04:00
Mike Danese a05c3c0efd autogenerated 2017-04-14 10:40:57 -07:00
Chao Xu 08aa712a6c move helpers.go to helper 2017-04-11 15:49:11 -07:00
Derek Carr 39b380c7bd Unit test quota for nodeport associated with loadbalancer 2017-03-13 11:21:56 -04:00
Jan Safranek 9487552e41 Regenerate everything 2017-03-02 10:23:58 +01:00
Jan Safranek 916a0a63dd quota: use attributes instead of beta annotations 2017-03-02 10:23:57 +01:00
Jan Safranek 7ae4152712 Move PV/PVC annotations to PV/PVC types.
They aren't part of storage.k8s.io/v1 or v1beta1 API.
Also move associated *GetClass functions.
2017-03-02 10:23:55 +01:00
timchenxiaoyu e3b25ed4af fix typo:evaluator 2017-02-27 09:28:40 +08:00
Kubernetes Submit Queue 4d11cbc577 Merge pull request #39364 from zhouhaibing089/nodeports
Automatic merge from submit-queue

nodeports usage should be part of LoadBalancer service type

Since a creation of Service of type LoadBalancer will allocate NodePorts as well, so it makes more sense to account for the NodePort usage in the LoadBalancer switch case.

check here: https://github.com/kubernetes/kubernetes/blob/master/pkg/registry/core/service/rest.go#L553 for the logic on whether it should assign a nodeport for the service.
2017-02-17 20:34:32 -08:00
Andy Goldstein d820e3928c Switch resourcequota controller to shared informers 2017-02-14 12:20:27 -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