Skip to content
This repository was archived by the owner on Jun 24, 2022. It is now read-only.
This repository was archived by the owner on Jun 24, 2022. It is now read-only.

Cannot connect to PostgreSQL with default values.yaml #329

@Oznup

Description

@Oznup

Hello,

First of all congratulations for this beautiful chart 😉

Today I'm trying to install SonarQube on my self hosted kubernetes cluster, and I meet an issue : Sonar can't get connected to the PostgreSQL database deployed by the same chart, using the password in the secret.

I think you know which error I mean :

java.lang.IllegalStateException: Fail to connect to database
        at org.sonar.db.DefaultDatabase.start(DefaultDatabase.java:86)
        [...]
Caused by: java.lang.IllegalStateException: Can not connect to database. Please check connectivity and settings (see the properties prefixed by 'sonar.jdbc.').
        [...]
Caused by: java.sql.SQLException: Cannot create PoolableConnectionFactory (FATAL: password authentication failed for user "sonarUser")
        [...]
Caused by: org.postgresql.util.PSQLException: FATAL: password authentication failed for user "sonarUser"
        [...]

What is really weird, is that when I do kubectl get deploy sonarqube -o yaml I can see that the secret is used.

[...]
- name: SONAR_JDBC_PASSWORD
          valueFrom:
            secretKeyRef:
              key: postgresql-password
              name: sonar-postgresql
[...]

So, here is my overrides.yaml file, but you'll see, there is nothing really important :

postgresql:
  enabled: true

persistence:
  enabled: false

What am I missing ?

Thanks for your help

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions