JDBC settings not applied when deploying from SonarQube Helm Chart

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
    ** SonarQube: 10.4.1
    ** Scanner: sonar-scanner-msbuild-4.7.1.2311-net46\SonarScanner.MSBuild.exe
    ** Plugins: N.A.

  • how is SonarQube deployed: zip, Docker, Helm
    ** Helm deploying to AWS EKS with external postgres DB on AWS RDS.

  • what are you trying to achieve?
    ** Get SonarQube web server to connect to a backend DB in RDS instead of local.

  • what have you tried so far to achieve this?
    ** Uninstall/Reinstall helm chart multiple times.
    ** helm upgrade --debug --install sonarqube --namespace sandbox --create-namespace -f values.yaml sonarqube/sonarqube
    ** values.yaml:

image:
  tag: 10.4.1-{{ .Values.edition }}

persistence:
  enabled: true
  storageClass: "gp2"
  accessMode: ReadWriteOnce
  size: 30Gi
  uid: 1000
  guid: 0
  volumes:
    - name: data
      # emptyDir: {}
    - name: extensions
      # emptyDir: {}
    - name: logs
      # emptyDir: {}
  mounts:
    - name: data
      mountPath: /opt/sonarqube/data-2
    - name: extensions
      mountPath: /opt/sonarqube/extensions-2
    - name: logs
      mountPath: /opt/sonarqube/logs-2

jdbcOverwrite:
  enabled: true
  jdbcUrl: 'jdbc:postgresql://<my_DB_endpoint>.us-east-1.rds.amazonaws.com/sonar_sandbox?socketTimeout=1500'
  jdbcUsername: "postgres"
  jdbcPassword: <my_DB_password>

postgresql:
  enabled: false
  • The configMap created as a result of this helm command is not correct. It seems to be taking default values for sonar DB URL, username and password as is evidenced by this line in the pod logs:
    2024.05.19 18:49:31 INFO web[][o.s.d.DefaultDatabase] Create JDBC data source for jdbc:postgresql://%!s(<nil>):5432/sonarDB
    As a result, the pod runs but SonarQube initialization fails. I am able to manually connect to the postgres DB using the credentials I’ve supplied in values.yaml .What could be going wrong here?

this should be enable, not enabled, documented here.

Dear Lord! :confounded:Thank you for pointing that out!