mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-10 01:46:55 +00:00
* apply patches cumulatively Signed-off-by: Jim Bugwadia <jim@nirmata.com> * handle skipped rules Signed-off-by: Jim Bugwadia <jim@nirmata.com> * add test files Signed-off-by: Jim Bugwadia <jim@nirmata.com>
26 lines
740 B
YAML
26 lines
740 B
YAML
apiVersion : kyverno.io/v1
|
|
kind: ClusterPolicy
|
|
metadata:
|
|
name: add-default-resources
|
|
annotations:
|
|
pod-policies.kyverno.io/autogen-controllers: "none"
|
|
spec:
|
|
background: false
|
|
rules:
|
|
- name: add-default-requests
|
|
match:
|
|
resources:
|
|
kinds:
|
|
- Pod
|
|
mutate:
|
|
foreach:
|
|
- list: "request.object.spec.containers"
|
|
patchesJson6902: |-
|
|
- path: /spec/containers/{{elementIndex}}/resources/requests/memory
|
|
op: add
|
|
value: "100Mi"
|
|
- list: "request.object.spec.containers"
|
|
patchesJson6902: |-
|
|
- path: /spec/containers/{{elementIndex}}/resources/requests/cpu
|
|
op: add
|
|
value: "100m"
|