1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-09 17:37:12 +00:00
kyverno/test/conformance/chainsaw/webhook-configurations/match-conditions-fail/policy.yaml

22 lines
494 B
YAML
Raw Normal View History

apiVersion: kyverno.io/v2beta1
kind: ClusterPolicy
metadata:
name: refresh-env-var-in-pods
spec:
webhookConfiguration:
matchConditions:
- name: "exclude-managed-pod"
expression: '!("ownerReferences" in request.object.metadata.keys(@))'
rules:
- name: refresh-from-secret-env
match:
any:
- resources:
kinds:
- Secret
validate:
pattern:
metadata:
labels:
foo: bar