mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-06 16:06:56 +00:00
26 lines
No EOL
743 B
YAML
26 lines
No EOL
743 B
YAML
apiVersion: kyverno.io/v1alpha1
|
|
kind: ClusterPolicy
|
|
metadata:
|
|
name: generate-namespace-quota
|
|
annotations:
|
|
policies.kyverno.io/category: Resource Quota
|
|
policies.kyverno.io/description: To limit the number of objects, as well as the
|
|
total amount of compute that may be consumed by an application, it is important
|
|
to create resource limits and quotas for each namespace.
|
|
spec:
|
|
rules:
|
|
- name: generate-namespace-quota
|
|
match:
|
|
resources:
|
|
kinds:
|
|
- Namespace
|
|
generate:
|
|
kind: ResourceQuota
|
|
name: "defaultresourcequota"
|
|
data:
|
|
spec:
|
|
hard:
|
|
requests.cpu: 4
|
|
requests.memory: 16Gi
|
|
limits.cpu: 4
|
|
limits.memory: 16Gi |