Skip to content

Commit

Permalink
Merge pull request #953 from michaelkotelnikov/contribfest-policy-fix
Browse files Browse the repository at this point in the history
Fixed sample policies to include more container types
  • Loading branch information
JimBugwadia authored May 15, 2024
2 parents ffb9a0b + 3425709 commit 7949c9e
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion other/add-default-resources/add-default-resources.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ spec:
- UPDATE
mutate:
foreach:
- list: "request.object.spec.containers[]"
- list: "request.object.spec.[ephemeralContainers, initContainers, containers][]"
patchStrategicMerge:
spec:
containers:
Expand Down
2 changes: 1 addition & 1 deletion other/add-default-resources/artifacthub-pkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ annotations:
kyverno/category: "Other"
kyverno/kubernetesVersion: "1.26"
kyverno/subject: "Pod"
digest: 215f880a62b2c2e7627321623a22037af3f89e3e740372f02a40214da8163d79
digest: 24a5a9e9a4ee1e83ab00bb85718a70ed0cd00d28506dbc1192ab3901bd0a6bcf
2 changes: 1 addition & 1 deletion other/allowed-base-images/allowed-base-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ spec:
This container image's base is not in the approved list or is not specified. Only pre-approved
base images may be used. Please contact the platform team for assistance.
foreach:
- list: "request.object.spec.containers"
- list: "request.object.spec.[ephemeralContainers, initContainers, containers][]"
context:
- name: imageData
imageRegistry:
Expand Down
2 changes: 1 addition & 1 deletion other/allowed-base-images/artifacthub-pkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ annotations:
kyverno/category: "Other"
kyverno/kubernetesVersion: "1.23"
kyverno/subject: "Pod"
digest: a0edbf4ddfa0a06c5334133357219b22af4272fc46a30489d9181e29fb38d014
digest: be54e5cb7e03c6e7d786da1836612a228299b22d60443f8288420d6089372232
2 changes: 1 addition & 1 deletion psp-migration/add-apparmor/add-apparmor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ spec:
- UPDATE
mutate:
foreach:
- list: request.object.spec.containers[]
- list: request.object.spec.[ephemeralContainers, initContainers, containers][]
patchStrategicMerge:
metadata:
annotations:
Expand Down
2 changes: 1 addition & 1 deletion psp-migration/add-apparmor/artifacthub-pkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ annotations:
kyverno/category: "PSP Migration"
kyverno/kubernetesVersion: "1.24"
kyverno/subject: "Pod,Annotation"
digest: 082461dca2f21839c429ac792fa4c8cb7a6a86639580345e124e541bf595332d
digest: 0bb624dce200ace9730d9ddf85c5aca5f1fcf61759412a672155e176f24d9ac7
4 changes: 2 additions & 2 deletions psp-migration/add-capabilities/add-capabilities.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ spec:
- UPDATE
mutate:
foreach:
- list: request.object.spec.containers[]
- list: request.object.spec.[ephemeralContainers, initContainers, containers][]
preconditions:
all:
- key: SETFCAP
Expand All @@ -42,7 +42,7 @@ spec:
- path: /spec/containers/{{elementIndex}}/securityContext/capabilities/add/-
op: add
value: SETFCAP
- list: request.object.spec.containers[]
- list: request.object.spec.[ephemeralContainers, initContainers, containers][]
preconditions:
all:
- key: SETUID
Expand Down
2 changes: 1 addition & 1 deletion psp-migration/add-capabilities/artifacthub-pkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ annotations:
kyverno/category: "PSP Migration"
kyverno/kubernetesVersion: "1.24"
kyverno/subject: "Pod"
digest: 5f25e343611f412f21608223ee89a3684280045469ce1053bc7a3418ee57a1c4
digest: 59ac7efa86868c57372662bbb60ed75ca0af8255df05cfebee2d2c8809f1ce2d

0 comments on commit 7949c9e

Please sign in to comment.