Open Oznup opened 2 years ago
I'm facing the same issue, and expanding on this a little more -
I tried deploying the helm chart on a minikube cluster. It fails with the same error, container logs -
Caused by: org.postgresql.util.PSQLException: FATAL: password authentication failed for user "sonarUser"
at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:613)
at org.postgresql.core.v3.ConnectionFactoryImpl.tryConnect(ConnectionFactoryImpl.java:161)
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:213)
at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:51)
at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:223)
at org.postgresql.Driver.makeConnection(Driver.java:465)
at org.postgresql.Driver.connect(Driver.java:264)
When I do helm get all sonarqube -n sonarqube
I can see the secret sonar-postgresql
is used -
containers:
- name: sonarqube-postgresql
image: docker.io/bitnami/postgresql:11.7.0-debian-10-r26
imagePullPolicy: "IfNotPresent"
resources:
limits:
cpu: 2
memory: 2Gi
requests:
cpu: 100m
memory: 200Mi
securityContext:
runAsUser: 1001
env:
- name: BITNAMI_DEBUG
value: "false"
- name: POSTGRESQL_PORT_NUMBER
value: "5432"
- name: POSTGRESQL_VOLUME_DIR
value: "/bitnami/postgresql"
- name: PGDATA
value: "/bitnami/postgresql/data"
- name: POSTGRES_USER
value: "sonarUser"
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: sonar-postgresql
key: postgresql-password
- name: POSTGRES_DB
value: "sonarDB"
- name: POSTGRESQL_ENABLE_LDAP
value: "no"
I also tried setting a couple of properties when deploying but no luck.
helm install sonarqube oteemocharts/sonarqube --set readinessProbe.initialDelaySeconds=180,livenessProbe.initialDelaySeconds=180,createPostgresqlSecret=true -n sonarqube
Looking at postgres container logs did not provide anything insightful and I'm not able to log into the db too. I think the root cause might be in this logic or I'm missing something obvious π€
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 :
What is really weird, is that when I do
kubectl get deploy sonarqube -o yaml
I can see that the secret is used.So, here is my overrides.yaml file, but you'll see, there is nothing really important :
What am I missing ?
Thanks for your help