Collectd operator utilties
[demo.git] / vnfs / DAaaS / deploy / collection / charts / prometheus-node-exporter / templates / psp.yaml
1 {{- if .Values.rbac.create }}
2 {{- if .Values.rbac.pspEnabled }}
3 apiVersion: extensions/v1beta1
4 kind: PodSecurityPolicy
5 metadata:
6   labels: {{ include "prometheus-node-exporter.labels" . | indent 4 }}
7   name: {{ template "prometheus-node-exporter.fullname" . }}
8 spec:
9   privileged: false
10   # Required to prevent escalations to root.
11   # allowPrivilegeEscalation: false
12   # This is redundant with non-root + disallow privilege escalation,
13   # but we can provide it for defense in depth.
14   #requiredDropCapabilities:
15   #  - ALL
16   # Allow core volume types.
17   volumes:
18     - 'configMap'
19     - 'emptyDir'
20     - 'projected'
21     - 'secret'
22     - 'downwardAPI'
23     - 'persistentVolumeClaim'
24     - 'hostPath'
25   hostNetwork: true
26   hostIPC: false
27   hostPID: true
28   hostPorts:
29     - min: 0
30       max: 65535
31   runAsUser:
32     # Permits the container to run with root privileges as well.
33     rule: 'RunAsAny'
34   seLinux:
35     # This policy assumes the nodes are using AppArmor rather than SELinux.
36     rule: 'RunAsAny'
37   supplementalGroups:
38     rule: 'MustRunAs'
39     ranges:
40       # Forbid adding the root group.
41       - min: 0
42         max: 65535
43   fsGroup:
44     rule: 'MustRunAs'
45     ranges:
46       # Forbid adding the root group.
47       - min: 0
48         max: 65535
49   readOnlyRootFilesystem: false
50 {{- end }}
51 {{- end }}