Commit Graph

171 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
0b79a791ed
Merge pull request #107180 from ardaguclu/remove-deprecated-serverresource
Remove deprecated discovery/ServerResources function
2022-03-25 23:45:21 -07:00
Kubernetes Prow Robot
3bd422dc76
Merge pull request #107293 from dims/jan-1-owners-cleanup
Cleanup OWNERS files - Jan 2021 Week 1
2022-01-13 10:30:30 -08:00
Patrick Ohly
9eaa2dc554 avoid klog Info calls without verbosity
In the following code pattern, the log message will get logged with v=0 in JSON
output although conceptually it has a higher verbosity:

   if klog.V(5).Enabled() {
       klog.Info("hello world")
   }

Having the actual verbosity in the JSON output is relevant, for example for
filtering out only the important info messages. The solution is to use
klog.V(5).Info or something similar.

Whether the outer if is necessary at all depends on how complex the parameters
are. The return value of klog.V can be captured in a variable and be used
multiple times to avoid the overhead for that function call and to avoid
repeating the verbosity level.
2022-01-12 07:48:36 +01:00
Davanum Srinivas
9682b7248f
OWNERS cleanup - Jan 2021 Week 1
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-01-10 08:14:29 -05:00
jlsong01
d6bf04d85f refine comments of quota monitor 2022-01-06 23:08:53 +08:00
Arda Güçlü
ef39a89142 Remove deprecated discovery/ServerResources function
ServerResources function was deprecated and instead ServerGroupsAndResources
function is suggested.

This PR removes ServerResources function and move every place to use ServerGroupsAndResources.
2021-12-22 11:14:09 +03:00
Davanum Srinivas
9405e9b55e
Check in OWNERS modified by update-yamlfmt.sh
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2021-12-09 21:31:26 -05:00
Hemant Kumar
1ddd598d31 Implement controller and kubelet changes for recovery from resize
failures
2021-11-16 11:06:46 -05:00
Mike Dame
4960d0976a Wire contexts to Core controllers 2021-11-01 10:29:00 -04:00
Jordan Liggitt
81fa9855c1 Fix quota controller hotloop in integration tests 2021-10-06 11:34:32 -04:00
wojtekt
e233feb99b Migrate to k8s.io/utils/clock in pkg/controller 2021-09-10 11:42:32 +02:00
Stephen Augustus
481cf6fbe7
generated: Run hack/update-gofmt.sh
Signed-off-by: Stephen Augustus <foo@auggie.dev>
2021-08-24 15:47:49 -04:00
Benjamin Elder
56e092e382 hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
cici37
a91a2cdad6 Move informer_factory to staging 2020-10-29 12:20:33 -07:00
Tim Usner
cc0b86fa3c Add more tests for LRU cache lookup 2020-09-04 15:09:03 +02:00
Tim Usner
70d440bc7e Move ResourceQuota admission to k8s.io/apiserver 2020-09-04 14:53:52 +02:00
Kubernetes Prow Robot
8296643fad
Merge pull request #94371 from bbyrne5/bmb-resourcequota-staticcheck-errorfix
fix staticcheck errors in resourcequota
2020-09-03 03:41:41 -07:00
Brian Byrne
a820a82785 fix staticcheck errors in resourcequota 2020-08-31 12:27:23 -04:00
Alexander Zimmermann
86dc0364f4
Refactored pkg/controllers/resourcequota
* Fixed golint issues
* Removed redundant package import names
* Improved some variables and names

Co-authored-by: Mike Danese <mikedanese@gmail.com>
2020-08-20 14:37:27 +02:00
Davanum Srinivas
07d88617e5
Run hack/update-vendor.sh
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-05-16 07:54:33 -04:00
Davanum Srinivas
442a69c3bd
switch over k/k to use klog v2
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-05-16 07:54:27 -04:00
Mike Danese
25651408ae generated: run refactor 2020-02-08 12:30:21 -05:00
Mike Danese
3aa59f7f30 generated: run refactor 2020-02-07 18:16:47 -08:00
wojtekt
7b6bcdf780 Autogenerated code 2019-10-24 20:21:00 +02:00
mengyang02
b116585b22 remove redundant quota.V1Equals 2019-10-02 01:02:09 +08:00
Yassine TIJANI
7e4c3096fe move WaitForCacheSync to the sharedInformer package
Signed-off-by: Yassine TIJANI <ytijani@vmware.com>
2019-08-22 16:13:41 +01:00
David Xia
fabfd950b1
cleanup: fix some log and error capitalizations
Part of https://github.com/kubernetes/kubernetes/issues/15863
2019-07-20 18:26:16 -04:00
Kubernetes Prow Robot
a8787dac30
Merge pull request #76927 from mrkm4ntr/unnecessary-goroutine
Do not generate unnecessary goroutines
2019-05-06 21:31:53 -07:00
Shintaro Murakami
f8e81337da Do not generate unnecessary goroutine 2019-04-23 16:22:14 +09:00
Ted Yu
0129dede89 Use read lock for QuotaMonitor#IsSynced 2019-04-20 11:05:57 -07:00
zhouhaibing089
f58c2ae62d resourcequota: use dynamic informer
The resource quota controller should use a dynamic informer so it
can create informer for custom resources.
2019-03-27 11:08:24 -07:00
Jordan Liggitt
27cd2be49f Update quota status with limits even when calculating errors 2019-03-26 23:15:40 -04:00
Jordan Liggitt
739df5452a Avoid deadlock in resource quota resync 2019-03-26 23:15:40 -04:00
Jordan Liggitt
e5f7af7058 Improve quota sync log messages 2019-03-26 23:15:40 -04:00
Jordan Liggitt
713a10d276 Fix race in quota sync test 2019-03-26 23:15:39 -04:00
stewart-yu
ecbd5427e7 auto-generated file 2019-03-02 12:55:26 +08:00
stewart-yu
e01ff1641c move config local to every controllers in kube-controller-manager 2019-03-02 12:54:33 +08:00
Kubernetes Prow Robot
808f2cf0ef
Merge pull request #72525 from justinsb/owners_should_not_be_executable
Remove executable file permission from OWNERS files
2019-02-14 23:55:45 -08:00
Roy Lenferink
b43c04452f Updated OWNERS files to include link to docs 2019-02-04 22:33:12 +01:00
Justin SB
dd19b923b7
Remove executable file permission from OWNERS files 2019-01-11 16:42:59 -08:00
k8s-ci-robot
a44c2b9eeb
Merge pull request #70035 from liggitt/retain-quota-metadata
Avoid dropping resourcequota metadata in controller
2018-11-14 01:29:53 -08:00
Davanum Srinivas
954996e231
Move from glog to klog
- Move from the old github.com/golang/glog to k8s.io/klog
- klog as explicit InitFlags() so we add them as necessary
- we update the other repositories that we vendor that made a similar
change from glog to klog
  * github.com/kubernetes/repo-infra
  * k8s.io/gengo/
  * k8s.io/kube-openapi/
  * github.com/google/cadvisor
- Entirely remove all references to glog
- Fix some tests by explicit InitFlags in their init() methods

Change-Id: I92db545ff36fcec83afe98f550c9e630098b3135
2018-11-10 07:50:31 -05:00
Jordan Liggitt
fdd87a8872 Avoid dropping resourcequota metadata in controller 2018-10-19 14:52:53 -04:00
yue9944882
d11ee913a1 prune flipping int/ext conversion for quota controller 2018-08-27 21:49:26 +08:00
David Eads
4c8e9de293 allow failed discovery on initial quota controller start 2018-08-17 11:42:54 -04:00
Kubernetes Submit Queue
e5b8e891e9
Merge pull request #66351 from vikaschoudhary16/fix-scopeselector-exist-operator
Automatic merge from submit-queue (batch tested with PRs 66351, 66883, 66156). 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>.

Add unit tests to cover scopes and scope selectors during quota sync logic

**What this PR does / why we need it**:
Adds unit tests to cover scopes and scope selectors fields in the quota spec. Existing unit test for quota sync does not cover scopes.

Also while adding tests found a minor issue with 'Exists' scope selector operator. This is also being fixed in this PR.

**Special notes for your reviewer**:

**Release note**:

```release-note
Unit tests for scopes and scope selectors in the quota spec
```
/cc @derekwaynecarr @sjenning @bsalamat @kubernetes/sig-scheduling-pr-reviews @kubernetes/sig-node-pr-reviews
2018-08-06 07:13:14 -07:00
vikaschoudhary16
c83f18a897 Fix 'Exists' scope selector operator 2018-08-03 01:36:22 -04:00
yue9944882
ccb1ec7a36 fixes operation for "create on update"
remove create-on-update logic for quota controller

review: add more error check

remove unused args

revert changes in patch.go

use hasUID to judge if it's a create-on-update
2018-07-10 17:22:09 +08:00
Jeff Grafton
23ceebac22 Run hack/update-bazel.sh 2018-06-22 16:22:57 -07:00
vikaschoudhary16
ea2192f043 Fix quota sync 2018-06-05 04:50:37 -04:00