Hi, I am using Sonarqube helm chart to be installed in a K8s cluster (9.9 LTA community edition, helm chart version: 8.0.6. At first the database was set by the postgresql bitnami helm chart parameters by enabling: postgresql:
** enabled: true**
Now that this works, I want to use a external database in a RDS instance (which will contain the database to be used). The question is about how to set up this database to connect with sonarqube pod, I already know that i need to change those parameters in sonarqube values.yaml: postgresql:
** enabled: false** jdbcOverwrite:
** enable: true**
** jdbcUrl: “jdbc:postgresql:instance_host/sonarqube?schema=public”**
** jdbcUsername: “sonarqube”**
** jdbcPassword: “password”**
** (or set the secret)**
Does this database needs to be created in the RDS instance and with the sonarqube chart user on it, to let Sonarqube configure itself on this new database? or needs a backup of the database to be restored beforehand to make it work?
Yes, the RDS instance must have the same credentials you input in your values.yaml file.
You can use a backup of your previous database or start from scratch; it is up to you. Of course, if you start from scratch, you will lose past analysis, issues resolutions, users, configurations, etc.
Thank you for your reply!
Regarding the external database, I wanted to know more about how to set it up to make Sonarqube pod be able to use this database as storage for its configuration, since this Database will be inside a RDS instance and I have limited access to it.
My questions are:
-Do I need to create the user that Sonarqube helm chart values will use before connecting it with JDBC? Does it need to be superuser?
Since the sonarqube helm chart allows you to deploy a postgresql without the need to configure a lot of things, apart from a user, a password and a database I am not sure how this works internally, that’s why I want to have everything clear after connecting the sonarqube to an external DB and make it work (since this operation will block my entire team).
I know this is not your question, but I would like to take the opportunity to point out that using the bundled PostgreSQL database is not recommended for production and it is deprecated.
However, internally, we install a PostgreSQL chart with pre-defined settings that can be customized using our official Helm Charts.
For a general roadmap of the installation process, I highly recommend our docs.