Skip to content

Commit

Permalink
[bitnami/sonarqube] Restore volumePermissions.containerSecurityContex…
Browse files Browse the repository at this point in the history
…t.enabled

Signed-off-by: Miguel Ruiz <[email protected]>
  • Loading branch information
migruiz4 committed Jun 12, 2024
1 parent 9e221e9 commit b8d08e6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bitnami/sonarqube/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,9 @@ spec:
- -ec
- |
find /bitnami/sonarqube -mindepth 1 -maxdepth 1 -not -name ".snapshot" -not -name "lost+found" | xargs -r chown -R {{ .Values.containerSecurityContext.runAsUser }}:{{ .Values.podSecurityContext.fsGroup }}
{{- if .Values.volumePermissions.containerSecurityContext.enabled }}
securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.volumePermissions.containerSecurityContext "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.volumePermissions.resources }}
resources: {{- toYaml .Values.volumePermissions.resources | nindent 12 }}
{{- else if ne .Values.volumePermissions.resourcesPreset "none" }}
Expand Down
2 changes: 2 additions & 0 deletions bitnami/sonarqube/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -943,13 +943,15 @@ volumePermissions:
resources: {}
## Init container Container Security Context
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container
## @param volumePermissions.containerSecurityContext.enabled Enable init container's Security Context
## @param volumePermissions.containerSecurityContext.seLinuxOptions [object,nullable] Set SELinux options in container
## @param volumePermissions.containerSecurityContext.runAsUser Set init container's Security Context runAsUser
## NOTE: when runAsUser is set to special value "auto", init container will try to chown the
## data folder to auto-determined user&group, using commands: `id -u`:`id -G | cut -d" " -f2`
## "auto" is especially useful for OpenShift which has scc with dynamic user ids (and 0 is not allowed)
##
containerSecurityContext:
enabled: true
seLinuxOptions: {}
runAsUser: 0
## @section Sysctl Image parameters
Expand Down

0 comments on commit b8d08e6

Please sign in to comment.