Merge "[Portal] Remove hardcoded cassandra password"
[oom.git] / kubernetes / common / elasticsearch / components / curator / templates / podsecuritypolicy.yaml
1 {{/*
2 # Copyright © 2020 Bitnami, AT&T, Amdocs, Bell Canada, highstreet technologies
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
7 #
8 #       http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15 */}}
16 {{- if and .Values.enabled .Values.psp.create }}
17 apiVersion: policy/v1beta1
18 kind: PodSecurityPolicy
19 {{ $role := "curator" -}}
20 {{ $suffix := $role -}}
21 {{ $labels := (dict "role" $role) -}}
22 metadata: {{- include "common.resourceMetadata" (dict "suffix" $suffix "labels" $labels "dot" . )| nindent 2 }}
23 spec:
24   privileged: true
25   #requiredDropCapabilities:
26   volumes:
27     - 'configMap'
28     - 'secret'
29   hostNetwork: false
30   hostIPC: false
31   hostPID: false
32   runAsUser:
33     # Require the container to run without root privileges.
34     rule: 'MustRunAsNonRoot'
35   seLinux:
36     rule: 'RunAsAny'
37   supplementalGroups:
38     rule: 'MustRunAs'
39     ranges:
40       - min: 1
41         max: 65535
42   fsGroup:
43     rule: 'MustRunAs'
44     ranges:
45       - min: 1
46         max: 65535
47   readOnlyRootFilesystem: false
48 {{- end }}