mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-10 09:56:55 +00:00
* fix: return policies with either audit or enforce rules from the cache Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com> * feat: introduce validationFailureAction under verifyImage rules Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com> * feat: add chainsaw tests Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com> * fix Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com> --------- Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com> Co-authored-by: shuting <shuting@nirmata.com>
43 lines
988 B
YAML
43 lines
988 B
YAML
---
|
|
apiVersion: kyverno.io/v1
|
|
kind: ClusterPolicy
|
|
metadata:
|
|
name: testcase-7fki3
|
|
spec:
|
|
admission: true
|
|
background: false
|
|
rules:
|
|
- context:
|
|
- name: var1
|
|
variable:
|
|
value: AAA
|
|
match:
|
|
all:
|
|
- resources:
|
|
kinds:
|
|
- v1/ConfigMap
|
|
names:
|
|
- testcase-7fki3-resource
|
|
mutate:
|
|
foreach:
|
|
- list: '[''dummy'']'
|
|
patchStrategicMerge:
|
|
data:
|
|
from_loop_1: '{{ var1 || ''!!!variable not resolved!!!'' }}'
|
|
- list: '[''dummy'']'
|
|
patchStrategicMerge:
|
|
data:
|
|
from_loop_2: '{{ var1 || ''!!!variable not resolved!!!'' }}'
|
|
- list: '[''dummy'']'
|
|
patchStrategicMerge:
|
|
data:
|
|
from_loop_3: '{{ var1 || ''!!!variable not resolved!!!'' }}'
|
|
name: mutate1
|
|
preconditions:
|
|
all:
|
|
- key: '{{ request.operation }}'
|
|
operator: AllIn
|
|
value:
|
|
- CREATE
|
|
- UPDATE
|
|
schemaValidation: false
|