sonarqubekubernetes-helm

JDBC settings not applied when deploying from SonarQube Helm Chart


I'm trying to get SonarQube web server to connect to a backend DB in RDS instead of local.

$ helm upgrade --debug --install sonarqube --namespace sandbox --create-namespace -f values.yaml sonarqube/sonarqube

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?

I've tried uninstalling and reinstalling the helm chart but it doesn't make any difference.


Solution

  • use 'enable: true' instead enabled