Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
wkoot committed Apr 12, 2024
1 parent 9c2f094 commit c9c97d7
Show file tree
Hide file tree
Showing 4 changed files with 105 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/helm-chart.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Helm Chart CI

on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Start minikube
uses: medyagh/setup-minikube@latest

- name: Test WIP
run: |
minikube -p minikube docker-env
15 changes: 15 additions & 0 deletions helm/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
apiVersion: v2
name: ictu-sonarqube
version: 1.0.0
appVersion: "10.3.0"
description: A SonarQube helm chart with plugins, profiles and config used at ICTU
type: application
home: https://github.com/ICTU/sonar
dependencies:
- name: postgresql
version: 15.2.2 # appVersion 16.2.0
repository: https://charts.bitnami.com/bitnami # TODO - 3rd party helm chart or postgres docker container? NB: sonar defines bitnami postgres 10.15.0 as a dependency
- name: sonarqube
version: 10.3.0
repository: https://SonarSource.github.io/helm-chart-sonarqube
14 changes: 14 additions & 0 deletions helm/templates/sonarqube-env-vars-configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .Release.Name }}-sonarqube-env-vars
labels:
app: sonarqube
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
data:
{{- range $key, $val := .Values.env_vars }}
{{ $key }}: "{{ $val }}"
{{- end }}
55 changes: 55 additions & 0 deletions helm/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
env_vars:
SONARQUBE_USERNAME: "admin"
SONARQUBE_PASSWORD: "admin123"

settings:
sonar.core.serverBaseURL: "test.local"
sonar.forceAuthentication: false

postgresql:
audit:
logTimezone: "Europe/Amsterdam"
auth:
username: sonar
database: sonar
existingSecret: sonarqube-postgresql-secret
secretKeys:
userPasswordKey: sonar_db_password
adminPasswordKey: postgres_db_password
primary:
persistence:
size: 1Gi
extraVolumes:
- name: tz-config
hostPath:
path: /etc/localtime
extraVolumeMounts:
- name: tz-config
mountPath: /etc/localtime

sonarqube:
image:
repository: ictu/sonar
tag: "10.3.0"
pullPolicy: IfNotPresent
jdbcOverwrite:
enable: true
jdbcUrl: jdbc:postgresql://ictu-sonarqube-postgresql:5432/sonar?socketTimeout=1500
jdbcUsername: "sonar"
jdbcSecretName: sonarqube-postgresql-secret
jdbcSecretPasswordKey: sonar_db_password
nginx:
enabled: false
postgresql:
enabled: false
initSysctl:
enabled: false
initFs:
enabled: false
ingress:
enabled: false

extraConfig:
configmaps:
- ictu-sonarqube-sonarqube-env-vars

0 comments on commit c9c97d7

Please sign in to comment.