Use sonarProperties variable as dict (#14223)

Signed-off-by: Roman Komkov <r.komkov@gmail.com>
This commit is contained in:
Roman
2019-06-17 13:52:18 -07:00
committed by Kubernetes Prow Robot
parent a56fc05409
commit c64bdd850f
4 changed files with 11 additions and 8 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
apiVersion: v1
name: sonarqube
description: Sonarqube is an open sourced code quality scanning tool
version: 1.1.1
version: 2.0.0
appVersion: 7.7
keywords:
- coverage
+1
View File
@@ -65,6 +65,7 @@ The following table lists the configurable parameters of the Sonarqube chart and
| `customCerts.enabled` | Use `customCerts.secretName` | false |
| `customCerts.secretName` | Name of the secret which conatins your `cacerts` | false |
| `sonarSecretKey` | Name of existing secret used for settings encryption | None |
| `sonarProperties` | Custom `sonar.properties` file | `{}` |
| `database.type` | Set to "mysql" to use mysql database | `postgresql`|
| `postgresql.enabled` | Set to `false` to use external server / mysql database | `true` |
| `postgresql.postgresServer` | Hostname of the external Postgresql server| `null` |
+4 -2
View File
@@ -10,11 +10,13 @@ metadata:
heritage: {{ .Release.Service }}
data:
{{- if and .Values.sonarSecretKey (not .Values.sonarProperties) }}
sonar.properties: sonar.secretKeyPath=/opt/sonarqube/secret/sonar-secret.txt
sonar.properties: sonar.secretKeyPath=/opt/sonarqube/secret/sonar-secret.txt
{{- end }}
{{- if .Values.sonarProperties }}
sonar.properties:
{{ toYaml .Values.sonarProperties | indent 4 }}
{{ range $key, $val := .Values.sonarProperties }}
{{ $key }}={{ $val }}
{{ end }}
{{- end }}
{{- if and .Values.sonarSecretKey .Values.sonarProperties }}
sonar.secretKeyPath=/opt/sonarqube/secret/sonar-secret.txt
+5 -5
View File
@@ -131,12 +131,12 @@ plugins:
# We allow the plugins init container to have a separate resources declaration because
# the initContainer does not take as much resources.
# A custom sonar.properties file can be provided using a multiline YAML string.
# A custom sonar.properties file can be provided via dictionary.
# For example:
# sonarProperties: |
# sonar.forceAuthentication=true
# sonar.security.realm=LDAP
# ldap.url=ldaps://organization.com
# sonarProperties:
# sonar.forceAuthentication: true
# sonar.security.realm: LDAP
# ldap.url: ldaps://organization.com
# Kubernetes secret that contains the encryption key for the sonarqube instance.
# The secret must contain the key 'sonar-secret.txt'.