mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-23 06:40:23 +00:00
0be7024726
Problem: -------- 1. rbd-nbd by default logs to /var/log/ceph/ceph-client.admin.log, Unfortunately, container doesn't have /var/log/ceph directory hence rbd-nbd is not logging now. 2. Rbd-nbd logs are not persistent across nodeplugin restarts. Solution: -------- Provide a host path so that log directory is made available, and the logs persist on the hostnode across container restarts. Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
50 lines
1.2 KiB
YAML
50 lines
1.2 KiB
YAML
{{- if .Values.nodeplugin.podSecurityPolicy.enabled -}}
|
|
apiVersion: policy/v1beta1
|
|
kind: PodSecurityPolicy
|
|
metadata:
|
|
name: {{ include "ceph-csi-rbd.nodeplugin.fullname" . }}
|
|
labels:
|
|
app: {{ include "ceph-csi-rbd.name" . }}
|
|
chart: {{ include "ceph-csi-rbd.chart" . }}
|
|
component: {{ .Values.nodeplugin.name }}
|
|
release: {{ .Release.Name }}
|
|
heritage: {{ .Release.Service }}
|
|
spec:
|
|
allowPrivilegeEscalation: true
|
|
allowedCapabilities:
|
|
- 'SYS_ADMIN'
|
|
fsGroup:
|
|
rule: RunAsAny
|
|
privileged: true
|
|
hostNetwork: true
|
|
hostPID: true
|
|
runAsUser:
|
|
rule: RunAsAny
|
|
seLinux:
|
|
rule: RunAsAny
|
|
supplementalGroups:
|
|
rule: RunAsAny
|
|
volumes:
|
|
- 'configMap'
|
|
- 'emptyDir'
|
|
- 'projected'
|
|
- 'secret'
|
|
- 'downwardAPI'
|
|
- 'hostPath'
|
|
allowedHostPaths:
|
|
- pathPrefix: '/dev'
|
|
readOnly: false
|
|
- pathPrefix: '/run/mount'
|
|
readOnly: false
|
|
- pathPrefix: '/sys'
|
|
readOnly: false
|
|
- pathPrefix: '/etc/selinux'
|
|
readOnly: true
|
|
- pathPrefix: '/lib/modules'
|
|
readOnly: true
|
|
- pathPrefix: '/var/log/ceph'
|
|
readOnly: false
|
|
- pathPrefix: '{{ .Values.kubeletDir }}'
|
|
readOnly: false
|
|
{{- end }}
|