1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-29 10:55:05 +00:00

fix hostpid/hostipc test runner

This commit is contained in:
Shuting Zhao 2019-10-01 14:53:58 -07:00
parent 5009e8abb7
commit 23c9212d67
3 changed files with 5 additions and 5 deletions

View file

@ -15,7 +15,7 @@ spec:
- Pod
validate:
message: "Disallow use of host's pid namespace and host's ipc namespace"
anyPattern:
- spec:
pattern:
spec:
hostPID: false
hostIPC: false

View file

@ -3,8 +3,8 @@ kind: Pod
metadata:
name: nginx-with-hostpid
spec:
hostPID: true
hostIPC: false
hostPID: false
hostIPC: true
containers:
- name: nginx
image: nginx

View file

@ -14,5 +14,5 @@ expected:
rules:
- name: validate-hostpid-hostipc
type: Validation
message: Validation rule 'validate-hostpid-hostipc' failed to validate patterns defined in anyPattern. Disallow use of host's pid namespace and host's ipc namespace; anyPattern[0] failed at path /spec/hostIPC/
message: Validation rule 'validate-hostpid-hostipc' failed at '/spec/hostIPC/' for resource Pod//nginx-with-hostpid. Disallow use of host's pid namespace and host's ipc namespace
success: false