Using RDS/MySQL as database for deployment in Kubernetes

We plan to deploy developer edition in a custom Kubernetes environment built on AWS with database as RDS/MySQL. The helm charts available at Sonarsource Chart Repository deploys PostGres locally for database support.

Are there any helm charts available for the use case that I described or directions on how to update the official helm charts for it?

Hello @Thomas_T ,

Welcome to Sonar Community :sonar:

Yes, the https://artifacthub.io/packages/helm/sonarqube/sonarqube for SonarQube Community, Developer, and Enterprise Edition is the SonarQube Helm chart you want. We have a SonarQube DCE Helm chart here as well.

You can use the jdbcOverwrite section of values.yaml to point the Helm chart to an external DB, see here: helm-chart-sonarqube/charts/sonarqube at master · SonarSource/helm-chart-sonarqube · GitHub (this is the source code repository for the ArtifactHub links I gave above).

Make sure that you set the following since you are using your own external DB:

postgresql:
  enabled: false

Then make sure to adjust the following in values.yaml such as jdbcOverwrite.enable=true, etc.:

## Override JDBC values
## for external Databases
jdbcOverwrite:
  # If enable the JDBC Overwrite, make sure to set `postgresql.enabled=false`
  enable: false
  # The JDBC url of the external DB
  jdbcUrl: "jdbc:postgresql://myPostgress/myDatabase?socketTimeout=1500"
  # The DB user that should be used for the JDBC connection
  jdbcUsername: "sonarUser"
  # Use this if you don't mind the DB password getting stored in plain text within the values file
  jdbcPassword: "sonarPass"
  ## Alternatively, use a pre-existing k8s secret containing the DB password
  # jdbcSecretName: "sonarqube-jdbc"
  ## and the secretValueKey of the password found within that secret
  # jdbcSecretPasswordKey: "jdbc-password"
1 Like