Commit Graph

128 Commits (750881c0ab62a9f59d53582bc33826caa167aa83)

Author SHA1 Message Date
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
Clayton Coleman 469df12038
refactor: move ListOptions references to metav1 2017-01-23 17:52:46 -05:00
deads2k 01b3b2b461 move admission to genericapiserver 2017-01-18 08:15:19 -05:00
Clayton Coleman 9a2a50cda7
refactor: use metav1.ObjectMeta in other types 2017-01-17 16:17:19 -05:00
Kubernetes Submit Queue 037711d629 Merge pull request #36517 from apelisse/owners-pkg-quota
Automatic merge from submit-queue

Curating Owners: pkg/quota

cc @vishh @derekwaynecarr

In an effort to expand the existing pool of reviewers and establish a
two-tiered review process (first someone lgtms and then someone
experienced in the project approves), we are adding new reviewers to
existing owners files.


If You Care About the Process:
------------------------------

We did this by algorithmically figuring out who’s contributed code to
the project and in what directories.  Unfortunately, that doesn’t work
well: people that have made mechanical code changes (e.g change the
copyright header across all directories) end up as reviewers in lots of
places.

Instead of using pure commit data, we generated an excessively large
list of reviewers and pruned based on all time commit data, recent
commit data and review data (number of PRs commented on).

At this point we have a decent list of reviewers, but it needs one last
pass for fine tuning.

Also, see https://github.com/kubernetes/contrib/issues/1389.

TLDR:
-----

As an owner of a sig/directory and a leader of the project, here’s what
we need from you:

1. Use PR https://github.com/kubernetes/kubernetes/pull/35715 as an example.

2. The pull-request is made editable, please edit the `OWNERS` file to
remove the names of people that shouldn't be reviewing code in the
future in the **reviewers** section. You probably do NOT need to modify
the **approvers** section. Names asre sorted by relevance, using some
secret statistics.

3. Notify me if you want some OWNERS file to be removed.  Being an
approver or reviewer of a parent directory makes you a reviewer/approver
of the subdirectories too, so not all OWNERS files may be necessary.

4. Please use ALIAS if you want to use the same list of people over and
over again (don't hesitate to ask me for help, or use the pull-request
above as an example)
2017-01-13 12:37:15 -08: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
Seth Jennings 4c30459e49 switch from local qos types to api types 2017-01-10 10:54:30 -06:00
Jeff Grafton 20d221f75c Enable auto-generating sources rules 2017-01-05 14:14:13 -08:00
zhouhaibing089 381aaab1ee nodeports usage should be part of LoadBalancer service type 2017-01-03 17:08:11 +08:00
Mike Danese 161c391f44 autogenerated 2016-12-29 13:04:10 -08:00
Chao Xu 03d8820edc rename /release_1_5 to /clientset 2016-12-14 12:39:48 -08:00
Vish Kannan 49c21c9c33 Update OWNERS 2016-12-12 16:31:54 -08:00
Antoine Pelisse 67c45a0769 Update OWNERS approvers and reviewers: pkg/quota 2016-12-12 16:30:54 -08:00
Mike Danese c87de85347 autoupdate BUILD files 2016-12-12 13:30:07 -08:00
Derek Carr 459a7a05f1 Ability to quota storage by storage class 2016-12-09 13:26:59 -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
Clayton Coleman 5df8cc39c9
refactor: generated 2016-12-03 19:10:46 -05: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 f8b36bdd40 TRICKY: dependencies: pkg/quota 2016-11-23 15:53:09 -08:00
Derek Carr e88a1d0641 Improve quota performance for pvc by using shared informer 2016-11-06 12:41:36 -05:00
derekwaynecarr 1bcb057636 quota controller uses informers if available for pod calculation 2016-10-31 11:38:22 -04:00
Mike Danese 3b6a067afc autogenerated 2016-10-21 17:32:32 -07:00
derekwaynecarr f40c1a7097 Fix quota constraints func for pvc 2016-08-22 14:18:15 -04:00
derekwaynecarr 04bf2acfc5 Fix quota constraints func for services 2016-08-22 14:17:56 -04:00
derekwaynecarr 5cca4b07c6 Quota admission errors if usage is negative 2016-08-11 11:26:59 -04:00
Kubernetes Submit Queue e84a8ec45a Merge pull request #28991 from ZTE-PaaS/zhangke-patch-008
Automatic merge from submit-queue

optimize conditions of ServiceReplenishmentUpdateFunc to replenish service

Originally, the  replenishQuota method didn't focus on the third parameter object even if others transfered to it, i think the function is not efficient and perfect. then i use the third param to get MatchResources, it will be more exact. for example, if the old pod was quota tracked and the new was not, the replenishQuota only focus on usage resource of the old pod, still if  the third parameter object is nil, the process will be same as before
2016-08-05 15:45:46 -07:00
Ke Zhang 3973856ac2 replenish quota for service optimize, add testcase 2016-08-04 16:55:05 +08:00
deads2k 89eaaa3d7d refactor quota calculation for re-use 2016-08-02 15:56:08 -04:00
k8s-merge-robot 06c9ad2c83 Merge pull request #28611 from deads2k/union-quota-regsitry
Automatic merge from submit-queue

add union registry for quota

Adds the ability to combine multiple quota registries together.  Kube needs this for other types.

@derekwaynecarr
2016-08-01 09:32:44 -07:00
k8s-merge-robot 6ae6450a39 Merge pull request #28636 from derekwaynecarr/quota_pvc_storage
Automatic merge from submit-queue

Add support to quota pvc storage requests

Adds support to quota cumulative `PersistentVolumeClaim` storage requests in a namespace.

Per our chat today @markturansky @abhgupta - this is not done (lacks unit testing), but is functional.

This lets quota enforcement for `PersistentVolumeClaim` to occur at creation time.  Supporting bind time enforcement would require substantial more work.  It's possible this is sufficient for many, so I am opening it up for feedback.

In the future, I suspect we may want to treat local disk in a special manner, but that would have to be a different resource altogether (i.e. `requests.disk`) or something.

Example quota:

```
apiVersion: v1
kind: ResourceQuota
metadata:
  name: quota
spec:
  hard:
    persistentvolumeclaims: "10"
    requests.storage: "40Gi"
```

/cc @kubernetes/rh-cluster-infra @deads2k
2016-07-31 09:26:20 -07:00
k8s-merge-robot 42000793a6 Merge pull request #29588 from smarterclayton/init_container_quota
Automatic merge from submit-queue

Init container quota is inaccurate

Usage charged should be max of greater of init container or all regular
containers. Also, need to validate init container inputs

@derekwaynecarr
2016-07-28 06:34:20 -07:00
Clayton Coleman 958d78cb10
Init container quota is inaccurate
Usage charged should be max of greater of init container or all regular
containers. Also, need to validate init container inputs
2016-07-27 15:44:18 -04:00
derekwaynecarr 305411b59b Fix bug in node port counting in quota not counting multi-node ports 2016-07-22 13:56:55 -04:00
derekwaynecarr 09bac89aff Add support to quota pvc storage requests 2016-07-19 16:08:49 -04:00
Davanum Srinivas 2b0ed014b7 Use Go canonical import paths
Add canonical imports only in existing doc.go files.
https://golang.org/doc/go1.4#canonicalimports

Fixes #29014
2016-07-16 13:48:21 -04:00
deads2k a094a33560 add union registry for quota 2016-07-07 15:04:41 -04:00
Clayton Coleman 871bee8991
Remove reflection path in meta.Accessor
Callers are required to implement their interfaces, removes the
potential for mistakes. We have a reflective test
pkg/api/meta_test.go#TestAccessorImplementations that verifies that all
objects registered to the scheme properly implement their interfaces.
2016-07-06 11:29:47 -04:00
David McMahon ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
Buddha Prakash 4acb64f8bd Make Qos naming consistent across the codebase 2016-06-26 16:19:47 -07:00
Buddha Prakash c3551ae6cd Refactor qos package
Signed-off-by: Buddha Prakash <buddhap@google.com>
2016-06-24 15:36:04 -07:00
k8s-merge-robot ca27025b11 Merge pull request #26988 from vishh/quota-owners
Automatic merge from submit-queue

add owners for quota package
2016-06-13 17:32:24 -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
k8s-merge-robot 49a0475fcb Merge pull request #26969 from derekwaynecarr/use_qos_utility
Automatic merge from submit-queue

ResourceQuota BestEffort scope aligned with Pod level QoS

This aligns quota with the changes in kubelet and CLI.

So if quota allows 10 `BestEffort` pods, it will now track properly with what the user sees with changes in 1.3.

```
apiVersion: v1
kind: ResourceQuota
metadata:
  name: best-effort
spec:
  hard:
    pods: "10"
  scopes:
  - BestEffort
```

/cc @vishh @kubernetes/rh-cluster-infra
2016-06-12 16:26:39 -07:00
Vishnu Kannan f4e4156089 add owners for quota package 2016-06-07 11:46:50 -07:00
derekwaynecarr 7a5412a259 Move quota usage testing for loadbalancers into unit tests 2016-06-07 12:54:11 -04:00
derekwaynecarr f796cc335d Align quota BestEffort scope with recent changes 2016-06-07 12:08:08 -04:00
Clayton Coleman 5e4308f91d
Update use of Quantity in other classes 2016-05-19 08:41:43 -04:00
derekwaynecarr 8b8a22b143 pod constraints func for quota validates resources 2016-05-11 14:30:46 -04:00
k8s-merge-robot 32121e344b Merge pull request #24514 from derekwaynecarr/pod_quota_fix
Automatic merge from submit-queue

Quota ignores pod compute resources on updates

Scenario:

1. define a quota Q that tracks memory and cpu
2. create pod P that uses memory=100Mi, cpu=100m
3. update pod P to use memory=50Mi,cpu=10m

Expected Results:
Step 3 should fail with validation error.
Quota Q should not have changed.

Actual Results:
Step 3 fails validation, but quota Q is decremented to have memory usage down 50Mi and cpu usage down 40m.  This is because the quota was getting updated even though the pod was going to fail validation.

Fix:
Quota should only support modifying pod compute resources when pods themselves support modifying their compute resources.

This also fixes https://github.com/kubernetes/kubernetes/issues/24352

/cc @smarterclayton - this is what we discussed.

fyi: @kubernetes/rh-cluster-infra
2016-04-27 06:27:51 -07:00
k8s-merge-robot de9c1a2a51 Merge pull request #24247 from sdminonne/service_loadbalancer_quotas
Automatic merge from submit-queue

Adding loadBalancer services to quota system

@derekwaynecarr follow up to #22154.
2016-04-23 10:22:45 -07:00
derekwaynecarr b92b7255f4 Quota ignores pod compute resources on updates 2016-04-19 23:05:59 -04:00
Hai Huang b6557babf2 minor comment and code fixes 2016-04-16 10:18:43 -04:00
Salvatore Dario Minonne f4ed4998ff Adding loadbalancer services to quota 2016-04-14 14:06:42 +02:00
Salvatore Dario Minonne 15b7577454 Adding nodeports services to quota 2016-04-12 11:09:16 +02: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
Paul Morie 834776aa1f Add resource quota for ConfigMap 2016-03-02 09:59:51 -05:00
derekwaynecarr 553c4701af Add quota evaluator framework 2016-02-26 20:34:14 -05:00