From fda9912db720b34604079bd438aebe5ccf60d870 Mon Sep 17 00:00:00 2001 From: Miguel Ruiz Date: Thu, 26 May 2022 12:21:45 +0200 Subject: [PATCH] [bitnami/sonarqube] Add missing service parameter (#10430) * [bitnami/sonarqube] Add missing service parameters Signed-off-by: Miguel Ruiz * Update README.md with readme-generator-for-helm Signed-off-by: Bitnami Containers Co-authored-by: Bitnami Containers --- bitnami/sonarqube/Chart.yaml | 2 +- bitnami/sonarqube/README.md | 10 ++++++---- bitnami/sonarqube/templates/service.yaml | 11 ++++++++++- bitnami/sonarqube/values.yaml | 11 +++++++++++ 4 files changed, 28 insertions(+), 6 deletions(-) diff --git a/bitnami/sonarqube/Chart.yaml b/bitnami/sonarqube/Chart.yaml index 399614fe05..e2aa86132e 100644 --- a/bitnami/sonarqube/Chart.yaml +++ b/bitnami/sonarqube/Chart.yaml @@ -28,4 +28,4 @@ name: sonarqube sources: - https://github.com/bitnami/bitnami-docker-sonarqube - https://github.com/SonarSource/sonarqube -version: 1.3.1 +version: 1.4.0 diff --git a/bitnami/sonarqube/README.md b/bitnami/sonarqube/README.md index ad424ec0ac..ca54651fbe 100644 --- a/bitnami/sonarqube/README.md +++ b/bitnami/sonarqube/README.md @@ -83,7 +83,7 @@ The command removes all the Kubernetes components associated with the chart and | ------------------- | ---------------------------------------------------- | --------------------- | | `image.registry` | SonarQube image registry | `docker.io` | | `image.repository` | SonarQube image repository | `bitnami/sonarqube` | -| `image.tag` | SonarQube image tag (immutable tags are recommended) | `9.4.0-debian-10-r20` | +| `image.tag` | SonarQube image tag (immutable tags are recommended) | `9.4.0-debian-10-r23` | | `image.pullPolicy` | SonarQube image pull policy | `IfNotPresent` | | `image.pullSecrets` | SonarQube image pull secrets | `[]` | | `image.debug` | Enable SonarQube image debug mode | `false` | @@ -186,6 +186,8 @@ The command removes all the Kubernetes components associated with the chart and | `service.externalTrafficPolicy` | SonarQube service external traffic policy | `Cluster` | | `service.annotations` | Additional custom annotations for SonarQube service | `{}` | | `service.extraPorts` | Extra ports to expose in SonarQube service (normally used with the `sidecars` value) | `[]` | +| `service.sessionAffinity` | Session Affinity for Kubernetes service, can be "None" or "ClientIP" | `None` | +| `service.sessionAffinityConfig` | Additional settings for the sessionAffinity | `{}` | | `ingress.enabled` | Enable ingress record generation for SonarQube | `false` | | `ingress.pathType` | Ingress path type | `ImplementationSpecific` | | `ingress.apiVersion` | Force Ingress API version (automatically detected if not set) | `""` | @@ -216,7 +218,7 @@ The command removes all the Kubernetes components associated with the chart and | `volumePermissions.enabled` | Enable init container that changes the owner/group of the PV mount point to `runAsUser:fsGroup` | `false` | | `volumePermissions.image.registry` | Bitnami Shell image registry | `docker.io` | | `volumePermissions.image.repository` | Bitnami Shell image repository | `bitnami/bitnami-shell` | -| `volumePermissions.image.tag` | Bitnami Shell image tag (immutable tags are recommended) | `10-debian-10-r431` | +| `volumePermissions.image.tag` | Bitnami Shell image tag (immutable tags are recommended) | `10-debian-10-r434` | | `volumePermissions.image.pullPolicy` | Bitnami Shell image pull policy | `IfNotPresent` | | `volumePermissions.image.pullSecrets` | Bitnami Shell image pull secrets | `[]` | | `volumePermissions.resources.limits` | The resources limits for the init container | `{}` | @@ -231,7 +233,7 @@ The command removes all the Kubernetes components associated with the chart and | `sysctl.enabled` | Enable kernel settings modifier image | `true` | | `sysctl.image.registry` | Bitnami Shell image registry | `docker.io` | | `sysctl.image.repository` | Bitnami Shell image repository | `bitnami/bitnami-shell` | -| `sysctl.image.tag` | Bitnami Shell image tag (immutable tags are recommended) | `10-debian-10-r431` | +| `sysctl.image.tag` | Bitnami Shell image tag (immutable tags are recommended) | `10-debian-10-r434` | | `sysctl.image.pullPolicy` | Bitnami Shell image pull policy | `IfNotPresent` | | `sysctl.image.pullSecrets` | Bitnami Shell image pull secrets | `[]` | | `sysctl.resources.limits` | The resources limits for the init container | `{}` | @@ -261,7 +263,7 @@ The command removes all the Kubernetes components associated with the chart and | `metrics.jmx.enabled` | Whether or not to expose JMX metrics to Prometheus | `false` | | `metrics.jmx.image.registry` | JMX exporter image registry | `docker.io` | | `metrics.jmx.image.repository` | JMX exporter image repository | `bitnami/jmx-exporter` | -| `metrics.jmx.image.tag` | JMX exporter image tag (immutable tags are recommended) | `0.16.1-debian-10-r303` | +| `metrics.jmx.image.tag` | JMX exporter image tag (immutable tags are recommended) | `0.16.1-debian-10-r306` | | `metrics.jmx.image.pullPolicy` | JMX exporter image pull policy | `IfNotPresent` | | `metrics.jmx.image.pullSecrets` | Specify docker-registry secret names as an array | `[]` | | `metrics.jmx.containerPorts.metrics` | JMX Exporter metrics container port | `10445` | diff --git a/bitnami/sonarqube/templates/service.yaml b/bitnami/sonarqube/templates/service.yaml index a76fe8ea83..39cbdbe998 100644 --- a/bitnami/sonarqube/templates/service.yaml +++ b/bitnami/sonarqube/templates/service.yaml @@ -12,15 +12,24 @@ metadata: {{- end }} spec: type: {{ .Values.service.type }} + {{- if and .Values.service.clusterIP (eq .Values.service.type "ClusterIP") }} + clusterIP: {{ .Values.service.clusterIP }} + {{- end }} {{- if or (eq .Values.service.type "LoadBalancer") (eq .Values.service.type "NodePort") }} externalTrafficPolicy: {{ .Values.service.externalTrafficPolicy | quote }} {{- end }} - {{- if eq .Values.service.type "LoadBalancer" }} + {{- if and (eq .Values.service.type "LoadBalancer") (not (empty .Values.service.loadBalancerSourceRanges)) }} loadBalancerSourceRanges: {{ .Values.service.loadBalancerSourceRanges }} {{- end }} {{- if and (eq .Values.service.type "LoadBalancer") (not (empty .Values.service.loadBalancerIP)) }} loadBalancerIP: {{ .Values.service.loadBalancerIP }} {{- end }} + {{- if .Values.service.sessionAffinity }} + sessionAffinity: {{ .Values.service.sessionAffinity }} + {{- end }} + {{- if .Values.service.sessionAffinityConfig }} + sessionAffinityConfig: {{- include "common.tplvalues.render" (dict "value" .Values.service.sessionAffinityConfig "context" $) | nindent 4 }} + {{- end }} ports: - name: http port: {{ .Values.service.ports.http }} diff --git a/bitnami/sonarqube/values.yaml b/bitnami/sonarqube/values.yaml index 3b2dda5876..1688faadf7 100644 --- a/bitnami/sonarqube/values.yaml +++ b/bitnami/sonarqube/values.yaml @@ -406,6 +406,17 @@ service: ## @param service.extraPorts Extra ports to expose in SonarQube service (normally used with the `sidecars` value) ## extraPorts: [] + ## @param service.sessionAffinity Session Affinity for Kubernetes service, can be "None" or "ClientIP" + ## If "ClientIP", consecutive client requests will be directed to the same Pod + ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies + ## + sessionAffinity: None + ## @param service.sessionAffinityConfig Additional settings for the sessionAffinity + ## sessionAffinityConfig: + ## clientIP: + ## timeoutSeconds: 300 + ## + sessionAffinityConfig: {} ## SonarQube ingress parameters ## ref: https://kubernetes.io/docs/user-guide/ingress/ ##