Commit Graph

77 Commits

Author SHA1 Message Date
Jordan Liggitt
61774cd717 Plumb context to admission Admit/Validate 2019-08-20 11:11:00 -04:00
Joe Betz
900d652a9a Update tests for: Pass {Operation}Option to Webhooks 2019-05-14 10:49:43 -07:00
Andrew Kim
c919139245 update import of generic featuregate code from k8s.io/apiserver/pkg/util/feature -> k8s.io/component-base/featuregate 2019-05-08 10:01:50 -04:00
Jordan Liggitt
58f2cdccf7 Add quota admission test for decreasing usage without covering quota 2019-05-02 10:29:08 -04:00
Mansi Agarwal
4466f97d0e Accept admission request if resource is being deleted 2019-04-30 10:59:27 -07:00
Jordan Liggitt
bef996d0a4 Only reject quota admission if status is missing relevant usage 2019-03-26 23:15:40 -04:00
Mehdy Bohlool
d08bc3774d Mechanical changes due to signature change for Admit and Validate functions 2019-02-16 13:28:47 -08:00
Michelle Au
fd64c08240 Fix storage feature gate test setting 2018-11-16 10:49:40 -05:00
yue9944882
b86e8f7631 externalize quota admission controller 2018-08-27 21:47:10 +08:00
jennybuckley
adafb1365e Support dry run in admission plugins 2018-08-06 10:37:44 -07:00
vikaschoudhary16
3cfe6412c7 Introduce priority class in the resource quota 2018-06-04 16:14:54 -04:00
Kubernetes Submit Queue
2b0c7e2372
Merge pull request #57149 from deads2k/rebase-02-quota
Automatic merge from submit-queue (batch tested with PRs 58144, 57149). 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>.

make quota reusable

Quota is logically a re-useable component so that replenishment and admission can be done in constituent servers.  This makes it possible to embed.  More cleanup is probably required, but this is the minimum.
2018-01-22 19:02:29 -08:00
David Eads
7dc7693e86 make quota reusable 2017-12-13 08:39:55 -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
Dr. Stefan Schimanski
012b085ac8 pkg/apis/core: mechanical import fixes in dependencies 2017-11-09 12:14:08 +01:00
David Eads
75c448dbc7 make easy validation admission plugins into validators 2017-11-03 07:54:39 -04:00
Dr. Stefan Schimanski
131905cdb8 admission: unify plugin constructors 2017-10-30 16:56:38 +01:00
Derek Carr
5b4ca14307 Update admission control framework for quota 2017-10-27 11:08:14 -04:00
Hemant Kumar
066fcf785e Implement support for updating resources 2017-09-13 21:05:44 -04:00
Andy Goldstein
022bff7fbe Switch admission to use shared informers 2017-02-23 11:16:09 -05:00
Derek Carr
3fad0cb52a Implement support for limited resources in quota 2017-02-18 12:10:22 -05:00
Dr. Stefan Schimanski
bc6fdd925d pkg/api/resource: move to apimachinery 2017-01-29 21:41:44 +01:00
deads2k
9488e2ba30 move testing/core to client-go 2017-01-26 13:54:40 -05:00
deads2k
b0b156b381 make tools/cache authoritative 2017-01-25 08:29:45 -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
deads2k
6a4d5cd7cc start the apimachinery repo 2017-01-11 09:09:48 -05:00
deads2k
2861509b6d refactored admission to avoid internal client references 2017-01-03 15:50:12 -05:00
Derek Carr
459a7a05f1 Ability to quota storage by storage class 2016-12-09 13:26:59 -05:00
Clayton Coleman
35a6bfbcee
generated: refactor 2016-11-23 22:30:47 -06:00
Chao Xu
1044aa4500 plugin/admission; including resourcequota admission 2016-11-23 15:53:09 -08:00
derekwaynecarr
1bcb057636 quota controller uses informers if available for pod calculation 2016-10-31 11:38:22 -04:00
deads2k
9913ebf079 add quota test for creating update requests 2016-08-22 10:36:41 -04:00
Kubernetes Submit Queue
4145824911 Merge pull request #30907 from deads2k/fix-quota-updates
Automatic merge from submit-queue

only compute delta on non-creating updates

If you're issuing an update that can cause a create, the quota admission charge should be based on the create cost, otherwise you always end up with zero.

@derekwaynecarr ptal, blocker bug.
2016-08-20 16:16:02 -07:00
deads2k
44808c64ae only compute delta on non-creating updates 2016-08-18 13:41:33 -04:00
derekwaynecarr
307832dbec Quota usage checking ignores unrelated resources 2016-08-17 16:25:25 -04:00
derekwaynecarr
5cca4b07c6 Quota admission errors if usage is negative 2016-08-11 11:26:59 -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
deads2k
ada37c2163 allow lock acquisition injection for quota admission 2016-07-06 09:39:42 -04:00
David McMahon
ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
deads2k
a28cf3963b refactor quota evaluation to cleanly abstract the quota access 2016-06-28 11:38:18 -04: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
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
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
derekwaynecarr
ca7a8b50e6 Sort resources in quota errors to avoid duplicate events 2016-05-06 17:44:28 -04:00
deads2k
0061479890 fully qualify admission resources and kinds 2016-04-26 07:55:33 -04:00
deads2k
d3c6363093 use single writer to improve quota performance 2016-04-25 10:42:26 -04:00
Chao Xu
8537095415 use fully qualified resource in fake clients actions 2016-04-20 19:44:40 -07: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