Helm chart rendering sonar.properties key names incorrectly

Hello! I am attempting to configure some properties for sonarqube via the sonarProperties helm chart key, but it seems that the chart is failing to flatten the hashmap for the nested keys. When I shell into the running SonarQube container and cat the /opt/sonarqube/conf/sonar.properties file I see this instead:

sonar=map[governance:map[report:map[project:map[branch:map[frequency:Daily]] view:map[frequency:Daily recipients:redacted-user@redacted-domain.com]]] scim:map[enabled:true]]

Looking at helm get all sonarqube-test I see the keys and hash structure:

sonarProperties:
  sonar:
    governance:
      report:
        project:
          branch:
            frequency: Daily
        view:
          frequency: Daily
          recipients: redacted-user@redacted-domain.com
    scim:
      enabled: true

Versions:
Helm Chart 8.0.0_463
SonarQube 9.9.0.65466 Enterprise Edition
Helm Client Version v3.10.0

1 Like

Hi,

There are things you can set via properties and things that should be set via the UI. Don’t worry, that latter category is stored in the DB, so it’s not ephemeral.

These frequencies are in the latter category and I suppose you’re seeing the strange hashmap behavior because it wasn’t intended to work the way you’re trying to set this up.

 
HTH,
Ann

1 Like

I want to do it this was so we can configure and manage my deployments as code.

Hi,

Yeah, I get that. You’re not the first. SonarQube isn’t built that way.

It’s built to be spun up, configured and then… occasionally upgraded. With no real need for ongoing management of deployments.

 
Ann

1 Like

I fixed this issue and opened a PR.

I haven’t tested to see what it will do if the sonarProperties is empty/null yet… but this seems to work for my intended use case. :smile:

2 Likes

Ah, yep… there is a bug I need to fix for the null case.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.