mirror of https://github.com/k3s-io/k3s
27ef37a32d
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 ``` |
||
---|---|---|
.. | ||
bootstrap | ||
certificates | ||
cloud | ||
cronjob | ||
daemon | ||
deployment | ||
disruption | ||
endpoint | ||
garbagecollector | ||
history | ||
job | ||
namespace | ||
node | ||
podautoscaler | ||
podgc | ||
replicaset | ||
replication | ||
resourcequota | ||
route | ||
service | ||
serviceaccount | ||
statefulset | ||
testutil | ||
ttl | ||
volume | ||
.import-restrictions | ||
BUILD | ||
OWNERS | ||
client_builder.go | ||
controller_ref_manager.go | ||
controller_ref_manager_test.go | ||
controller_utils.go | ||
controller_utils_test.go | ||
doc.go | ||
lookup_cache.go |