sonarqube-dce
by SonarSource
SonarQube is a self-managed, automatic code review tool that systematically helps you deliver clean code. As a core element of our Sonar solution, SonarQube integrates into your existing workflow and detects issues in your code to help you perform continuous code inspections of your projects. The tool analyses 30+ different programming languages and integrates into your CI pipeline and DevOps platform to ensure that your code meets high-quality standards.
About this chart
SonarQube
Code better in more than 30 languages. Improve Code Quality and Code Security throughout your workflow. SonarQube can detect Bugs, Vulnerabilities, Security Hotspots, and Code Smells plus gives you the guidance to fix them.
Introduction
This helm chart bootstraps a SonarQube Data Center Edition cluster. It requires an external database (see Installing the chart).
The latest version of the chart installs the latest SonarQube version.
To install SonarQube Server Long-Term Active (LTA), please read the section below. Deciding between LTA and Latest? This may help.
Please note that this chart does NOT support SonarQube Community, Developer, and Enterprise Editions.
Default Versions
| Component | Image | Default tag |
|---|---|---|
| SonarQube Server application nodes | sonarqube | 2026.5.6-datacenter-app |
| SonarQube Server search nodes | sonarqube | 2026.5.6-datacenter-search |
| MCP Server | sonarsource/sonarqube-mcp | 2026.5.2 |
| Agent Orchestrator | sonarsource/sonarqube-agent-orchestrator | 2026.5.6 |
| Hunter Agent | sonarsource/sonarqube-hunter-agent | 2026.5.2 |
| Remediation Agent | sonarsource/sonarqube-remediation-agent | 2026.5.2 |
| Vortex | sonarsource/sonar-vortex | 2026.5.2 |
Kubernetes and Openshift Compatibility
Supported Kubernetes Versions: From 1.34 to 1.37
Supported Openshift Versions: From 4.19 to 4.22
Note: The Kubernetes version range above applies to non-OpenShift Kubernetes clusters. For OpenShift, the supported range is defined by the OpenShift versions listed here and is validated as a platform, including its embedded Kubernetes version.
Installing the chart
NOTE: Please refer to the official page for further information on how to install and tune the helm chart specifications.
Prior to installing the chart, please ensure that the monitoringPasscode and applicationNodes.jwtSecret are properly set. The applicationNodes.jwtSecret value needs to be set with a HS256 key encoded with base64. In the following, an example on how to generate this key on a Unix system:
echo -n "your_secret" | openssl dgst -sha256 -hmac "your_key" -binary | base64
Please also note that the chart requires an external database. If you want to perform a quick testing, you might want to follow the steps outlined here. You will be required to set the following values accordingly: jdbcOverwrite.jdbcUrl, jdbcOverwrite.jdbcUsername, jdbcOverwrite.jdbcSecretName, and jdbcOverwrite.jdbcSecretPasswordKey.
To install the chart:
helm repo add sonarqube https://SonarSource.github.io/helm-chart-sonarqube
helm repo update
kubectl create namespace sonarqube-dce
export JWT_SECRET=$(echo -n "your_secret" | openssl dgst -sha256 -hmac "your_key" -binary | base64)
export MONITORING_PASSCODE="yourPasscode"
export JDBC_URL="jdbc:postgresql://<your-db-host>:5432/<your-database>" # must be replaced: the chart rejects the placeholder URL
export JDBC_USERNAME="sonar"
export JDBC_PASSWORD_SECRET_NAME="jdbc-secret"
export JDBC_PASSWORD_SECRET_KEY="jdbc-password"
helm upgrade --install -n sonarqube-dce sonarqube sonarqube/sonarqube-dce --set applicationNodes.jwtSecret=$JWT_SECRET,monitoringPasscode=$MONITORING_PASSCODE,jdbcOverwrite.jdbcUrl=$JDBC_URL,jdbcOverwrite.jdbcUsername=$JDBC_USERNAME,jdbcOverwrite.jdbcSecretName=$JDBC_PASSWORD_SECRET_NAME,jdbcOverwrite.jdbcSecretPasswordKey=$JDBC_PASSWORD_SECRET_KEY
The above command deploys SonarQube on the Kubernetes cluster in the default configuration in the sonarqube-dce namespace.
If you are interested in deploying SonarQube on Openshift, please check the dedicated section.
The configuration section lists the parameters that can be configured during installation.
The default login is admin/admin.
Upgrading to SonarQube Server LTA
When upgrading your SonarQube Server to a new Long-Term Active (LTA) release, you should carefully read the official upgrade documentation to determine the correct update path based on your current server version.
- For SonarQube Server 2026.1 LTA, refer to the LTA-to-LTA Upgrade Notes (2026.1).
- For SonarQube Server 2025.4 LTA, refer to the LTA-to-LTA Upgrade Notes (2025.4).
- For SonarQube Server 2025.1 LTA, refer to the LTA-to-LTA Upgrade Notes (2025.1).
When upgrading to the 2026.5 LTA chart (2026.5.1000) from the 2026.1 LTA, the search nodes move from Elasticsearch 8 to 9 and need a specific procedure (see below). Read also Upgrade to 2026.5.1000.
When upgrading from a chart prior to 2026.1.0 (the 2026.1 LTA), you will experience a few changes.
- The deprecated PostgreSQL dependency has been removed. You must connect your SonarQube Server instance to an external database (
jdbcOverwrite.enabledis set to true by default). You must set the following parameters:jdbcOverwrite.jdbcUrl,jdbcOverwrite.jdbcUsername,jdbcOverwrite.jdbcSecretName, andjdbcOverwrite.jdbcSecretPasswordKey.
Upgrade process
- Read through the SonarQube Upgrade Guide to familiarize yourself with the general upgrade process (most importantly, back up your database)
- Read the chart-specific notes below for every chart version you cross
- Upgrade to the chart version that ships the target SonarQube version (
helm repo update, thenhelm upgradewith--version), rather than only changingapplicationNodes.image.tagandsearchNodes.image.tagon your current chart. When crossing an Elasticsearch major, follow the Elasticsearch 8 to 9 procedure instead - Browse to http://yourSonarQubeServerURL/setup and follow the setup instructions
- Reanalyze your projects to get fresh data
Elasticsearch 8 to 9 (upgrading from 2026.3 or earlier to 2026.4 or later)
SonarQube Server 2026.4 and later run Elasticsearch 9; 2025.x to 2026.3 (including the 2026.1 LTA) run Elasticsearch 8. A rolling update of the search StatefulSet cannot cross an Elasticsearch major version. Plan a maintenance window and back up the database first.
- Scale search to 0 with your current chart, without changing the image tag, and wait until the search pods are gone:
helm upgrade -n sonarqube-dce <yourReleaseName> <yourCurrentChart> --reuse-values --set searchNodes.replicaCount=0
- Upgrade to the new chart and restore your previous search replica count (default
3). Use--reset-then-reuse-values(Helm>= 3.14) or pass your values file with-f:--reuse-valueswould keep the previous chart's image tags and skip the new defaults.
helm upgrade -n sonarqube-dce <yourReleaseName> <yourNewChart> --reset-then-reuse-values --set searchNodes.replicaCount=3
- After search is Ready, browse to
/setupand follow the instructions. Indexes are rebuilt intoes9; rolling back in place is not supported.
On helm upgrade, the chart fails while search pods are still running on the previous Elasticsearch major. The check relies on lookup, so it does not run under helm template or GitOps tools that render manifests (Argo CD, Flux), nor for custom image tags: in those cases follow the procedure above yourself. Set searchNodes.skipEsMajorUpgradeCheck: true only if you need to bypass the check.
Upgrade to 2026.5.1000
Chart 2026.5.1000 (SonarQube Server 2026.5 LTA) contains the following breaking or behavior changes:
- Elasticsearch 9: see above when upgrading from SonarQube Server 2026.3 or earlier.
- Probes: the chart now manages the application node liveness/readiness probe handlers. Custom
exec/httpGet/tcpSocket/grpchandlers are ignored; useoverrideCommandinstead. The defaulttimeoutSecondsis now5on search and application nodes, andapplicationNodes.livenessProbe.failureThresholdis now8. - Prometheus exporter: the default scrape path is now
/metricsinstead of/(setapplicationNodes.prometheusExporter.metricsPath: /to keep the old one), and built-in JVM metrics use OpenMetrics names (see Export JMX metrics). - Memory defaults: the
applicationNodes.resourcesmemory request and limit are now8192M, to fit the higher Web/CE heap defaults of SonarQube Server 2026.5. Make sure your nodes can schedule them, or set your own values. - ingress-nginx: the bundled ingress-nginx controller subchart has been removed (see below). If you use
ingress.enabled, setingress.ingressClassNameto your controller's class unless your cluster has a defaultIngressClass.
Upgrade from versions prior to 2026.1.0
Note: If you are not using the PostgreSQL dependency (
postgresql.enabled=false), you can skip this section.
⚠️ Important: Users upgrading to this chart from versions before 2026.1.0 and relying on the deprecated PostgreSQL dependency must follow the below instructions to avoid data loss.
Starting from 2026.1.0, we removed the deprecated PostgreSQL dependency: this chart always requires an external database.
In order to upgrade to the newest chart from one version prior to this, you need to
- backup your database
- import it to a new database
- set the JDBC URL in the SonarQube chart
We identify the following migrations strategies and provide two example migration scripts to help you with this process. These scripts are provided for reference and should be reviewed and adapted to your specific environment before use. Both scripts are available in the postgresql-migration-scripts/ directory of this chart's GitHub repository.
Option 1: Backup and Restore to an external database (Recommended)
You can perform a backup of the existing database and restore it on an external and fully managed database.
Please check ./postgresql-backup.sh as a reference to create your own script that makes a backup file for external PostgreSQL migration:
./postgresql-backup.sh [OPTIONS] <postgres_service>
# Options:
# -n namespace Kubernetes namespace (default: sonarqube)
# -u username PostgreSQL username (default: sonarUser)
# -p password PostgreSQL password (default: sonarPass)
# -d database Database name (default: sonarDB)
# -h, --help Show help
# Examples:
./postgresql-backup.sh sonarqube-postgresql
./postgresql-backup.sh -n sonarqube -u myuser -p mypass -d mydb sonarqube-postgresql
Creates sonarqube_backup.sql for restoration to any external PostgreSQL service (AWS RDS, Azure Database, Google Cloud SQL, etc.).
Example restoration to AWS RDS:
PGPASSWORD=mypassword psql -h my-rds-endpoint.amazonaws.com -U myuser -d mydb < sonarqube_backup.sql
Option 2: In-Cluster Migration to an external Postgresql chart
If you wish to continue using a PostgreSQL chart to store SonarQube data, you can backup the database and restore it in a new (external) PostgreSQL chart having the same version (10.15.0).
Please check postgresql-migration-k8s.sh as a reference to build your own script that performs an in-cluster migration to a new PostgreSQL chart:
./postgresql-migration-k8s.sh [OPTIONS] <source_service>
# Options:
# -s source_ns Source namespace (default: sonarqube)
# -t target_ns Target namespace (default: sonarqube)
# -u username PostgreSQL username (default: sonarUser)
# -p password PostgreSQL password (default: sonarPass)
# -d database Database name (default: sonarDB)
# -r release New PostgreSQL release name (default: postgresql-external)
# -f values_file Optional custom values.yaml file for PostgreSQL chart
# Examples:
./postgresql-migration-k8s.sh sonarqube-postgresql
./postgresql-migration-k8s.sh -s my-source-ns -t my-target-ns sonarqube-postgresql
This script:
- Installs a new PostgreSQL chart in the target namespace
- Migrates data directly between PostgreSQL instances within Kubernetes
- Provides the JDBC configuration for your SonarQube values.yaml
After migration, update your SonarQube configuration:
jdbcOverwrite:
jdbcUrl: "jdbc:postgresql://<your-endpoint>:5432/<database>"
jdbcUsername: "<username>"
jdbcSecretName: "<secret-with-the-password>"
jdbcSecretPasswordKey: "<password-key>"
Upgrade from versions prior to 2026.5.1000 (ingress-nginx controller subchart removed)
Note: If you are not using the
ingress-nginx.enabled/nginx.enabledbundled ingress-nginx controller subchart, you can skip this section.ingress.enabled(the plainIngressresource, for use with your own controller) remains supported and needs no migration.
⚠️ Important: Starting from
2026.5.1000, this chart no longer bundles the deprecatedingress-nginx.enabled/nginx.enabledingress-nginx controller subchart, following the retirement of the ingress-nginx controller.httproute.enabled(Gateway API) has been available since before this removal, so you can a
Deploy sonarqube-dce with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has sonarqube-dce on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartsonarqube-dce is pinned at v2026.5.1008 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply