How to Connect Postgresql Database to the SonarQube cluster on GCP

Hi,

I have an issue about connecting Postgresql database to the GCP cluster that has helm installed SonarQube.

I already add the External IP Address of the VM Instance of Cluster that has SonarQube on the database that I created.

I try to configure the values.yaml of SonarQube by inputting the values of my database for postgresqlUsername, postgresqlPassword, postgresqlDatabase. Is it required to change “jdbcUrlOverride:”, “postgresqlServer:”, “existingSecret:”? If yes, how can I know the value to input?

Thank you in advance for the response!

Hi,

Welcome to the community!

Could you share your values.yaml (with sensitive data redacted)?

 
Thx,
Ann

Hi!

Sorry for the late response.

I attached the contents of my values.yaml.
values.txt (13.3 KB)

Hi,

Thanks! Nothing jumps out to my (admittedly untrained) eye. Can you also share your server logs?

 
Ann

Hi,

This is the link for my screenshots of server logs.
https://drive.google.com/drive/folders/10cp2LJnFw9E-pRajXLxACyDKRC_4QkIU?usp=sharing

I use kubectl logs command since I run it on a cluster. Is that correct?

Hi,

Please provide the actual text of your logs. Feel free to just paste (ideally with code formatting) into a post.

 
Ann

Hi,

I already figured it out. I added postgresql.postgresqlServer on values.yaml.

The other problem is that my sonarqube-sonarqube-0 pod is unstable. Its Ready State is going to 0/1 then 1/1 and vice versa.

Here is the link below for the screenshot of the state of sonarqube-sonarqube-0 pod after upgrading the values.yaml (helm upgrade) and the postgresql on values that I use for connecting database.

https://drive.google.com/drive/folders/10cp2LJnFw9E-pRajXLxACyDKRC_4QkIU?usp=sharing

Hi,

I’m not a K8S expert. Google is telling me “pod eviction” is about resources.

 
HTH,
Ann

Hi,

I will take note of this.

I sincerely appreciate your effort in answering my questions. :slight_smile: