Skip to content

Commit

Permalink
get postgres to run under restricted
Browse files Browse the repository at this point in the history
  • Loading branch information
mtcolman committed Nov 13, 2020
1 parent ba322d8 commit 74653ff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions charts/sonarqube/templates/sonarqube-scc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ users:
{{- else }}
- system:serviceaccount:{{ .Release.Namespace }}:{{ .Release.Name }}-sonarqube
{{- end }}
{{- if .Values.postgresql.securityContext.enabled }}
- system:serviceaccount:{{ .Release.Namespace }}:{{ .Release.Name }}-postgresql
{{- end }}

{{- end }}
4 changes: 2 additions & 2 deletions charts/sonarqube/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ postgresql:
storageClass:
securityContext:
# enabled needs to false for OpenShift restricted SCC and true for OpenShift anyuid/nonroot SCC
enabled: true
enabled: false
#fsGroup and runAsUser specifications below are not applied if enabled=false. enabled=false is the required setting for OpenShift "restricted SCC" to work successfully.
#postgresql dockerfile sets user as 1001
fsGroup: 1001
Expand All @@ -273,7 +273,7 @@ postgresql:
enabled: true
# if using restricted SCC set runAsUser: "auto" and if running under anyuid/nonroot SCC - runAsUser needs to match runAsUser above
securityContext:
runAsUser: 1001
runAsUser: "auto"
shmVolume:
chmod:
enabled: false
Expand Down

0 comments on commit 74653ff

Please sign in to comment.