2019-11-04 17:55:13 -08:00
|
|
|
# file path is relative to project root
|
|
|
|
input:
|
|
|
|
policy: samples/best_practices/add_safe-to-evict_annotation.yaml
|
|
|
|
resource: test/resources/pod-with-emptydir.yaml
|
|
|
|
expected:
|
|
|
|
mutation:
|
|
|
|
patchedresource: test/output/pod-with-emptydir.yaml
|
|
|
|
policyresponse:
|
2019-11-05 15:32:45 -08:00
|
|
|
policy: annotate-emptydir-hostpath
|
2019-11-04 17:55:13 -08:00
|
|
|
resource:
|
|
|
|
kind: Pod
|
|
|
|
apiVersion: v1
|
|
|
|
namespace: ''
|
|
|
|
name: pod-with-emptydir
|
|
|
|
rules:
|
2019-11-05 12:28:44 -08:00
|
|
|
- name: empty-dir-add-safe-to-evict
|
2019-11-04 17:55:13 -08:00
|
|
|
type: Mutation
|
|
|
|
success: true
|
2019-11-05 12:28:44 -08:00
|
|
|
message: "successfully processed overlay"
|
|
|
|
- name: host-path-add-safe-to-evict
|
|
|
|
type: Mutation
|
|
|
|
success: false
|
2019-11-05 12:59:22 -08:00
|
|
|
message: "Resource Pod//pod-with-emptydir: Conditions are not met at /spec/volumes/0/hostPath/, resource field hostPath is not present."
|