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>
31 lines
676 B
YAML
31 lines
676 B
YAML
---
|
|
apiVersion: kyverno.io/v1
|
|
kind: ClusterPolicy
|
|
metadata:
|
|
name: cm-multiple-example
|
|
spec:
|
|
admission: true
|
|
background: true
|
|
rules:
|
|
- context:
|
|
- configMap:
|
|
name: some-config-map
|
|
namespace: some-namespace
|
|
name: dictionary
|
|
- configMap:
|
|
name: another-config-map
|
|
namespace: some-namespace
|
|
name: anotherdictionary
|
|
match:
|
|
any:
|
|
- resources:
|
|
kinds:
|
|
- Pod
|
|
name: example-configmap-lookup
|
|
validate:
|
|
pattern:
|
|
metadata:
|
|
labels:
|
|
my-environment-name: '{{dictionary.data.env || anotherdictionary.data.env
|
|
}}'
|
|
failureAction: Audit
|