1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-08 17:06:57 +00:00
kyverno/samples/best_practices/add_ns_quota.yaml

27 lines
720 B
YAML
Raw Normal View History

2019-11-13 13:56:20 -08:00
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
2019-11-10 20:58:57 -08:00
name: add-ns-quota
2019-10-11 18:57:16 -07:00
annotations:
2019-11-11 18:21:16 -08:00
policies.kyverno.io/category: Workload Isolation
2019-10-14 16:33:19 -07:00
policies.kyverno.io/description: To limit the number of objects, as well as the
2019-11-10 20:58:57 -08:00
total amount of compute that may be consumed by a single namespace, create
a default resource quota for each namespace.
spec:
rules:
2019-11-10 20:58:57 -08:00
- name: generate-resourcequota
match:
resources:
kinds:
- Namespace
generate:
kind: ResourceQuota
2019-11-10 20:58:57 -08:00
name: "default-resourcequota"
2019-10-24 12:37:52 -05:00
data:
spec:
hard:
2019-11-12 16:37:40 -08:00
requests.cpu: '4'
requests.memory: '16Gi'
limits.cpu: '4'
limits.memory: '16Gi'