1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-31 03:45:17 +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 - Pod
validate: validate:
message: "Disallow use of host's pid namespace and host's ipc namespace" message: "Disallow use of host's pid namespace and host's ipc namespace"
anyPattern: pattern:
- spec: spec:
hostPID: false hostPID: false
hostIPC: false hostIPC: false

View file

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

View file

@ -14,5 +14,5 @@ expected:
rules: rules:
- name: validate-hostpid-hostipc - name: validate-hostpid-hostipc
type: Validation 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 success: false