mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-31 03:45:17 +00:00
commit
3c65845c28
3 changed files with 13 additions and 13 deletions
|
@ -72,10 +72,10 @@ spec:
|
|||
namespace: "{{request.object.metadata.name}}" # namespace that triggers this rule
|
||||
data:
|
||||
spec:
|
||||
podSelector:
|
||||
matchLabels: {}
|
||||
matchExpressions: []
|
||||
policyTypes: []
|
||||
# select all pods in the namespace
|
||||
podSelector: {}
|
||||
policyTypes:
|
||||
- Ingress
|
||||
metadata:
|
||||
labels:
|
||||
policyname: "default"
|
||||
|
|
|
@ -134,17 +134,17 @@ spec :
|
|||
- Deployment
|
||||
# Name is optional and can use wildcards
|
||||
name: "*"
|
||||
# Selector is optional
|
||||
selector:
|
||||
validate:
|
||||
pattern:
|
||||
spec:
|
||||
^(containers):
|
||||
resources:
|
||||
requests:
|
||||
memory: "$(<=./../../limits/memory)"
|
||||
limits:
|
||||
memory: "2048Mi"
|
||||
template:
|
||||
spec:
|
||||
^(containers):
|
||||
- resources:
|
||||
requests:
|
||||
memory: "$(<=./../../limits/memory)"
|
||||
limits:
|
||||
memory: "2048Mi"
|
||||
````
|
||||
|
||||
### Logical OR across validation patterns
|
||||
|
|
|
@ -63,4 +63,4 @@ Each rule can validate, mutate, or generate configurations of matching resources
|
|||
|
||||
|
||||
---
|
||||
<small>*Read Next >> [Validate Resources](/documentation/writing-policies-validate.md)*</small>
|
||||
<small>*Read Next >> [Validate Resources](/documentation/writing-policies-validate.md)*</small>
|
||||
|
|
Loading…
Add table
Reference in a new issue