Oteemo / charts

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

[sonarqube] Restore support for LTS environment variables #262

Closed usmonster closed 3 years ago

usmonster commented 3 years ago

Since #197 landed in SonarQube's chart v9.0, it no longer works out of the box for Docker images prior to SonarQube 8.x, including the current 7.9.x LTS.

The change was made by because the SONARQUBE_* environment variables used by earlier versions were deprecated in favor of their SONAR_* equivalents in the Docker images for later versions of SonarQube.

As a workaround to use the latest chart, we've tried manually setting the deprecated environment variables via our HelmRelease:

    # Use SonarQube < 8 environment variables keys (see https://github.com/Oteemo/charts/pull/197)
    env:
      - name: SONARQUBE_JDBC_URL
        value: "$(SONAR_JDBC_URL)"
      - name: SONARQUBE_JDBC_USERNAME
        value: "$(SONAR_JDBC_USERNAME)"
      - name: SONARQUBE_JDBC_PASSWORD
        value: "$(SONAR_JDBC_PASSWORD)"
      - name: SONARQUBE_WEB_JVM_OPTS
        value: "$(SONAR_WEB_JAVAOPTS)"

...but it doesn't work because of the order in which env vars are listed in the deployment.

Even if not restoring out-of-the-box support for the LTS variables, at least having an upgrade guide or some documentation about this limitation could be a workable alternative. (Though please note that this is a bit different from other backwards-incompatible defaults introduced in recent chart versions, such as the runAsUser value, which are pretty easily handled by overriding the appropriate chart values.)

See also: SonarSource/docker-sonarqube#473

rjkernick commented 3 years ago

Please let me know if that doesn't fix the issue

usmonster commented 3 years ago

This is perfect, thanks!