k3s/pkg/controller
Kubernetes Submit Queue 27ef37a32d
Merge pull request #54320 from derekwaynecarr/quota-update
Automatic merge from submit-queue (batch tested with PRs 54331, 54655, 54320, 54639, 54288). 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>.

Ability to do object count quota for all namespaced resources

**What this PR does / why we need it**:
- Defines syntax for generic object count quota `count/<resource>.<group>`
- Migrates existing objects to support new syntax with old syntax
- Adds support to quota all standard namespace resources 
- Updates the controller to do discovery and replenishment on those resources
- Updates unit tests
- Tweaks admission configuration around quota
- Add e2e test for replicasets (demonstrate dynamic generic counting)

```
$  kubectl create quota test --hard=count/deployments.extensions=2,count/replicasets.extensions=4,count/pods=3,count/secrets=4
resourcequota "test" created
$ kubectl run nginx --image=nginx --replicas=2
$ kubectl describe quota
Name:                         test
Namespace:                    default
Resource                      Used  Hard
--------                      ----  ----
count/deployments.extensions  1     2
count/pods                    2     3
count/replicasets.extensions  1     4
count/secrets                 1     4
```

**Special notes for your reviewer**:
- simple object count quotas no longer require writing code
- deferring support for custom resources pending investigation about how to share caches with garbage collector.  in addition, i would like to see how this integrates with downstream quota usage in openshift.

**Release note**:
```release-note
Object count quotas supported on all standard resources using `count/<resource>.<group>` syntax
```
2017-10-27 15:42:24 -07:00
..
bootstrap use core client with explicit version globally 2017-10-27 15:48:32 +08:00
certificates remove redundant code 2017-10-27 15:49:08 +08:00
cloud use core client with explicit version globally 2017-10-27 15:48:32 +08:00
cronjob use core client with explicit version globally 2017-10-27 15:48:32 +08:00
daemon use core client with explicit version globally 2017-10-27 15:48:32 +08:00
deployment use core client with explicit version globally 2017-10-27 15:48:32 +08:00
disruption use core client with explicit version globally 2017-10-27 15:48:32 +08:00
endpoint use core client with explicit version globally 2017-10-27 15:48:32 +08:00
garbagecollector Update bazel 2017-10-18 17:24:04 +02:00
history update BUILD files 2017-10-15 18:18:13 -07:00
job Update bazel 2017-10-18 17:24:04 +02:00
namespace use core client with explicit version globally 2017-10-27 15:48:32 +08:00
node use core client with explicit version globally 2017-10-27 15:48:32 +08:00
podautoscaler use core client with explicit version globally 2017-10-27 15:48:32 +08:00
podgc use core client with explicit version globally 2017-10-27 15:48:32 +08:00
replicaset use core client with explicit version globally 2017-10-27 15:48:32 +08:00
replication use core client with explicit version globally 2017-10-27 15:48:32 +08:00
resourcequota Update quota controller to monitor all types 2017-10-27 11:07:53 -04:00
route use core client with explicit version globally 2017-10-27 15:48:32 +08:00
service use core client with explicit version globally 2017-10-27 15:48:32 +08:00
serviceaccount use core client with explicit version globally 2017-10-27 15:48:32 +08:00
statefulset use core client with explicit version globally 2017-10-27 15:48:32 +08:00
testutil Update bazel 2017-10-18 17:24:04 +02:00
ttl use core client with explicit version globally 2017-10-27 15:48:32 +08:00
volume use core client with explicit version globally 2017-10-27 15:48:32 +08:00
.import-restrictions
BUILD Update bazel 2017-10-18 17:24:04 +02:00
OWNERS remove some people from OWNERS so they don't get reviews anymore 2017-07-13 10:02:21 -07:00
client_builder.go pkg/api/legacyscheme: fixup imports 2017-10-18 17:23:55 +02:00
controller_ref_manager.go Migrate to GetControllerOf from meta/v1 package 2017-08-06 22:41:58 +10:00
controller_ref_manager_test.go Merge pull request #50353 from zhangxiaoyu-zidif/Delete-redundant-expectError-for-controller-ref-test 2017-08-12 00:00:55 -07:00
controller_utils.go use core client with explicit version globally 2017-10-27 15:48:32 +08:00
controller_utils_test.go pkg/api/legacyscheme: fixup imports 2017-10-18 17:23:55 +02:00
doc.go
lookup_cache.go Use fnv.New32a() in hash instead adler32 2017-02-15 14:03:54 +08:00