2020-01-21 08:22:43 +00:00
|
|
|
{{- 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
|
2022-02-04 11:18:59 +00:00
|
|
|
hostPorts:
|
|
|
|
- min: {{ .Values.nodeplugin.httpMetrics.containerPort }}
|
|
|
|
max: {{ .Values.nodeplugin.httpMetrics.containerPort }}
|
2020-01-21 08:22:43 +00:00
|
|
|
hostPID: true
|
|
|
|
runAsUser:
|
|
|
|
rule: RunAsAny
|
|
|
|
seLinux:
|
|
|
|
rule: RunAsAny
|
|
|
|
supplementalGroups:
|
|
|
|
rule: RunAsAny
|
|
|
|
volumes:
|
|
|
|
- 'configMap'
|
|
|
|
- 'emptyDir'
|
|
|
|
- 'projected'
|
|
|
|
- 'secret'
|
|
|
|
- 'hostPath'
|
|
|
|
allowedHostPaths:
|
|
|
|
- pathPrefix: '/dev'
|
|
|
|
readOnly: false
|
2020-01-23 08:29:53 +00:00
|
|
|
- pathPrefix: '/run/mount'
|
|
|
|
readOnly: false
|
2020-01-21 08:22:43 +00:00
|
|
|
- pathPrefix: '/sys'
|
|
|
|
readOnly: false
|
2022-02-15 23:13:39 +00:00
|
|
|
{{- if .Values.selinuxMount }}
|
2021-08-02 14:57:11 +00:00
|
|
|
- pathPrefix: '/etc/selinux'
|
|
|
|
readOnly: true
|
2022-02-15 23:13:39 +00:00
|
|
|
{{- end }}
|
2020-01-21 08:22:43 +00:00
|
|
|
- pathPrefix: '/lib/modules'
|
|
|
|
readOnly: true
|
2021-09-01 12:24:42 +00:00
|
|
|
- pathPrefix: '{{ .Values.cephLogDirHostPath }}'
|
2021-08-12 13:07:54 +00:00
|
|
|
readOnly: false
|
2020-11-27 14:23:35 +00:00
|
|
|
- pathPrefix: '{{ .Values.kubeletDir }}'
|
2020-01-21 08:22:43 +00:00
|
|
|
readOnly: false
|
|
|
|
{{- end }}
|