Skip to content
This repository has been archived by the owner on Jun 24, 2022. It is now read-only.

Commit

Permalink
Merge pull request #290 from IPROVA/f-add_sc_to_wait-for-db
Browse files Browse the repository at this point in the history
Add securityContext to wait-for-db initContainer like the other initContainers
  • Loading branch information
rjkernick authored Aug 25, 2021
2 parents c3a9431 + 17eec78 commit d73a74c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions charts/sonarqube/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
2 changes: 1 addition & 1 deletion charts/sonarqube/Chart.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 4 additions & 0 deletions charts/sonarqube/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down

0 comments on commit d73a74c

Please sign in to comment.