From 1c2c7760d8f6a16dd4a3ca398ce51edebfc5300f Mon Sep 17 00:00:00 2001 From: lepouletsuisse Date: Fri, 25 Jun 2021 14:29:43 +0200 Subject: [PATCH 1/2] Add securityContext to wait-for-db initContainer like the other initContainers --- charts/sonarqube/CHANGELOG.md | 3 +++ charts/sonarqube/templates/deployment.yaml | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/charts/sonarqube/CHANGELOG.md b/charts/sonarqube/CHANGELOG.md index bfcba4d..fde4564 100644 --- a/charts/sonarqube/CHANGELOG.md +++ b/charts/sonarqube/CHANGELOG.md @@ -1,5 +1,8 @@ # SonarQube Chart Changelog All changes to this chart will be documented in this file. +## [9.x.x] +* Use the `initContainers.securityContext` to also set the security context of the `wait-for-db` init container. + ## [9.6.3] * Fixed GH-277 by ensuring current/new admin passwords are URL escaped in the change-admin-password-hook job. diff --git a/charts/sonarqube/templates/deployment.yaml b/charts/sonarqube/templates/deployment.yaml index 3d21340..2ba9d7b 100644 --- a/charts/sonarqube/templates/deployment.yaml +++ b/charts/sonarqube/templates/deployment.yaml @@ -168,6 +168,10 @@ spec: - name: "wait-for-db" image: {{ default "busybox:1.32" .Values.initContainers.image }} imagePullPolicy: {{ .Values.image.pullPolicy }} + {{- if $securityContext := .Values.initContainers.securityContext }} + securityContext: +{{ toYaml $securityContext | indent 12 }} + {{- end }} 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"] From 17eec7899909f28d4a9d0483a91c218101c795e3 Mon Sep 17 00:00:00 2001 From: lepouletsuisse Date: Wed, 14 Jul 2021 10:35:35 +0200 Subject: [PATCH 2/2] Incremented Sonarqube Helm Chart version --- charts/sonarqube/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/sonarqube/Chart.yaml b/charts/sonarqube/Chart.yaml index 868e593..3bfd735 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.6.4 +version: 9.6.5 appVersion: 8.5.1-community keywords: - coverage