diff --git a/stable/sonarqube/Chart.yaml b/stable/sonarqube/Chart.yaml index 34ec718139..7026056699 100644 --- a/stable/sonarqube/Chart.yaml +++ b/stable/sonarqube/Chart.yaml @@ -1,6 +1,6 @@ name: sonarqube description: Sonarqube is an open sourced code quality scanning tool -version: 0.13.5 +version: 0.14.0 appVersion: 7.6 keywords: - coverage diff --git a/stable/sonarqube/README.md b/stable/sonarqube/README.md index eed19ad192..fde78b6233 100644 --- a/stable/sonarqube/README.md +++ b/stable/sonarqube/README.md @@ -46,6 +46,7 @@ The following table lists the configurable parameters of the Sonarqube chart and | `command` | command to run in the container | `nil` (need to be set prior to 6.7.6, and 7.4) | | `securityContext.fsGroup` | Group applied to mounted directories/files| `999` | | `ingress.enabled` | Flag for enabling ingress | false | +| `ingress.labels` | Ingress additional labels | `{}` | | `livenessProbe.sonarWebContext` | SonarQube web context for livenessProbe | / | | `readinessProbe.sonarWebContext` | SonarQube web context for readinessProbe | / | | `service.type` | Kubernetes service type | `LoadBalancer` | @@ -81,6 +82,8 @@ The following table lists the configurable parameters of the Sonarqube chart and | `tolerations` | List of node taints to tolerate | `[]` | | `plugins.install` | List of plugins to install | `[]` | | `plugins.resources` | Plugin Pod resource requests & limits | `{}` | +| `plugins.initContainerImage` | Change init container image | `[]` | +| `plugins.deleteDefaultPlugins` | Remove default plugins and use plugins.install list | `[]` | 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) diff --git a/stable/sonarqube/templates/copy-plugins.yaml b/stable/sonarqube/templates/copy-plugins.yaml index f06c8157ab..7293c4f094 100644 --- a/stable/sonarqube/templates/copy-plugins.yaml +++ b/stable/sonarqube/templates/copy-plugins.yaml @@ -10,6 +10,9 @@ metadata: data: copy_plugins.sh: |- #! /bin/sh + {{- if .Values.plugins.deleteDefaultPlugins }} + rm -f /opt/sonarqube/extensions/plugins/*.jar + {{- end }} cp /opt/sonarqube/extensions/plugins/tmp/*.jar /opt/sonarqube/extensions/plugins/ /opt/sonarqube/bin/run.sh diff --git a/stable/sonarqube/templates/deployment.yaml b/stable/sonarqube/templates/deployment.yaml index 18ca243652..688bc1b475 100644 --- a/stable/sonarqube/templates/deployment.yaml +++ b/stable/sonarqube/templates/deployment.yaml @@ -20,7 +20,7 @@ spec: {{- if .Values.plugins.install }} initContainers: - name: install-plugins - image: joosthofman/wget:1.0 + image: {{ default "joosthofman/wget:1.0" .Values.plugins.initContainerImage }} env: {{- range $key, $value := .Values.extraEnv }} - name: {{ $key }} diff --git a/stable/sonarqube/templates/ingress.yaml b/stable/sonarqube/templates/ingress.yaml index 8c349f03e3..ae602f61b4 100644 --- a/stable/sonarqube/templates/ingress.yaml +++ b/stable/sonarqube/templates/ingress.yaml @@ -10,7 +10,10 @@ metadata: chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} release: {{ .Release.Name }} heritage: {{ .Release.Service }} -{{ if .Values.ingress.annotations}} +{{- if .Values.ingress.labels }} +{{ .Values.ingress.labels | toYaml | trimSuffix "\n"| indent 4 -}} +{{- end}} +{{- if .Values.ingress.annotations}} annotations: {{- range $key, $value := .Values.ingress.annotations }} {{ $key }}: {{ $value | quote }} diff --git a/stable/sonarqube/values.yaml b/stable/sonarqube/values.yaml index c3415bef7b..4bbfece514 100755 --- a/stable/sonarqube/values.yaml +++ b/stable/sonarqube/values.yaml @@ -34,6 +34,11 @@ ingress: # kubernetes.io/tls-acme: "true" # This property allows for reports up to a certain size to be uploaded to SonarQube # nginx.ingress.kubernetes.io/proxy-body-size: "8m" + +# Additional labels for Ingress manifest file + # labels: + # traffic-type: external + # traffic-type: internal tls: {} # Secrets must be manually created in the namespace. # - secretName: chart-example-tls @@ -103,6 +108,9 @@ persistence: # - "https://github.com/SonarSource/sonar-ldap/releases/download/2.2-RC3/sonar-ldap-plugin-2.2.0.601.jar" plugins: install: [] + + # initContainerImage: alpine:3.9 + # deleteDefaultPlugins: true resources: {} # We allow the plugins init container to have a separate resources declaration because # the initContainer does not take as much resources.