sonarqube

by KubeSphere

Helm chartv6.7.0App 8.9-communityVerified publisher

SonarQube is an open sourced code quality scanning tool

About this chart

Forked from https://github.com/Oteemo/charts/tree/master/charts/sonarqube.

SonarQube

SonarQube is an open sourced code quality scanning tool.

Introduction

This chart bootstraps a SonarQube instance with a PostgreSQL database.

Prerequisites

  • Kubernetes 1.10+

Installing the chart

To install the chart:

helm repo add oteemocharts https://oteemo.github.io/charts
helm install oteemocharts/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

Ingress Paths

Some cloud may need the path to be /* instead of /. Try this first if you are having issues getting traffic through the ingress.

Configuration

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

ParameterDescriptionDefault
replicaCountNumber of replicas deployed1
deploymentStrategyDeployment strategy{}
image.repositoryimage repositorysonarqube
image.tagsonarqube image tag.8.9-community
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)
elasticsearch.configureNodeModify k8s worker to conform to system requirementstrue
elasticsearch.bootstrapChecksEnables/disables Elasticsearch bootstrap checkstrue
securityContext.fsGroupGroup applied to mounted directories/files999
ingress.enabledFlag for enabling ingressfalse
ingress.labelsIngress additional labels{}
ingress.hosts[0].nameHostname to your SonarQube installationsonar.organization.com
ingress.hosts[0].pathPath within the URL structure/
ingress.hosts[0].serviceNameOptional field to override the default serviceName of a pathNone
ingress.hosts[0].servicePortOptional field to override the default servicePort of a pathNone
ingress.tlsIngress secrets for TLS certificates[]
livenessProbe.sonarWebContextSonarQube web context for livenessProbe/
readinessProbe.sonarWebContextSonarQube web context for readinessProbe/
service.typeKubernetes service typeClusterIP
service.externalPortKubernetes service port9000
service.internalPortKubernetes container port9000
service.labelsKubernetes service labelsNone
service.annotationsKubernetes service annotationsNone
service.loadBalancerSourceRangesKubernetes service LB Allowed inbound IP addressesNone
service.loadBalancerIPKubernetes service LB Optional fixed external IPNone
persistence.enabledFlag for enabling persistent storagefalse
persistence.annotationsKubernetes pvc annotations{}
persistence.existingClaimDo not create a new PVC but use this oneNone
persistence.storageClassStorage class to be used""
persistence.accessModeVolumes access mode to be setReadWriteOnce
persistence.sizeSize of the volume10Gi
persistence.volumesSpecify extra volumes. Refer to ".spec.volumes" specification[]
persistence.mountsSpecify extra mounts. Refer to ".spec.containers.volumeMounts" specification[]
serviceAccount.createIf set to true, create a serviceAccountfalse
serviceAccount.nameName of the serviceAccount to create/usesonarqube-sonarqube
serviceAccount.annotationsAdditional serviceAccount annotations{}
sonarPropertiesCustom sonar.properties fileNone
sonarSecretPropertiesAdditional sonar.properties file to load from a secretNone
caCerts.secretName of the secret containing additional CA certificatesnil
jvmOptsValues to add to SONARQUBE_WEB_JVM_OPTS""
envEnvironment variables to attach to the podsnil
sonarSecretKeyName of existing secret used for settings encryptionNone
postgresql.enabledSet to false to use external servertrue
postgresql.existingSecretSecret containing the password of the external Postgresql servernull
postgresql.postgresqlServerHostname of the external Postgresql servernull
postgresql.postgresqlUsernamePostgresql database usersonarUser
postgresql.postgresqlPasswordPostgresql database passwordsonarPass
postgresql.postgresqlDatabasePostgresql database namesonarDB
postgresql.service.portPostgresql port5432
jdbcDatabaseTypeType of the JDBC Database driverpostgreql
jdbcUrlOverride Overrides default JDBC URL creationNone
annotationsSonarqube Pod annotations{}
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

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 v6.7.0 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