sonarqube-dce

by SonarSource

Helm chartv2026.5.1008App 2026.5.6Verified publisherOfficial

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

ComponentImageDefault tag
SonarQube Server application nodessonarqube2026.5.6-datacenter-app
SonarQube Server search nodessonarqube2026.5.6-datacenter-search
MCP Serversonarsource/sonarqube-mcp2026.5.2
Agent Orchestratorsonarsource/sonarqube-agent-orchestrator2026.5.6
Hunter Agentsonarsource/sonarqube-hunter-agent2026.5.2
Remediation Agentsonarsource/sonarqube-remediation-agent2026.5.2
Vortexsonarsource/sonar-vortex2026.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.

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.enabled is set to true by default). You must set the following parameters: jdbcOverwrite.jdbcUrl, jdbcOverwrite.jdbcUsername, jdbcOverwrite.jdbcSecretName, and jdbcOverwrite.jdbcSecretPasswordKey.

Upgrade process

  1. Read through the SonarQube Upgrade Guide to familiarize yourself with the general upgrade process (most importantly, back up your database)
  2. Read the chart-specific notes below for every chart version you cross
  3. Upgrade to the chart version that ships the target SonarQube version (helm repo update, then helm upgrade with --version), rather than only changing applicationNodes.image.tag and searchNodes.image.tag on your current chart. When crossing an Elasticsearch major, follow the Elasticsearch 8 to 9 procedure instead
  4. Browse to http://yourSonarQubeServerURL/setup and follow the setup instructions
  5. 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.

  1. 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
  1. 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-values would 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
  1. After search is Ready, browse to /setup and follow the instructions. Indexes are rebuilt into es9; 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/grpc handlers are ignored; use overrideCommand instead. The default timeoutSeconds is now 5 on search and application nodes, and applicationNodes.livenessProbe.failureThreshold is now 8.
  • Prometheus exporter: the default scrape path is now /metrics instead of / (set applicationNodes.prometheusExporter.metricsPath: / to keep the old one), and built-in JVM metrics use OpenMetrics names (see Export JMX metrics).
  • Memory defaults: the applicationNodes.resources memory request and limit are now 8192M, 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, set ingress.ingressClassName to your controller's class unless your cluster has a default IngressClass.

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

  1. backup your database
  2. import it to a new database
  3. 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.enabled bundled ingress-nginx controller subchart, you can skip this section. ingress.enabled (the plain Ingress resource, for use with your own controller) remains supported and needs no migration.

⚠️ Important: Starting from 2026.5.1000, this chart no longer bundles the deprecated ingress-nginx.enabled/nginx.enabled ingress-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.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartsonarqube-dce is pinned at v2026.5.1008 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. 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