diff --git a/charts/sonarqube/CHANGELOG.md b/charts/sonarqube/CHANGELOG.md index e5cfbba..c6851ba 100644 --- a/charts/sonarqube/CHANGELOG.md +++ b/charts/sonarqube/CHANGELOG.md @@ -1,6 +1,9 @@ # SonarQube Chart Changelog All changes to this chart will be documented in this file. +## [9.2.2] +* Added a condition to deployment.yaml so that `wait-for-db` initContainer is only created if `postgresql.enabled=true` + ## [9.2.1] * Updated the configuration table to include the additional keys added in release 9.2.0. diff --git a/charts/sonarqube/Chart.yaml b/charts/sonarqube/Chart.yaml index d1fa423..7ce9da9 100644 --- a/charts/sonarqube/Chart.yaml +++ b/charts/sonarqube/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 name: sonarqube description: SonarQube is an open sourced code quality scanning tool -version: 9.2.1 +version: 9.2.2 appVersion: 8.5.1-community keywords: - coverage diff --git a/charts/sonarqube/templates/deployment.yaml b/charts/sonarqube/templates/deployment.yaml index 6a759f3..bf128b8 100644 --- a/charts/sonarqube/templates/deployment.yaml +++ b/charts/sonarqube/templates/deployment.yaml @@ -157,12 +157,14 @@ spec: {{- . | toYaml | trim | nindent 12 }} {{- end }} {{- end }} + {{- if .Values.postgresql.enabled }} - name: "wait-for-db" image: {{ default "busybox:1.32" .Values.initContainers.image }} imagePullPolicy: {{ .Values.image.pullPolicy }} resources: {{ toYaml .Values.initContainers.resources | indent 12 }} - command: ["/bin/sh", "-c", "for i in $(seq 1 200); do nc -z -w3 {{ .Release.Name}}-postgresql 5432 && exit 0 || sleep 2; done; exit 1"] + command: ["/bin/sh", "-c", "for i in $(seq 1 200); do nc -z -w3 {{ .Release.Name}}-postgresql 5432 && exit 0 || sleep 2; done; exit 1"] + {{- end }} {{- if .Values.priorityClassName }} priorityClassName: {{ .Values.priorityClassName }} {{- end }}