mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-13 19:28:55 +00:00
fix label example
This commit is contained in:
parent
66fd48a463
commit
e3033b5684
1 changed files with 8 additions and 6 deletions
|
@ -43,24 +43,26 @@ metadata :
|
|||
name : validation-example
|
||||
spec :
|
||||
rules:
|
||||
- resource:
|
||||
- name: check-label
|
||||
resource:
|
||||
# Kind specifies one or more resource types to match
|
||||
kinds:
|
||||
- Deployment
|
||||
- StatefuleSet
|
||||
- DaemonSet
|
||||
# Name is optional and can use wildcards
|
||||
name: *
|
||||
name: "*"
|
||||
# Selector is optional
|
||||
selector:
|
||||
validate:
|
||||
# Message is optional
|
||||
message: "The label app is required"
|
||||
message: "The label app is required"
|
||||
pattern:
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: "?*"
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: "?*"
|
||||
|
||||
````
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue