1
+ [
2
+ {
3
+ "name" : " Pod with no hostPath Volumes allowed" ,
4
+ "template" : " pod.yaml" ,
5
+ "expected" : " pass" ,
6
+ "field_change_list" : [
7
+ ]
8
+ },
9
+ {
10
+ "name" : " Pod with hostPath volume and readOnly is not set for corresponding volumeMount is denied" ,
11
+ "template" : " pod.yaml" ,
12
+ "expected" : " fail" ,
13
+ "field_change_list" : [
14
+ " spec.volumes.[0].hostPath.path=/var"
15
+ ]
16
+ },
17
+ {
18
+ "name" : " Pod with hostPath volume and readOnly is set to false for corresponding volumeMount is denied" ,
19
+ "template" : " pod.yaml" ,
20
+ "expected" : " fail" ,
21
+ "field_change_list" : [
22
+ " spec.volumes.[0].hostPath.path=/var" ,
23
+ " spec.containers.[0].volumeMounts.[0].readOnly=false"
24
+ ]
25
+ },
26
+ {
27
+ "name" : " Pod with hostPath volume and readOnly is set to true for corresponding volumeMount is allowed" ,
28
+ "template" : " pod.yaml" ,
29
+ "expected" : " pass" ,
30
+ "field_change_list" : [
31
+ " spec.volumes.[0].hostPath.path=/var" ,
32
+ " spec.containers.[0].volumeMounts.[0].readOnly=true"
33
+ ]
34
+ },
35
+ {
36
+ "name" : " Deployment with no hostPath Volumes allowed" ,
37
+ "template" : " deployment.yaml" ,
38
+ "expected" : " pass" ,
39
+ "field_change_list" : [
40
+ ]
41
+ },
42
+ {
43
+ "name" : " Deployment with hostPath volume and readOnly is not set for corresponding volumeMount is denied" ,
44
+ "template" : " deployment.yaml" ,
45
+ "expected" : " fail" ,
46
+ "field_change_list" : [
47
+ " spec.template.spec.volumes.[0].hostPath.path=/var"
48
+ ]
49
+ },
50
+ {
51
+ "name" : " Deployment with hostPath volume and readOnly is set to false for corresponding volumeMount is denied" ,
52
+ "template" : " deployment.yaml" ,
53
+ "expected" : " fail" ,
54
+ "field_change_list" : [
55
+ " spec.template.spec.volumes.[0].hostPath.path=/var" ,
56
+ " spec.template.spec.containers.[0].volumeMounts.[0].readOnly=false"
57
+ ]
58
+ },
59
+ {
60
+ "name" : " Deployment with hostPath volume and readOnly is set to true for corresponding volumeMount is allowed" ,
61
+ "template" : " deployment.yaml" ,
62
+ "expected" : " pass" ,
63
+ "field_change_list" : [
64
+ " spec.template.spec.volumes.[0].hostPath.path=/var" ,
65
+ " spec.template.spec.containers.[0].volumeMounts.[0].readOnly=true"
66
+ ]
67
+ }
68
+ ]
0 commit comments