Skip to content

Commit

Permalink
scc changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mtcolman committed Nov 13, 2020
1 parent 7806492 commit ba322d8
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 88 deletions.
15 changes: 0 additions & 15 deletions charts/sonarqube/templates/serviceaccount-initsysctl.yaml

This file was deleted.

58 changes: 0 additions & 58 deletions charts/sonarqube/templates/sonarqube-init-scc.yaml

This file was deleted.

16 changes: 6 additions & 10 deletions charts/sonarqube/templates/sonarqube-scc.yaml
Original file line number Diff line number Diff line change
@@ -1,29 +1,25 @@
{{- if and (.Values.OpenShift.enabled) (.Values.OpenShift.createSCC) }}

# This SCC allows any user ID except root
# This SCC allows any user ID but restricts capabilties and host access
apiVersion: security.openshift.io/v1
kind: SecurityContextConstraints
metadata:
annotations:
kubernetes.io/description: "nonroot provides all features of the restricted SCC
but allows users to run with any non-root UID. The user must specify the UID
or it must be specified on the by the manifest of the container runtime."
kubernetes.io/description: "allows pod to run as root, privileged and run sysctl"
"helm.sh/hook": pre-install
name: {{ .Release.Name }}-nonroot-scc
name: {{ .Release.Name }}-privileged-scc
allowHostDirVolumePlugin: false
allowHostIPC: false
allowHostNetwork: false
allowHostPID: false
allowHostPorts: false
allowPrivilegedContainer: false
allowPrivilegedContainer: true
allowPrivilegeEscalation: true
allowedCapabilities: []
allowedFlexVolumes: []
allowedUnsafeSysctls: []
defaultAddCapabilities: []
defaultAllowPrivilegeEscalation: true
forbiddenSysctls:
- "*"
fsGroup:
type: RunAsAny
readOnlyRootFilesystem: false
Expand All @@ -33,7 +29,7 @@ requiredDropCapabilities:
- SETUID
- SETGID
runAsUser:
type: MustRunAsNonRoot
type: RunAsAny
# This can be customized for your host machine
seLinuxContext:
type: MustRunAs
Expand Down Expand Up @@ -62,4 +58,4 @@ users:
{{- end }}
- system:serviceaccount:{{ .Release.Namespace }}:{{ .Release.Name }}-postgresql

{{- end }}
{{- end }}
5 changes: 0 additions & 5 deletions charts/sonarqube/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -134,14 +134,9 @@ initSysctl:
nofile: 131072
nproc: 8192
# image: busybox:1.32
serviceAccount:
create: false
# name:
securityContext:
privileged: true
# resources: {}
job:
restartPolicy: OnFailure

# List of plugins to install.
# For example:
Expand Down

0 comments on commit ba322d8

Please sign in to comment.