1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-09 09:26:54 +00:00
kyverno/cmd/cli/kubectl-kyverno/_testdata/apply/test-1/policy.yaml

29 lines
817 B
YAML
Raw Normal View History

apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
name: test-policy
annotations:
policies.kyverno.io/title: "Lol Security Standards"
policies.kyverno.io/category: "Lol Security Standards"
policies.kyverno.io/severity: "high"
policies.kyverno.io/subject: "Pod"
spec:
background: true
failurePolicy: Fail
rules:
- name: restrict-lol-annotation
match:
any:
- resources:
kinds:
- Pod
validate:
message: >-
If "lol" annotation is present then
its value can be only one of "such lol", "much annotation".
pattern:
# syntax refdoc: https://kyverno.io/docs/writing-policies/validate/#anchors
=(metadata):
=(annotations):
=(lol): such lol | much annotation