I’m running sonarqube and postgres images in a kubernetes environment. Each of the 2 deployments have a volume attached to it. However, when if the deployment is deleted, all my sonarqube config is lost on restart. I’ve checked logs for both sonarqube and postgres, and the 2 of them just have INFO type logs and no errors. If the deployment doesn’t go down, sonarqube works as expected. But every time it does go down I have to configure SAML config and Quality Profiles all over again. Has anyone experienced this issue?
First step was understanding that all data was saved into the psql db. So I didn’t have to mess around my sonarqube deployment.
There were a few issues. I use the busybox image to make sure that my psql image always starts before my sonarqube image. Over here, I had to adjust owner from 999 to 1001, and then I had to give it rwx permissions with 700.
After that I had missed the mount to my psql container. So I had to fix that by mounting the volume. I had no errors, because there was no mounted volume to psql image.
Also, previous I just had asked it to use the bitnami/postgresql image without defining a version. Then I got an error mentioning that the db was created using psql 15 and it cannot init on psql 16, so I had to set a version.