From 88f2ce4f387f17c61ae332ddf06c15457adb1bbf Mon Sep 17 00:00:00 2001 From: Davi Koscianski Vidal Date: Tue, 26 Nov 2024 15:34:57 +0100 Subject: [PATCH] Addresses comments --- charts/sonarqube-dce/templates/_helpers.tpl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/charts/sonarqube-dce/templates/_helpers.tpl b/charts/sonarqube-dce/templates/_helpers.tpl index 2a8598869..c5478a14e 100644 --- a/charts/sonarqube-dce/templates/_helpers.tpl +++ b/charts/sonarqube-dce/templates/_helpers.tpl @@ -238,16 +238,16 @@ Parameters: {{- $tempJsonOutput := default "false" (get .ctx.Values.logging "jsonOutput") -}} {{- if and $node.sonarProperties (hasKey $node.sonarProperties "sonar.log.jsonOutput") -}} {{- $tempJsonOutput = (get $node.sonarProperties "sonar.log.jsonOutput") -}} - {{- else if $node.env -}} - {{- range $index, $val := $node.env -}} + {{- end -}} + {{- if .ctx.Values.env -}} + {{- range $index, $val := .ctx.Values.env -}} {{- if eq $val.name "SONAR_LOG_JSONOUTPUT" -}} {{- $tempJsonOutput = $val.value -}} {{- end -}} {{- end -}} - {{- else if and .ctx.Values.sonarProperties (hasKey .ctx.Values.sonarProperties "sonar.log.jsonOutput") -}} - {{- $tempJsonOutput = (get .ctx.Values.sonarProperties "sonar.log.jsonOutput") -}} - {{- else if .ctx.Values.env -}} - {{- range $index, $val := .ctx.Values.env -}} + {{- end -}} + {{- if $node.env -}} + {{- range $index, $val := $node.env -}} {{- if eq $val.name "SONAR_LOG_JSONOUTPUT" -}} {{- $tempJsonOutput = $val.value -}} {{- end -}}