sonarqube

by KubeGems

Helm chartv1.3.1App 8.7.1

A Helm chart for deploying SonarQube.

About this chart

SonarQube

SonarQube empowers all developers to write cleaner and safer code.

Installing the Chart

Before you can install the chart you will need to add the stevehipwell repo to Helm.

helm repo add sonarqube https://jordiprats.github.io/helm-sonarqube/

After you've installed the repo you can install the chart.

helm upgrade --install --namespace default --values ./values.yaml sonar sonarqube/sonarqube

Configuration

The following table lists the configurable parameters of the SonarQube chart and their default values.

ParameterDescriptionDefault
image.repositoryImage repository.sonarqube
image.tagImage tag.{{ .Chart.AppVersion }}-community
image.pullPolicyImage pull policy.IfNotPresent
image.pullSecretsImage pull secrets.[]
image.ltsWhether is the LTS version.false
nameOverrideOverride the name of the chart.nil
fullnameOverrideOverride the fullname of the chart.nil
serviceAccount.createIf true, create a new service account.true
serviceAccount.annotationsAnnotations to add to the service account.{}
serviceAccount.nameService account to be used. If not set and serviceAccount.create is true, a name is generated using the fullname template.nil
podAnnotationsAnnotations to add to the pod.{}
podSecurityContextSecurity context for the pod.{ fsGroup: 1000 }
securityContextSecurity context for the primary container.{ runAsUser: 1000 }
priorityClassNamePriority class name to use.""
livenessProbeThe liveness probe.See values.yaml
readinessProbeThe readiness probe.See values.yaml
service.typeService type.ClusterIP
service.annotationsAnnotations to add to the service.{}
service.portService port.9000
ingress.enabledIf true, create an ingress object.false
ingress.annotationsIngress annotations.{}
ingress.hostsIngress hosts.See values.yaml
ingress.tlsIngress TLS configurationSee values.yaml
persistence.enabledIf true, create a PVC.false
persistence.annotationsAnnotations to add to the PVC.{}
persistence.existingClaimUse an existing PVC to persist data.nil
persistence.accessModePersistence access mode.ReadWriteOnce
persistence.storageClassPVC storage class (use - for default).standard
persistence.sizeSize of PVC to create.8Gi
resourcesResource requests and limits for the primary container.{}
nodeSelectorNode labels for pod assignment.{}
tolerationsToleration labels for pod assignment.[]
affinityAffinity settings for pod assignment.{}
caCerts.enabledIf true, add provided CA certificates to the JVM cacerts key store.false
caCerts.secretSecret containing the additional CA certificates.nil
envVars.jvmOptionsJVM options to pass to the container via SONAR_WEB_JAVAOPTS.""
envVars.jvmAdditionalOptionsJVM options to pass to the container via SONAR_WEB_JAVAADDITIONALOPTS.""
envEnvironment variables for all containers in the pod.[]
sonarPropertiesA map of SonarQube properties.{}
sonarSecretProperties.enabledIf there is a secret to provide properties to SonarQube.false
sonarSecretProperties.secretThe secret name that contains the SonarQube properties.nil
sonarSecretProperties.keyThe key on the secret that contains the SonarQube properties.nil
installPlugins.enabledIf plugins should be installed.false
installPlugins.pluginsThe plugins to install (see values.yaml for structure.).[]
psql.hostExternal PostgreSQL host to use (if this is set the additional psql values need to be set)nil
psql.portExternal PostgreSQL portnil
psql.databaseExternal PostgreSQL databasenil
psql.usernameExternal PostgreSQL usernamenil
psql.password.secretName of the secret containing the external PostgreSQL passwordnil
psql.password.keyKey on the secret containing the external PostgreSQL passwordnil

Database

PostgreSQL database is not installed by this chart, it must be already available

Persistence

The sonarqube image stores the SonarQube data and configurations at the /opt/sonarqube path in the container.

Persistent Volume Claims are used to keep the data across deployments. This is known to work in GCE, AWS, and minikube. See the Configuration section to configure the PVC or to disable persistence.

Forked

This repo have been forked from stevehipwell's sonarqube helm chart to be able to add support to the LTS version

Deploy sonarqube with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has sonarqube 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 is pinned at v1.3.1 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