rancher-partner-charts/charts/dynatrace/dynatrace-operator/templates/Openshift/operator/securitycontextconstraints....

49 lines
1.4 KiB
YAML

{{- if and (eq (include "dynatrace-operator.platform" .) "openshift") ((.Values.securityContextConstraints).enabled) (eq (include "dynatrace-operator.partial" .) "false")}}
# Copyright 2021 Dynatrace LLC
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: security.openshift.io/v1
kind: SecurityContextConstraints
metadata:
name: {{ .Release.Name }}
labels:
{{- include "dynatrace-operator.operatorLabels" . | nindent 4 }}
allowPrivilegedContainer: false
fsGroup:
type: RunAsAny
priority: 1
readOnlyRootFilesystem: true
requiredDropCapabilities:
- ALL
runAsUser:
type: MustRunAsNonRoot
seLinuxContext:
type: RunAsAny
seccompProfiles:
- "*"
supplementalGroups:
type: RunAsAny
users:
- system:serviceaccount:{{ .Release.Namespace }}:{{ .Release.Name }}
volumes:
- "*"
allowHostDirVolumePlugin: false
allowHostIPC: false
allowHostNetwork: false
allowHostPID: false
allowHostPorts: false
allowedFlexVolumes: null
defaultAddCapabilities: []
{{ end }}