Oteemo / charts

Helm chart repository
https://oteemo.github.io/charts
MIT License
181 stars 234 forks source link

[sonarqube] feature: Add support to java opts ce #298

Closed juananinca closed 2 years ago

juananinca commented 2 years ago

Hi, I recently updated to the last chart release of sonarqube and updated the sonar-server version to 8.9 and I found that one of the plugins I use needs some extra javaOpts in order to work.

The plugin is https://github.com/mc1arke/sonarqube-community-branch-plugin and as you can read, now it needs to:

Add -javaagent:./extensions/plugins/sonarqube-community-branch-plugin-${version}.jar=web to the sonar.web.javaAdditionalOpts property in your Sonarqube installation's config/sonar.properties file

and

Add -javaagent:./extensions/plugins/sonarqube-community-branch-plugin-${version}.jar=ce to the sonar.ce.javaAdditionalOpts property in your Sonarqube installation's config/sonar.properties file

There's no problem with the web option since there is a chart parameter called jvmOpts but only referes to "Values to add to SONARQUBE_WEB_JVM_OPTS".

In order to make that plugin work we would need another param to support java opts for ce.

Thanks

rheydon commented 2 years ago

Hi,

Ran into the same issue, but the chart let you define env var directly. You can just add this to your value.yaml :

env:
  - name: SONAR_WEB_JAVAADDITIONALOPTS
    value: "-javaagent:./extensions/plugins/sonarqube-community-branch-plugin-${version}.jar=web"
  - name: SONAR_CE_JAVAADDITIONALOPTS
    value: "-javaagent:./extensions/plugins/sonarqube-community-branch-plugin-${version}.jar=ce"
juananinca commented 2 years ago

It works perfect, thanks!!