Hello Sonar community,
we’re running SonarQube Developer edition on a self-hosted Kubernetes cluster.
The SonarQube Docker image we’re using is sonarqube:lts-developer.
We haven’t pulled that image for some time, like about a year, but today we tried to pull the newest version (published about a week ago) to try to resolve some peculiarities we were experiencing with our SonarQube instance.
However, since re-pulling the image from Docker Hub, SonarQube seems to be unable to connect to its PostgreSQL database. We haven’t changed anything about the JDBC connection properties; SonarQube simply doesn’t seem to pick them up and uses the embedded H2 database instead.
-
What version are you upgrading from?
Previous LTS version, 8.9.10-LTS -
System information (Operating system, Java version, Database provider/version)
SonarQube docker image (Version 9.9.1-LTS)
This is our Kubernetes pod specification for SonarQube:
spec:
containers:
- env:
- name: SONARQUBE_JDBC_USERNAME
value: postgres
- name: SONARQUBE_JDBC_PASSWORD
value: **REDACTED**
- name: SONARQUBE_JDBC_URL
value: jdbc:postgresql://localhost/sonar
- name: sonar.security.realm
value: LDAP
** Rest of LDAP properties REDACTED **
image: sonarqube:lts-developer
imagePullPolicy: Always
name: sonarqube
ports:
- containerPort: 9000
name: http-port
protocol: TCP
- containerPort: 9092
name: api-port
protocol: TCP
resources:
requests:
memory: 2Gi
cpu: "1"
limits:
memory: 4Gi
cpu: "1"
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
- env:
- name: POSTGRES_PASSWORD
value: **REDACTED**
- name: PGDATA
value: /var/lib/postgresql/data/pgdata
image: postgres:11
imagePullPolicy: IfNotPresent
name: postgres
resources:
requests:
memory: 1Gi
cpu: "1"
limits:
memory: 1Gi
cpu: "1"
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /var/lib/postgresql/data
name: postgres-data
Does anybody have an idea what we can do to make SonarQube respect the SONARQUBE_JDBC_URL etc. properties?
Thanks in advance.