DevOps DevOps
产品简介
产品安装
快速入门
使用指南
开发指南
FAQ
  • SonarQube Helm Chart
  • 安装 Chart
  • 卸载 Chart
  • 配置
  • 镜像
  • Service
  • 持久化
  • 内置数据源
  • 外置数据源

# SonarQube Helm Chart

# 安装 Chart

git clone http://euler.git.primeton.com/devops/devops-helm.git
kubectl create namespace devops
helm upgrade --install jenkins devops-helm/charts/sonarqube -n devops

# 卸载 Chart

卸载或删除已部署的 Chart:

$ helm list -n devops
NAME        REVISION    UPDATED                     STATUS      CHART            NAMESPACE
sonarqube   1           2024-03-07 12:42:31         DEPLOYED    sonarqube-0.1.0  devops
$ helm delete sonarqube -n devops

# 配置

# 镜像

edition: "community"

image:
  repository: sonarqube
  tag: 9.9.3-{{ .Values.edition }}
  pullPolicy: IfNotPresent
  # If using a private repository, the imagePullSecrets to use
  # pullSecrets:
  #   - name: my-repo-secret

# Service

service:
  type: NodePort
  externalPort: 9000
  internalPort: 9000
  labels:
  annotations: {}
  # May be used in example for internal load balancing in GCP:
  # cloud.google.com/load-balancer-type: Internal
  # loadBalancerSourceRanges:
  #   - 0.0.0.0/0
  # loadBalancerIP: 1.2.3.4
  nodePort: 32005

# 持久化

persistence:
  enabled: false
  ## Set annotations on pvc
  annotations: {}

  ## Specify an existing volume claim instead of creating a new one.
  ## When using this option all following options like storageClass, accessMode and size are ignored.
  # existingClaim:

  ## If defined, storageClassName: <storageClass>
  ## If set to "-", storageClassName: "", which disables dynamic provisioning
  ## If undefined (the default) or set to null, no storageClassName spec is
  ##   set, choosing the default provisioner.  (gp2 on AWS, standard on
  ##   GKE, AWS & OpenStack)
  ##
  storageClass:
  accessMode: ReadWriteOnce
  size: 5Gi
  uid: 1000

  ## Specify extra volumes. Refer to ".spec.volumes" specification : https://kubernetes.io/fr/docs/concepts/storage/volumes/
  volumes: []
  ## Specify extra mounts. Refer to ".spec.containers.volumeMounts" specification : https://kubernetes.io/fr/docs/concepts/storage/volumes/
  mounts: []

# 内置数据源

postgresql:
  enabled: true
  image:
    repository: postgres
    tag: "15.2-alpine3.17"
    pullPolicy: IfNotPresent
    # pullSecret: myRegistrKeySecretName
  postgresql:
    username: sonar
    password: sonar
    database: sonar
    port: 5432
  service:
    type: ClusterIP
    annotations: {}
  resources:
    limits:
      cpu: 2
      memory: 2Gi
    requests:
      cpu: 100m
      memory: 200Mi
  persistence:
    enabled: false
    accessModes:  [ReadWriteOnce]
    size: 20Gi
    storageClass:

# 外置数据源

## Override JDBC values
## for external Databases
jdbcOverwrite:
  # If enable the JDBC Overwrite, make sure to set `postgresql.enabled=false`
  enable: false
  # The JDBC url of the external DB
  jdbcUrl: "jdbc:postgresql://myPostgress/myDatabase?socketTimeout=1500"
  # The DB user that should be used for the JDBC connection
  jdbcUsername: "sonarUser"
  # Use this if you don't mind the DB password getting stored in plain text within the values file
  jdbcPassword: "sonarPass"
  ## Alternatively, use a pre-existing k8s secret containing the DB password
  # jdbcSecretName: "sonarqube-jdbc"
  ## and the secretValueKey of the password found within that secret
  # jdbcSecretPasswordKey: "jdbc-password"

← Jenkins Dependency Track →