1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-31 03:45:17 +00:00

Merge pull request from nirmata/update_doc

Update policies
This commit is contained in:
Jim Bugwadia 2020-02-07 12:24:29 -08:00 committed by GitHub
commit 3c65845c28
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 13 deletions

View file

@ -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"

View file

@ -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

View file

@ -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>