1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-13 03:16:55 +00:00
kyverno/test/conformance/manifests/should-fail/background-userinfo-1.yaml
Charles-Edouard Brétéché ad2cbd3b33
feat: add simple conformance tests (#5073)
* feat: add simple conformance tests
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Co-authored-by: Vyankatesh Kudtarkar <vyankateshkd@gmail.com>
2022-10-20 12:17:33 +00:00

20 lines
414 B
YAML

apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
name: background-userinfo-1
spec:
validationFailureAction: audit
background: true
rules:
- name: ns-vars
match:
any:
- resources:
kinds:
- Pod
validate:
message: The `owner` label is required for all Namespaces.
pattern:
metadata:
labels:
foo: "{{request.roles}}"