From 78e48d3210e44673cc6a21756927b91e1ff61838 Mon Sep 17 00:00:00 2001 From: "branden.cobb" Date: Tue, 23 Mar 2021 14:46:07 +0000 Subject: [PATCH] Virtualservice enhancement --- CHANGELOG.md | 4 ++++ chart/Chart.yaml | 2 +- chart/templates/_helpers.tpl | 7 +++++++ chart/templates/bigbang/virtualservice.yaml | 9 +++++++-- chart/values.yaml | 13 ++++++++++++- tests/test-values.yml | 1 - 6 files changed, 31 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a57aea2..e2393f6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 9.2.6-bb.4 - 2021-03-22 + +Adding ability to specify istio gateways and hosts in values file + ## 9.2.6-bb.3 - 2021-03-16 Plugins have been preinstalled into the container and made available at registry.dso.mil. diff --git a/chart/Chart.yaml b/chart/Chart.yaml index 261b904..b06e400 100644 --- a/chart/Chart.yaml +++ b/chart/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 appVersion: 8.6-community name: sonarqube description: SonarQube is an open sourced code quality scanning tool -version: 9.2.6-bb.3 +version: 9.2.6-bb.4 keywords: - coverage - security diff --git a/chart/templates/_helpers.tpl b/chart/templates/_helpers.tpl index 07d1193..8059ff8 100644 --- a/chart/templates/_helpers.tpl +++ b/chart/templates/_helpers.tpl @@ -60,3 +60,10 @@ false true {{- end -}} {{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "sonarqube.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} diff --git a/chart/templates/bigbang/virtualservice.yaml b/chart/templates/bigbang/virtualservice.yaml index 341c0c5..5c907c1 100644 --- a/chart/templates/bigbang/virtualservice.yaml +++ b/chart/templates/bigbang/virtualservice.yaml @@ -6,14 +6,19 @@ metadata: name: {{ template "sonarqube.fullname" . }} namespace: {{ .Release.Namespace }} labels: + helm.sh/chart: {{ include "sonarqube.chart" . }} app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/managed-by: {{ .Release.Service }} app.kubernetes.io/part-of: sonarqube spec: gateways: - - istio-system/main + {{- range .Values.istio.sonarqube.gateways }} + - {{ . }} + {{- end }} hosts: - - "sonarqube.{{ .Values.hostname }}" + {{- range .Values.istio.sonarqube.hosts }} + - {{ tpl . $}} + {{- end }} http: - route: - destination: diff --git a/chart/values.yaml b/chart/values.yaml index 969404e..285f5bf 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -354,8 +354,19 @@ extraConfig: terminationGracePeriodSeconds: 60 # Big Bang Additions +## Your FQDN will be ${ .Values.subdomain }.${ .Values.hostname } hostname: bigbang.dev istio: - enabled: true + # Toggle istio integration + enabled: false + sonarqube: + # Toggle vs creation + enabled: true + annotations: {} + labels: {} + gateways: + - istio-system/main + hosts: + - sonarqube.{{ .Values.hostname }} monitoring: enabled: false diff --git a/tests/test-values.yml b/tests/test-values.yml index d5d2b81..aaddc0c 100644 --- a/tests/test-values.yml +++ b/tests/test-values.yml @@ -3,4 +3,3 @@ image: istio: enabled: true - -- GitLab