mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-13 19:28:55 +00:00
parent
ec7969df31
commit
87cdf80e09
2 changed files with 4 additions and 12 deletions
|
@ -3,7 +3,7 @@
|
|||
Linux allows defining fine-grained permissions using
|
||||
capabilities. With Kubernetes, it is possible to add capabilities that escalate the
|
||||
level of kernel access and allow other potentially dangerous behaviors. This policy
|
||||
enforces that pods cannot add new capabilities. Other policies can be used to set
|
||||
enforces that containers cannot add new capabilities. Other policies can be used to set
|
||||
default capabilities.
|
||||
|
||||
## Policy YAML
|
||||
|
@ -24,11 +24,7 @@ spec:
|
|||
- Pod
|
||||
validate:
|
||||
message: "New capabilities cannot be added"
|
||||
anyPattern:
|
||||
- spec:
|
||||
=(securityContext):
|
||||
=(capabilities):
|
||||
X(add): null
|
||||
pattern:
|
||||
- spec:
|
||||
containers:
|
||||
- name: "*"
|
||||
|
|
|
@ -7,7 +7,7 @@ metadata:
|
|||
policies.kyverno.io/description: Linux allows defining fine-grained permissions using
|
||||
capabilities. With Kubernetes, it is possible to add capabilities that escalate the
|
||||
level of kernel access and allow other potentially dangerous behaviors. This policy
|
||||
enforces that pods cannot add new capabilities. Other policies can be used to set
|
||||
enforces that containers cannot add new capabilities. Other policies can be used to set
|
||||
default capabilities.
|
||||
spec:
|
||||
rules:
|
||||
|
@ -18,11 +18,7 @@ spec:
|
|||
- Pod
|
||||
validate:
|
||||
message: "New capabilities cannot be added"
|
||||
anyPattern:
|
||||
- spec:
|
||||
=(securityContext):
|
||||
=(capabilities):
|
||||
X(add): null
|
||||
pattern:
|
||||
- spec:
|
||||
containers:
|
||||
- name: "*"
|
||||
|
|
Loading…
Add table
Reference in a new issue