Skip to content

Commit cbc0685

Browse files
davividaljCOTINEAU
authored andcommitted
SONAR-22528 Helm env valuesFrom regression
* SONAR-22528 Fixes env valuesFrom regression * Updates changelogs * Updates changelogs
1 parent 31d3fac commit cbc0685

File tree

3 files changed

+9
-24
lines changed

3 files changed

+9
-24
lines changed

charts/sonarqube/CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ All changes to this chart will be documented in this file.
44
## [10.6.1]
55
* Update Chart's version to 10.6.1
66
* Fix a typo in the new common STS template
7+
* Fix regression on env valuesFrom in the new STS template
78

89
## [10.6.0]
910
* Update SonarQube to 10.6.0

charts/sonarqube/Chart.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ annotations:
3636
description: "Update Chart's version to 10.6.1"
3737
- kind: fixed
3838
description: "Fix typo in the new STS template"
39+
- kind: fixed
40+
description: "Fix regression on env valuesFrom in the new STS template"
3941
artifacthub.io/containsSecurityUpdates: "false"
4042
artifacthub.io/images: |
4143
- name: sonarqube

charts/sonarqube/templates/_pod.tpl

+6-24
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,7 @@ spec:
6969
- mountPath: /tmp/secrets/ca-certs
7070
name: ca-certs
7171
env:
72-
{{- range (include "sonarqube.combined_env" . | fromJsonArray) }}
73-
- name: {{ .name }}
74-
value: {{ .value | quote }}
75-
{{- end }}
72+
{{- (include "sonarqube.combined_env" . | fromJsonArray) | toYaml | trim | nindent 8 }}
7673
{{- end }}
7774
{{- if or .Values.initSysctl.enabled .Values.elasticsearch.configureNode }}
7875
- name: init-sysctl
@@ -89,10 +86,7 @@ spec:
8986
- name: init-sysctl
9087
mountPath: /tmp/scripts/
9188
env:
92-
{{- range (include "sonarqube.combined_env" . | fromJsonArray) }}
93-
- name: {{ .name }}
94-
value: {{ .value | quote }}
95-
{{- end }}
89+
{{- (include "sonarqube.combined_env" . | fromJsonArray) | toYaml | trim | nindent 8 }}
9690
{{- end }}
9791
{{- if or .Values.sonarProperties .Values.sonarSecretProperties .Values.sonarSecretKey (not .Values.elasticsearch.bootstrapChecks) }}
9892
- name: concat-properties
@@ -132,10 +126,7 @@ spec:
132126
resources: {{- toYaml . | nindent 8 }}
133127
{{- end }}
134128
env:
135-
{{- range (include "sonarqube.combined_env" . | fromJsonArray) }}
136-
- name: {{ .name }}
137-
value: {{ .value | quote }}
138-
{{- end }}
129+
{{- (include "sonarqube.combined_env" . | fromJsonArray) | toYaml | trim | nindent 8 }}
139130
{{- end }}
140131
{{- if .Values.prometheusExporter.enabled }}
141132
- name: inject-prometheus-exporter
@@ -160,10 +151,7 @@ spec:
160151
value: {{ default "" .Values.prometheusExporter.httpsProxy }}
161152
- name: no_proxy
162153
value: {{ default "" .Values.prometheusExporter.noProxy }}
163-
{{- range (include "sonarqube.combined_env" . | fromJsonArray) }}
164-
- name: {{ .name }}
165-
value: {{ .value | quote }}
166-
{{- end }}
154+
{{- (include "sonarqube.combined_env" . | fromJsonArray) | toYaml | trim | nindent 8 }}
167155
{{- end }}
168156
{{- if and .Values.persistence.enabled .Values.initFs.enabled }}
169157
- name: init-fs
@@ -236,10 +224,7 @@ spec:
236224
value: {{ default "" .Values.plugins.httpsProxy }}
237225
- name: no_proxy
238226
value: {{ default "" .Values.plugins.noProxy }}
239-
{{- range (include "sonarqube.combined_env" . | fromJsonArray) }}
240-
- name: {{ .name }}
241-
value: {{ .value | quote }}
242-
{{- end }}
227+
{{- (include "sonarqube.combined_env" . | fromJsonArray) | toYaml | trim | nindent 8 }}
243228
{{- end }}
244229
containers:
245230
{{- with .Values.extraContainers }}
@@ -279,10 +264,7 @@ spec:
279264
name: {{ include "sonarqube.fullname" . }}-monitoring-passcode
280265
key: SONAR_WEB_SYSTEMPASSCODE
281266
{{- end }}
282-
{{- range (include "sonarqube.combined_env" . | fromJsonArray) }}
283-
- name: {{ .name }}
284-
value: {{ .value | quote }}
285-
{{- end }}
267+
{{- (include "sonarqube.combined_env" . | fromJsonArray) | toYaml | trim | nindent 8 }}
286268
envFrom:
287269
- configMapRef:
288270
name: {{ include "sonarqube.fullname" . }}-jdbc-config

0 commit comments

Comments
 (0)