mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-10 01:46:55 +00:00
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com> Co-authored-by: Jim Bugwadia <jim@nirmata.com>
26 lines
517 B
YAML
26 lines
517 B
YAML
---
|
|
apiVersion: kyverno.io/v1
|
|
kind: ClusterPolicy
|
|
metadata:
|
|
name: cm-variable-example
|
|
spec:
|
|
admission: true
|
|
background: true
|
|
rules:
|
|
- context:
|
|
- configMap:
|
|
name: some-config-map
|
|
namespace: some-namespace
|
|
name: dictionary
|
|
match:
|
|
any:
|
|
- resources:
|
|
kinds:
|
|
- Pod
|
|
name: example-configmap-lookup
|
|
validate:
|
|
pattern:
|
|
metadata:
|
|
labels:
|
|
my-environment-name: '{{dictionary.data.env}}'
|
|
failureAction: Audit
|