sonarqube

by stakater

Helm chartv0.10.3App 6.7.6Verified publisher

Sonarqube is an open sourced code quality scanning tool

About this chart

SonarQube

SonarQube is an open sourced code quality scanning tool.

Introduction

This chart bootstraps a SonarQube instance with a PostgreSQL database.

Prerequisites

  • Kubernetes 1.6+

Installing the chart:

To install the chart :

$ helm install stable/sonarqube

The above command deploys Sonarqube on the Kubernetes cluster in the default configuration. The configuration section lists the parameters that can be configured during installation.

The default login is admin/admin.

Uninstalling the chart

To uninstall/delete the deployment:

$ helm list
NAME       	REVISION	UPDATED                 	STATUS  	CHART          	NAMESPACE
kindly-newt	1       	Mon Oct  2 15:05:44 2017	DEPLOYED	sonarqube-0.1.0	default
$ helm delete kindly-newt

Configuration

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

ParameterDescriptionDefault
image.repositoryimage repositorysonarqube
image.tagsonarqube image tag.6.5
image.pullPolicyImage pull policyIfNotPresent
image.pullSecretimagePullSecret to use for private repository
commandcommand to run in the containernil (need to be set prior to 6.7.6, and 7.4)
ingress.enabledFlag for enabling ingressfalse
service.typeKubernetes service typeLoadBalancer
service.annotationsKubernetes service annotationsNone
service.loadBalancerSourceRangesKubernetes service LB Allowed inbound IP addresses0.0.0.0/0
service.loadBalancerIPKubernetes service LB Optional fixed external IPNone
persistence.enabledFlag for enabling persistent storagefalse
persistence.storageClassStorage class to be used"-"
persistence.accessModeVolumes access mode to be setReadWriteOnce
persistence.sizeSize of the volumeNone
sonarPropertiesCustom sonar.properties fileNone
database.typeSet to "mysql" to use mysql databasepostgresql
postgresql.enabledSet to false to use external server / mysql databasetrue
postgresql.postgresServerHostname of the external Postgresql servernull
postgresql.postgresUserPostgresql database usersonarUser
postgresql.postgresPasswordPostgresql database passwordsonarPass
postgresql.postgresDatabasePostgresql database namesonarDB
postgresql.service.portPostgresql port5432
mysql.enabledSet to false to use external server / postgresql databasefalse
mysql.mysqlServerHostname of the external Mysql servernull
mysql.mysqlUserMysql database usersonarUser
mysql.mysqlPasswordMysql database passwordsonarPass
mysql.mysqlDatabaseMysql database namesonarDB
mysql.mysqlParamsMysql parameters for JDBC connection string{}
mysql.service.portMysql port3306
resourcesSonarqube Pod resource requests & limits{}
affinityNode / Pod affinities{}
nodeSelectorNode labels for pod assignment{}
hostAliasesAliases for IPs in /etc/hosts[]
tolerationsList of node taints to tolerate[]
plugins.installList of plugins to install[]
plugins.resourcesPlugin Pod resource requests & limits{}

You can also configure values for the PostgreSQL / MySQL database via the Postgresql README.md / MySQL README.md

For overriding variables see: Customizing the chart

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 v0.10.3 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