1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-10 18:06:55 +00:00
kyverno/test/cli/test-mutate/foreach/addIfNotPresent/policies.yaml
Charles-Edouard Brétéché 7562bea6db
chore: apply policy fixes (#8427)
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2023-09-17 22:24:26 +00:00

27 lines
580 B
YAML

---
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
name: mutate-emptydir
spec:
admission: true
background: true
rules:
- match:
any:
- resources:
kinds:
- Deployment
mutate:
foreach:
- list: request.object.spec.template.spec.volumes
patchStrategicMerge:
spec:
template:
spec:
volumes:
- (emptyDir):
+(sizeLimit): 20Mi
name: '{{ element.name }}'
name: setDefault
validationFailureAction: Audit