[stable/sonarqube] Make sure the sonarqube data directories have the right owner to be written to (#17001)

* Make sure the sonarqube data directories have the right owner to be written to

Signed-off-by: Gavin Mogan <git@gavinmogan.com>

* mkdir and chmod all the directories

Signed-off-by: Gavin Mogan <git@gavinmogan.com>

* Bump helm chart version

Signed-off-by: Gavin Mogan <git@gavinmogan.com>
This commit is contained in:
Gavin Mogan
2019-12-19 10:57:57 -08:00
committed by Kubernetes Prow Robot
parent 029e8783b7
commit 3f3edb98e4
2 changed files with 30 additions and 1 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
apiVersion: v1
name: sonarqube
description: Sonarqube is an open sourced code quality scanning tool
version: 3.2.6
version: 3.2.7
appVersion: 7.9.1
keywords:
- coverage
@@ -35,6 +35,35 @@ spec:
securityContext:
{{ toYaml .Values.securityContext | indent 8 }}
initContainers:
- name: chmod-volume-mounts
command:
- "sh"
- "-c"
- 'mkdir -p $(printf "/opt/sonarqube/${1-%s\n}" temp logs data extensions/downloads extensions/plugins/tmp extensions/plugins) &&
chown 999:999 -R $(printf "/opt/sonarqube/${1-%s\n}" temp logs data extensions/downloads extensions/plugins/tmp extensions/plugins)'
image: busybox:1.31
imagePullPolicy: IfNotPresent
securityContext:
privileged: true
volumeMounts:
- mountPath: /opt/sonarqube/temp
name: sonarqube
subPath: temp
- mountPath: /opt/sonarqube/logs
name: sonarqube
subPath: logs
- mountPath: /opt/sonarqube/data
name: sonarqube
subPath: data
- mountPath: /opt/sonarqube/extensions/plugins/tmp
name: sonarqube
subPath: tmp
- mountPath: /opt/sonarqube/extensions/downloads
name: sonarqube
subPath: downloads
- mountPath: /opt/sonarqube/extensions/plugins
name: sonarqube
subPath: plugins
{{- if .Values.elasticsearch.configureNode }}
- name: init-sysctl
image: {{ default "busybox:1.31" .Values.plugins.initSysctlContainerImage }}