diff --git a/charts/sonarqube/CHANGELOG.md b/charts/sonarqube/CHANGELOG.md index b8f92c8..4dd4981 100644 --- a/charts/sonarqube/CHANGELOG.md +++ b/charts/sonarqube/CHANGELOG.md @@ -1,6 +1,9 @@ # SonarQube Chart Changelog All changes to this chart will be documented in this file. +## [9.5.0] +* Add Ingress default backend for GCE class + ## [9.2.3] * Added namespace to port-foward command in notes. diff --git a/charts/sonarqube/Chart.yaml b/charts/sonarqube/Chart.yaml index 6910bbd..408171a 100644 --- a/charts/sonarqube/Chart.yaml +++ b/charts/sonarqube/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 name: sonarqube description: SonarQube is an open sourced code quality scanning tool -version: 9.4.1 +version: 9.5.0 appVersion: 8.5.1-community keywords: - coverage diff --git a/charts/sonarqube/README.md b/charts/sonarqube/README.md index 48a2817..ae96240 100644 --- a/charts/sonarqube/README.md +++ b/charts/sonarqube/README.md @@ -45,10 +45,30 @@ kindly-newt 1 Mon Oct 2 15:05:44 2017 DEPLOYED sonarqube-0.1.0 $ helm delete kindly-newt ``` -## Ingress Paths +## Ingress +### Path Some cloud may need the path to be /* instead of /. Try this first if you are having issues getting traffic through the ingress. +### Default Backend + +if you use GCP as a cloud provider you need to set a default backend to avoid useless default backend created by the gce controller. To add this default backend you must set "ingress.class" annotation with "gce" or "gce-internal" value. + +Example: + +```yaml +... +ingress: + enabled: true + hosts: + - name: sonarqube.example.com + path: "/*" + annotations: + kubernetes.io/ingress.class: "gce-internal" + kubernetes.io/ingress.allow-http: "false" +... +``` + ## Configuration The following table lists the configurable parameters of the Sonarqube chart and their default values. diff --git a/charts/sonarqube/templates/ingress.yaml b/charts/sonarqube/templates/ingress.yaml index 11d8c2b..65b2cfc 100644 --- a/charts/sonarqube/templates/ingress.yaml +++ b/charts/sonarqube/templates/ingress.yaml @@ -24,6 +24,15 @@ metadata: {{- end }} {{- end }} spec: + {{- if .Values.ingress.annotations }} + {{- range $key, $value := .Values.ingress.annotations }} + {{- if and (eq $key "kubernetes.io/ingress.class") (contains $value "gce") }} + backend: + serviceName: {{ default $serviceName .serviceName }} + servicePort: {{ default $servicePort .servicePort }} + {{- end }} + {{- end }} + {{- end }} rules: {{- range .Values.ingress.hosts }} - host: {{ .name }}