mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-09 17:37:12 +00:00
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com> Co-authored-by: Jim Bugwadia <jim@nirmata.com>
24 lines
430 B
YAML
24 lines
430 B
YAML
apiVersion: kyverno.io/v1
|
|
kind: Policy
|
|
metadata:
|
|
name: bad-context-name
|
|
spec:
|
|
rules:
|
|
- name: test
|
|
match:
|
|
all:
|
|
- resources:
|
|
kinds:
|
|
- Pod
|
|
context:
|
|
- name: bad-name
|
|
variable:
|
|
value: dummy
|
|
validate:
|
|
failureAction: Enforce
|
|
message: "pod must have an env label"
|
|
assert:
|
|
object:
|
|
metadata:
|
|
labels:
|
|
env: {}
|