k3s/pkg/kubeapiserver
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
..
admission Merge pull request #54320 from derekwaynecarr/quota-update 2017-10-27 15:42:24 -07:00
authenticator update BUILD files 2017-10-15 18:18:13 -07:00
authorizer update BUILD files 2017-10-15 18:18:13 -07:00
options Update bazel 2017-10-18 17:24:04 +02:00
server update BUILD files 2017-10-15 18:18:13 -07:00
BUILD Update bazel 2017-10-18 17:24:04 +02:00
OWNERS add liggitt to kubeapiserver owners 2017-04-03 10:14:34 -04:00
default_storage_factory_builder.go pkg/api/legacyscheme: fixup imports 2017-10-18 17:23:55 +02:00
default_storage_factory_builder_test.go pkg/api/legacyscheme: fixup imports 2017-10-18 17:23:55 +02:00
doc.go start kubeapiserver package for sharing between kubeapiserver and federation 2016-12-22 07:43:42 -05:00