From 70ab53ef4bd7ff0c2bad4496b18811dee6ac7699 Mon Sep 17 00:00:00 2001 From: Steve Hipwell Date: Wed, 9 Oct 2019 14:07:50 +0100 Subject: [PATCH] [stable/sonarqube] Update default service type to ClusterIP (#17116) * Fix Sonaqube ELB creation on AWS Signed-off-by: Steve Hipwell * Change Sonarqube default service type to ClusterIP Signed-off-by: Steve Hipwell * Update sonarqube chart version Signed-off-by: Steve Hipwell * Update sonarqube chart version Signed-off-by: Steve Hipwell --- stable/sonarqube/Chart.yaml | 4 ++-- stable/sonarqube/README.md | 8 +++++--- stable/sonarqube/templates/deployment.yaml | 8 +++++--- stable/sonarqube/templates/service.yaml | 4 ++-- stable/sonarqube/values.yaml | 9 ++++----- 5 files changed, 18 insertions(+), 15 deletions(-) diff --git a/stable/sonarqube/Chart.yaml b/stable/sonarqube/Chart.yaml index a6583599e5..6c7146716d 100644 --- a/stable/sonarqube/Chart.yaml +++ b/stable/sonarqube/Chart.yaml @@ -1,8 +1,8 @@ apiVersion: v1 name: sonarqube description: Sonarqube is an open sourced code quality scanning tool -version: 2.3.0 -appVersion: 7.9 +version: 3.0.0 +appVersion: 7.9.1 keywords: - coverage - security diff --git a/stable/sonarqube/README.md b/stable/sonarqube/README.md index 3843440b71..a637ef6060 100644 --- a/stable/sonarqube/README.md +++ b/stable/sonarqube/README.md @@ -42,7 +42,7 @@ The following table lists the configurable parameters of the Sonarqube chart and | `replicaCount` | Number of replicas deployed | `1` | | `deploymentStrategy` | Deployment strategy | `{}` | | `image.repository` | image repository | `sonarqube` | -| `image.tag` | `sonarqube` image tag. | `7.9-community` | +| `image.tag` | `sonarqube` image tag. | `7.9.1-community` | | `image.pullPolicy` | Image pull policy | `IfNotPresent` | | `image.pullSecret` | imagePullSecret to use for private repository | | | `command` | command to run in the container | `nil` (need to be set prior to 6.7.6, and 7.4) | @@ -54,10 +54,12 @@ The following table lists the configurable parameters of the Sonarqube chart and | `ingress.tls` | Ingress secrets for TLS certificates | `[]` | | `livenessProbe.sonarWebContext` | SonarQube web context for livenessProbe | / | | `readinessProbe.sonarWebContext` | SonarQube web context for readinessProbe | / | -| `service.type` | Kubernetes service type | `LoadBalancer` | +| `service.type` | Kubernetes service type | `ClusterIP` | +| `service.externalPort` | Kubernetes service port | `9000` | +| `service.internalPort` | Kubernetes container port | `9000` | | `service.labels` | Kubernetes service labels | None | | `service.annotations` | Kubernetes service annotations | None | -| `service.loadBalancerSourceRanges` | Kubernetes service LB Allowed inbound IP addresses | 0.0.0.0/0 | +| `service.loadBalancerSourceRanges` | Kubernetes service LB Allowed inbound IP addresses | None | | `service.loadBalancerIP` | Kubernetes service LB Optional fixed external IP | None | | `persistence.enabled` | Flag for enabling persistent storage | false | | `persistence.annotations` | Kubernetes pvc annotations | `{}` | diff --git a/stable/sonarqube/templates/deployment.yaml b/stable/sonarqube/templates/deployment.yaml index 2141fbabe2..cd7f4abca4 100644 --- a/stable/sonarqube/templates/deployment.yaml +++ b/stable/sonarqube/templates/deployment.yaml @@ -91,7 +91,9 @@ spec: image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" imagePullPolicy: {{ .Values.image.pullPolicy }} ports: - - containerPort: {{ .Values.service.internalPort }} + - name: http + containerPort: {{ .Values.service.internalPort }} + protocol: TCP {{- if .Values.plugins.install }} command: - /tmp/scripts/copy_plugins.sh @@ -126,13 +128,13 @@ spec: livenessProbe: httpGet: path: {{ .Values.livenessProbe.sonarWebContext }}sessions/new - port: {{ .Values.service.internalPort }} + port: http initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }} periodSeconds: {{ .Values.livenessProbe.periodSeconds }} readinessProbe: httpGet: path: {{ .Values.readinessProbe.sonarWebContext }}sessions/new - port: {{ .Values.service.internalPort }} + port: http initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }} periodSeconds: {{ .Values.readinessProbe.periodSeconds }} failureThreshold: {{ .Values.readinessProbe.failureThreshold }} diff --git a/stable/sonarqube/templates/service.yaml b/stable/sonarqube/templates/service.yaml index 100c1db08e..c61fe09b87 100755 --- a/stable/sonarqube/templates/service.yaml +++ b/stable/sonarqube/templates/service.yaml @@ -20,9 +20,9 @@ spec: type: {{ .Values.service.type }} ports: - port: {{ .Values.service.externalPort }} - targetPort: {{ .Values.service.internalPort }} + targetPort: http protocol: TCP - name: {{ .Values.service.name }} + name: http selector: app: {{ template "sonarqube.name" . }} release: {{ .Release.Name }} diff --git a/stable/sonarqube/values.yaml b/stable/sonarqube/values.yaml index e4653d7b88..0e4d415fef 100755 --- a/stable/sonarqube/values.yaml +++ b/stable/sonarqube/values.yaml @@ -8,7 +8,7 @@ deploymentStrategy: {} image: repository: sonarqube - tag: 7.9-community + tag: 7.9.1-community # If using a private repository, the name of the imagePullSecret to use # pullSecret: my-repo-secret @@ -17,16 +17,15 @@ securityContext: fsGroup: 999 service: - name: sonarqube - type: LoadBalancer + type: ClusterIP externalPort: 9000 internalPort: 9000 labels: annotations: {} # May be used in example for internal load balancing in GCP: # cloud.google.com/load-balancer-type: Internal - loadBalancerSourceRanges: - - 0.0.0.0/0 + # loadBalancerSourceRanges: + # - 0.0.0.0/0 # loadBalancerIP: 1.2.3.4 ingress: enabled: false