1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-10 01:46:55 +00:00
kyverno/test/conformance/chainsaw/validating-policies/validation-actions/deny/chainsaw-test.yaml

22 lines
644 B
YAML
Raw Normal View History

# yaml-language-server: $schema=https://raw.githubusercontent.com/kyverno/chainsaw/main/.schemas/json/test-chainsaw-v1alpha1.json
apiVersion: chainsaw.kyverno.io/v1alpha1
kind: Test
metadata:
name: deny
spec:
steps:
- name: create policy
try:
- create:
file: policy.yaml
- sleep:
duration: 10s
- name: create deployment
try:
- create:
file: deployment.yaml
expect:
- check:
($error): >-
admission webhook "vpol.validate.kyverno.svc-fail" denied the request: Policy check-deployment-labels rule rule-0 failed: Deployment labels must be env=prod