From 22d06bb14e9ca266cc143da9c05d5cae7ab36ca0 Mon Sep 17 00:00:00 2001 From: Scott Collier Date: Tue, 30 Apr 2019 14:46:56 -0400 Subject: [PATCH] [stable/sonarqube] Ingress path configuration for SonarQube (#13320) * Modify Ingress template to be easier to --set Signed-off-by: Scott Collier * Update README Signed-off-by: Scott Collier * Updated TLS to match new Ingress format Signed-off-by: Scott Collier * Fix trailing spaces Signed-off-by: Scott Collier * Additional readme info Signed-off-by: Scott Collier * Modified ingress template to allow path configuration. Bumped major version to reflect incompatible API change. Signed-off-by: Scott Collier --- stable/sonarqube/Chart.yaml | 2 +- stable/sonarqube/README.md | 2 ++ stable/sonarqube/templates/ingress.yaml | 8 ++++---- stable/sonarqube/values.yaml | 14 +++++++++++++- 4 files changed, 20 insertions(+), 6 deletions(-) diff --git a/stable/sonarqube/Chart.yaml b/stable/sonarqube/Chart.yaml index 28408db459..b62671edf4 100644 --- a/stable/sonarqube/Chart.yaml +++ b/stable/sonarqube/Chart.yaml @@ -1,6 +1,6 @@ name: sonarqube description: Sonarqube is an open sourced code quality scanning tool -version: 0.16.1 +version: 1.0.0 appVersion: 7.7 keywords: - coverage diff --git a/stable/sonarqube/README.md b/stable/sonarqube/README.md index a56d57fe8d..10623727b8 100644 --- a/stable/sonarqube/README.md +++ b/stable/sonarqube/README.md @@ -47,6 +47,8 @@ The following table lists the configurable parameters of the Sonarqube chart and | `securityContext.fsGroup` | Group applied to mounted directories/files| `999` | | `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].path` | Path within the URL structure | / | | `livenessProbe.sonarWebContext` | SonarQube web context for livenessProbe | / | | `readinessProbe.sonarWebContext` | SonarQube web context for readinessProbe | / | | `service.type` | Kubernetes service type | `LoadBalancer` | diff --git a/stable/sonarqube/templates/ingress.yaml b/stable/sonarqube/templates/ingress.yaml index ae602f61b4..d5e3c9606c 100644 --- a/stable/sonarqube/templates/ingress.yaml +++ b/stable/sonarqube/templates/ingress.yaml @@ -21,15 +21,15 @@ metadata: {{- end }} spec: rules: - {{- range $host := .Values.ingress.hosts }} - - host: {{ $host }} + {{- range .Values.ingress.hosts }} + - host: {{ .name }} http: paths: - - path: / + - path: {{ default "/" .path }} backend: serviceName: {{ $serviceName }} servicePort: {{ $servicePort }} - - path: /* + - path: {{ printf "%s/*" .path }} backend: serviceName: {{ $serviceName }} servicePort: {{ $servicePort }} diff --git a/stable/sonarqube/values.yaml b/stable/sonarqube/values.yaml index f3c4d843bb..bb2223f092 100755 --- a/stable/sonarqube/values.yaml +++ b/stable/sonarqube/values.yaml @@ -28,7 +28,11 @@ ingress: enabled: false # Used to create an Ingress record. hosts: - - sonar.organization.com + - name: sonar.organization.com + # default paths for "/" and "/*" will be added + path: / + # If a different path is defined, that path and {path}/* will be added to the ingress resource + # path: /sonarqube annotations: {} # kubernetes.io/ingress.class: nginx # kubernetes.io/tls-acme: "true" @@ -68,14 +72,22 @@ readinessProbe: initialDelaySeconds: 60 periodSeconds: 30 failureThreshold: 6 + # If an ingress *path* other than the root (/) is defined, it should be reflected here + # A trailing "/" must be included sonarWebContext: / + # sonarWebContext: /sonarqube/ livenessProbe: initialDelaySeconds: 60 periodSeconds: 30 + # If an ingress *path* other than the root (/) is defined, it should be reflected here + # A trailing "/" must be included sonarWebContext: / + # sonarWebContext: /sonarqube/ # Set extra env variables. Like proxy settings. extraEnv: {} + # If an ingress *path* is defined, it should be reflected here + # sonar.web.context: /sonarqube resources: {} # We usually recommend not to specify default resources and to leave this as a conscious