mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
[stable/sonarqube] handle sonarqube 8 by using a variable for sonarqube directory name (#18561)
Signed-off-by: Ophélie Volga <ovolga@maisonsdumonde.com>
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
233530f176
commit
00b2d14bff
@@ -1,7 +1,7 @@
|
||||
apiVersion: v1
|
||||
name: sonarqube
|
||||
description: Sonarqube is an open sourced code quality scanning tool
|
||||
version: 3.2.5
|
||||
version: 3.2.6
|
||||
appVersion: 7.9.1
|
||||
keywords:
|
||||
- coverage
|
||||
|
||||
@@ -103,6 +103,7 @@ The following table lists the configurable parameters of the Sonarqube chart and
|
||||
| `plugins.initSysctlContainerImage` | Change init sysctl container image | `busybox:1.31` |
|
||||
| `plugins.deleteDefaultPlugins` | Remove default plugins and use plugins.install list | `[]` |
|
||||
| `podLabels` | Map of labels to add to the pods | `{}` |
|
||||
| `sonarqubeFolder` | Directory name of Sonarqube | `/opt/sonarqube` |
|
||||
|
||||
You can also configure values for the PostgreSQL / MySQL database via the Postgresql [README.md](https://github.com/kubernetes/charts/blob/master/stable/postgresql/README.md) / MySQL [README.md](https://github.com/kubernetes/charts/blob/master/stable/mysql/README.md)
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ metadata:
|
||||
heritage: {{ .Release.Service }}
|
||||
data:
|
||||
{{- if and .Values.sonarSecretKey (not .Values.sonarProperties) (not .Values.elasticsearch.bootstrapChecks) }}
|
||||
sonar.properties: sonar.secretKeyPath=/opt/sonarqube/secret/sonar-secret.txt
|
||||
sonar.properties: sonar.secretKeyPath={{ .Values.sonarqubeFolder }}/secret/sonar-secret.txt
|
||||
{{- end }}
|
||||
{{- if or .Values.sonarProperties (not .Values.elasticsearch.bootstrapChecks) }}
|
||||
sonar.properties:
|
||||
@@ -22,5 +22,5 @@ data:
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if and .Values.sonarSecretKey .Values.sonarProperties }}
|
||||
sonar.secretKeyPath=/opt/sonarqube/secret/sonar-secret.txt
|
||||
sonar.secretKeyPath={{ .Values.sonarqubeFolder }}/secret/sonar-secret.txt
|
||||
{{- end }}
|
||||
|
||||
@@ -11,12 +11,12 @@ data:
|
||||
copy_plugins.sh: |-
|
||||
#!/bin/bash
|
||||
{{- if .Values.plugins.deleteDefaultPlugins }}
|
||||
rm -f /opt/sonarqube/extensions/plugins/*.jar
|
||||
rm -f {{ .Values.sonarqubeFolder }}/extensions/plugins/*.jar
|
||||
{{- end }}
|
||||
for f in /opt/sonarqube/extensions/plugins/tmp/*.jar
|
||||
for f in {{ .Values.sonarqubeFolder }}/extensions/plugins/tmp/*.jar
|
||||
do
|
||||
file=${f##*/} && file=${file%-[0-9]*}
|
||||
for original in /opt/sonarqube/extensions/plugins/*.jar
|
||||
for original in {{ .Values.sonarqubeFolder }}/extensions/plugins/*.jar
|
||||
do
|
||||
originalfile=${original##*/} && originalfile=${originalfile%-[0-9]*}
|
||||
if [ "$originalfile" = "$file" ]; then
|
||||
@@ -24,7 +24,5 @@ data:
|
||||
fi
|
||||
done
|
||||
done
|
||||
cp /opt/sonarqube/extensions/plugins/tmp/*.jar /opt/sonarqube/extensions/plugins/
|
||||
/opt/sonarqube/bin/run.sh
|
||||
|
||||
|
||||
cp {{ .Values.sonarqubeFolder }}/extensions/plugins/tmp/*.jar {{ .Values.sonarqubeFolder }}/extensions/plugins/
|
||||
{{ .Values.sonarqubeFolder }}/bin/run.sh
|
||||
|
||||
@@ -56,15 +56,15 @@ spec:
|
||||
{{- end }}
|
||||
command: ["sh",
|
||||
"-c",
|
||||
"mkdir -p /opt/sonarqube/extensions/plugins/tmp &&
|
||||
rm -f /opt/sonarqube/extensions/plugins/tmp/* &&
|
||||
cp /tmp/scripts/install_plugins.sh /opt/sonarqube/extensions/plugins/tmp/install_plugins.sh &&
|
||||
chmod 0775 /opt/sonarqube/extensions/plugins/tmp/install_plugins.sh &&
|
||||
/opt/sonarqube/extensions/plugins/tmp/install_plugins.sh && pwd && ls -lah
|
||||
"mkdir -p {{ .Values.sonarqubeFolder }}/extensions/plugins/tmp &&
|
||||
rm -f {{ .Values.sonarqubeFolder }}/extensions/plugins/tmp/* &&
|
||||
cp /tmp/scripts/install_plugins.sh {{ .Values.sonarqubeFolder }}/extensions/plugins/tmp/install_plugins.sh &&
|
||||
chmod 0775 {{ .Values.sonarqubeFolder }}/extensions/plugins/tmp/install_plugins.sh &&
|
||||
{{ .Values.sonarqubeFolder }}/extensions/plugins/tmp/install_plugins.sh && pwd && ls -lah
|
||||
"
|
||||
]
|
||||
volumeMounts:
|
||||
- mountPath: /opt/sonarqube/extensions/plugins/tmp
|
||||
- mountPath: {{ .Values.sonarqubeFolder }}/extensions/plugins/tmp
|
||||
name: sonarqube
|
||||
subPath: tmp
|
||||
- name: install-plugins
|
||||
@@ -102,7 +102,7 @@ spec:
|
||||
"
|
||||
]
|
||||
volumeMounts:
|
||||
- mountPath: /tmp/props/sonar.properties
|
||||
- mountPath: /tmp/props/sonar.properties
|
||||
name: config
|
||||
subPath: sonar.properties
|
||||
- mountPath: /tmp/props/secret.properties
|
||||
@@ -169,14 +169,14 @@ spec:
|
||||
failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
|
||||
volumeMounts:
|
||||
{{- if and .Values.sonarProperties .Values.sonarSecretProperties }}
|
||||
- mountPath: /opt/sonarqube/conf/
|
||||
- mountPath: {{ .Values.sonarqubeFolder }}/conf/
|
||||
name: concat-dir
|
||||
{{- else if or .Values.sonarProperties (not .Values.elasticsearch.bootstrapChecks) }}
|
||||
- mountPath: /opt/sonarqube/conf/
|
||||
- mountPath: {{ .Values.sonarqubeFolder }}/conf/
|
||||
name: config
|
||||
{{- end }}
|
||||
{{- if .Values.sonarSecretKey }}
|
||||
- mountPath: /opt/sonarqube/secret/
|
||||
- mountPath: {{ .Values.sonarqubeFolder }}/secret/
|
||||
name: secret
|
||||
{{- end }}
|
||||
{{- if .Values.customCerts.enabled }}
|
||||
@@ -184,22 +184,22 @@ spec:
|
||||
subPath: cacerts
|
||||
name: cacerts
|
||||
{{- end }}
|
||||
- mountPath: /opt/sonarqube/data
|
||||
- mountPath: {{ .Values.sonarqubeFolder }}/data
|
||||
name: sonarqube
|
||||
subPath: data
|
||||
- mountPath: /opt/sonarqube/extensions/plugins/tmp
|
||||
- mountPath: {{ .Values.sonarqubeFolder }}/extensions/plugins/tmp
|
||||
name: sonarqube
|
||||
subPath: tmp
|
||||
- mountPath: /opt/sonarqube/extensions/downloads
|
||||
- mountPath: {{ .Values.sonarqubeFolder }}/extensions/downloads
|
||||
name: sonarqube
|
||||
subPath: downloads
|
||||
- mountPath: /opt/sonarqube/extensions/plugins
|
||||
- mountPath: {{ .Values.sonarqubeFolder }}/extensions/plugins
|
||||
name: sonarqube
|
||||
subPath: plugins
|
||||
- mountPath: /opt/sonarqube/temp
|
||||
- mountPath: {{ .Values.sonarqubeFolder }}/temp
|
||||
name: sonarqube
|
||||
subPath: temp
|
||||
- mountPath: /opt/sonarqube/logs
|
||||
- mountPath: {{ .Values.sonarqubeFolder }}/logs
|
||||
name: sonarqube
|
||||
subPath: logs
|
||||
- mountPath: /tmp
|
||||
|
||||
@@ -9,7 +9,7 @@ metadata:
|
||||
heritage: {{ .Release.Service }}
|
||||
data:
|
||||
install_plugins.sh: |-
|
||||
cd /opt/sonarqube/extensions/plugins/tmp
|
||||
cd {{ .Values.sonarqubeFolder }}/extensions/plugins/tmp
|
||||
{{- if .Values.plugins.install }}
|
||||
{{- range $index, $val := .Values.plugins.install }}
|
||||
wget {{ $val }} --no-check-certificate
|
||||
|
||||
@@ -215,3 +215,5 @@ mysql:
|
||||
# podLabels:
|
||||
# key: value
|
||||
podLabels: {}
|
||||
# For compatibility with 8.0 replace by "/opt/sq"
|
||||
sonarqubeFolder: /opt/sonarqube
|
||||
|
||||
Reference in New Issue
Block a user