From 3524018e09e174c805d616389e83b33f4ef958ee Mon Sep 17 00:00:00 2001 From: Guillaume Perrin Date: Mon, 7 Jan 2019 15:53:47 +0100 Subject: [PATCH] [stable/sonarqube] Fix mount of configMap (#10061) * [stable/sonarqube] Fix mount of configMap We do not override anymore the startup command, so we have to mount the sonar.properties directly instead of copying from /tmp/ Signed-off-by: Guillaume Perrin * Update sonarqube version to 0.12.2 Signed-off-by: Guillaume Perrin * Remove mount of startup volume Signed-off-by: Guillaume Perrin --- stable/sonarqube/Chart.yaml | 2 +- stable/sonarqube/templates/deployment.yaml | 21 +++++-------------- .../sonarqube/templates/startup-config.yaml | 17 --------------- 3 files changed, 6 insertions(+), 34 deletions(-) delete mode 100644 stable/sonarqube/templates/startup-config.yaml diff --git a/stable/sonarqube/Chart.yaml b/stable/sonarqube/Chart.yaml index 9dd822dd0e..1f5bb3f072 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.12.1 +version: 0.12.2 appVersion: 7.4 keywords: - coverage diff --git a/stable/sonarqube/templates/deployment.yaml b/stable/sonarqube/templates/deployment.yaml index 28fa5aff2f..423bd47c95 100644 --- a/stable/sonarqube/templates/deployment.yaml +++ b/stable/sonarqube/templates/deployment.yaml @@ -113,15 +113,10 @@ spec: periodSeconds: {{ .Values.readinessProbe.periodSeconds }} failureThreshold: {{ .Values.readinessProbe.failureThreshold }} volumeMounts: - - mountPath: /opt/sonarqube/conf - name: sonarqube - subPath: conf - - mountPath: /tmp-script/ - name: startup {{- if .Values.sonarProperties }} - - name: config - mountPath: /tmp/conf/ - {{- end}} + - mountPath: /opt/sonarqube/conf/ + name: config + {{- end }} - mountPath: /opt/sonarqube/data name: sonarqube subPath: data @@ -145,7 +140,7 @@ spec: {{ toYaml .Values.affinity | indent 8 }} {{- end }} volumes: - {{- if .Values.sonarProperties}} + {{- if .Values.sonarProperties }} - name: config configMap: name: {{ template "sonarqube.fullname" . }}-config @@ -165,13 +160,7 @@ spec: defaultMode: 0755 items: - key: copy_plugins.sh - path: copy_plugins.sh - - name: startup - configMap: - name: {{ template "sonarqube.fullname" . }}-startup - items: - - key: startup.sh - path: startup.sh + path: copy_plugins.sh - name: sonarqube {{- if .Values.persistence.enabled }} persistentVolumeClaim: diff --git a/stable/sonarqube/templates/startup-config.yaml b/stable/sonarqube/templates/startup-config.yaml deleted file mode 100644 index 5376551658..0000000000 --- a/stable/sonarqube/templates/startup-config.yaml +++ /dev/null @@ -1,17 +0,0 @@ - -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "sonarqube.fullname" . }}-startup - labels: - app: {{ template "sonarqube.name" . }} - chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -data: - startup.sh: |- - #! /bin/sh - if [ -e /tmp/conf/sonar.properties ]; then - cp /tmp/conf/sonar.properties /opt/sonarqube/conf/sonar.properties - fi - /opt/sonarqube/bin/run.sh