diff --git a/charts/sonarqube/README.md b/charts/sonarqube/README.md index ae962403..b9a82a20 100644 --- a/charts/sonarqube/README.md +++ b/charts/sonarqube/README.md @@ -99,6 +99,7 @@ The following table lists the configurable parameters of the Sonarqube chart and | `ingress.enabled` | Flag for enabling ingress | false | | `ingress.labels` | Ingress additional labels | `{}` | | `ingress.hosts[0].name` | Hostname to your SonarQube installation | `sonar.organization.com` | +| `ingress.hosts[0].alb_ssl_redirect` | Whether the ssl-redirect should be included (needed for setting up the SSL redirect with the ALB controller) | `false` | | `ingress.hosts[0].path` | Path within the URL structure | / | | `ingress.hosts[0].serviceName` | Optional field to override the default serviceName of a path | None | | `ingress.hosts[0].servicePort` | Optional field to override the default servicePort of a path | None | diff --git a/charts/sonarqube/templates/ingress.yaml b/charts/sonarqube/templates/ingress.yaml index 65b2cfcb..0b78e0c5 100644 --- a/charts/sonarqube/templates/ingress.yaml +++ b/charts/sonarqube/templates/ingress.yaml @@ -38,6 +38,12 @@ spec: - host: {{ .name }} http: paths: + {{- if .alb_ssl_redirect }} + - path: /* + backend: + serviceName: ssl-redirect + servicePort: use-annotation + {{- end }} - path: {{ .path}} backend: serviceName: {{ default $serviceName .serviceName }} diff --git a/charts/sonarqube/values.yaml b/charts/sonarqube/values.yaml index 1b87bef0..8405c85c 100644 --- a/charts/sonarqube/values.yaml +++ b/charts/sonarqube/values.yaml @@ -56,6 +56,7 @@ ingress: # Used to create an Ingress record. hosts: - name: sonar.organization.com + # alb_ssl_redirect: true # Different clouds or configurations might need /* as the default path path: / # For additional control over serviceName and servicePort