mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-28 18:38:40 +00:00
change anypattern to pattern, refer #357
This commit is contained in:
parent
a620c14c58
commit
5009e8abb7
4 changed files with 12 additions and 12 deletions
|
@ -11,9 +11,9 @@ spec:
|
|||
- Pod
|
||||
validate:
|
||||
message: "A none 'default' namespace is required"
|
||||
anyPattern:
|
||||
- metadata:
|
||||
namespace: "!default"
|
||||
pattern:
|
||||
metadata:
|
||||
namespace: "!default"
|
||||
- name: check-namespace-exist
|
||||
match:
|
||||
resources:
|
||||
|
@ -21,6 +21,6 @@ spec:
|
|||
- Pod
|
||||
validate:
|
||||
message: "A namespace is required"
|
||||
anyPattern:
|
||||
- metadata:
|
||||
namespace: "?*"
|
||||
pattern:
|
||||
metadata:
|
||||
namespace: "?*"
|
||||
|
|
|
@ -15,8 +15,8 @@ spec:
|
|||
- Pod
|
||||
validate:
|
||||
message: "Container should not have read-only rootfilesystem"
|
||||
anyPattern:
|
||||
- spec:
|
||||
container:
|
||||
pattern:
|
||||
spec:
|
||||
containers:
|
||||
- securityContext:
|
||||
readOnlyRootFilesystem: false
|
|
@ -16,10 +16,10 @@ expected:
|
|||
rules:
|
||||
- name: check-default-namespace
|
||||
type: Validation
|
||||
message: "Validation rule 'check-default-namespace' failed to validate patterns defined in anyPattern. A none 'default' namespace is required; anyPattern[0] failed at path /metadata/namespace/"
|
||||
message: "Validation rule 'check-default-namespace' failed at '/metadata/namespace/' for resource Pod/default/myapp-pod. A none 'default' namespace is required"
|
||||
success: false
|
||||
- name: check-namespace-exist
|
||||
type: Validation
|
||||
message: "Validation rule 'check-namespace-exist' anyPattern[0] succesfully validated"
|
||||
message: "Validation rule 'check-namespace-exist' succesfully validated"
|
||||
success: true
|
||||
|
||||
|
|
|
@ -14,5 +14,5 @@ expected:
|
|||
rules:
|
||||
- name: validate-not-readonly-rootfilesystem
|
||||
type: Validation
|
||||
message: Validation rule 'validate-not-readonly-rootfilesystem' failed to validate patterns defined in anyPattern. Container should not have read-only rootfilesystem; anyPattern[0] failed at path /spec/container/
|
||||
message: Validation rule 'validate-not-readonly-rootfilesystem' failed at '/spec/containers/0/securityContext/readOnlyRootFilesystem/' for resource Pod//ghost-with-readonly-rootfilesystem. Container should not have read-only rootfilesystem
|
||||
success: false
|
Loading…
Add table
Reference in a new issue