디렉토리 구조 및 각 서비스 추가
This commit is contained in:
32
helm/openebs/templates/kyverno/allow-host-namespaces.yaml
Normal file
32
helm/openebs/templates/kyverno/allow-host-namespaces.yaml
Normal file
@@ -0,0 +1,32 @@
|
||||
{{- if .Values.rbac.kyvernoEnabled }}
|
||||
apiVersion: kyverno.io/v1
|
||||
kind: Policy
|
||||
metadata:
|
||||
name: allow-host-namespaces
|
||||
annotations:
|
||||
policies.kyverno.io/category: Pod Security Standards
|
||||
policies.kyverno.io/severity: medium
|
||||
policies.kyverno.io/subject: Pod
|
||||
policies.kyverno.io/description: >-
|
||||
Host namespaces (Process ID namespace, Inter-Process Communication namespace, and
|
||||
network namespace) allow access to shared information and can be used to elevate
|
||||
privileges. Pods should allowed access to host namespaces.
|
||||
spec:
|
||||
validationFailureAction: enforce
|
||||
background: true
|
||||
rules:
|
||||
- name: host-namespaces
|
||||
match:
|
||||
resources:
|
||||
kinds:
|
||||
- Pod
|
||||
validate:
|
||||
message: >-
|
||||
Sharing the host namespaces is allowed. The fields spec.hostNetwork,
|
||||
spec.hostIPC, and spec.hostPID must be set to true.
|
||||
pattern:
|
||||
spec:
|
||||
=(hostPID): "true"
|
||||
=(hostIPC): "true"
|
||||
=(hostNetwork): "true"
|
||||
{{- end }}
|
||||
Reference in New Issue
Block a user