Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into fix-podmonitor
Browse files Browse the repository at this point in the history
  • Loading branch information
wwsean08 committed Apr 9, 2024
2 parents 416877b + 1aab10a commit ceb1fb5
Show file tree
Hide file tree
Showing 18 changed files with 88 additions and 46 deletions.
1 change: 1 addition & 0 deletions charts/sonarqube-dce/CHANGELOG.md
Expand Up @@ -14,6 +14,7 @@ All changes to this chart will be documented in this file.
* Set memory and cpu limits for the test container
* Fix `searchAuthentication` probes failure by enforcing basic auth on wget
* Remove outdated doc about persistency
* Deprecate nginx.enabled in favor of ingress-nginx.enabled, to match with subchart config block
* Take `sonarWebContext` into account for the `PodMonitor` path

## [10.4.0]
Expand Down
4 changes: 2 additions & 2 deletions charts/sonarqube-dce/Chart.lock
Expand Up @@ -5,5 +5,5 @@ dependencies:
- name: ingress-nginx
repository: https://kubernetes.github.io/ingress-nginx
version: 4.9.1
digest: sha256:c0249e7c011b55419b325607256f224d86caba7fdd149da44cf1965c93ac26aa
generated: "2024-02-13T11:39:52.40224+01:00"
digest: sha256:7b295e856802bbcebf0766c71fc3a349eb47f97b9f582103f6ccdcbe03801571
generated: "2024-04-09T09:56:45.625068+02:00"
4 changes: 3 additions & 1 deletion charts/sonarqube-dce/Chart.yaml
Expand Up @@ -51,6 +51,8 @@ annotations:
description: "Fix `searchAuthentication` probes failure by enforcing basic auth on wget"
- kind: removed
description: "Remove outdated doc about persistency"
- kind: deprecated
description: "Deprecate nginx.enabled in favor of ingress-nginx.enabled, to match with subchart config block"
- kind: fixed
description: "Take `sonarWebContext` into account for the `PodMonitor` path"
artifacthub.io/links: |
Expand All @@ -72,4 +74,4 @@ dependencies:
- name: ingress-nginx
version: 4.9.1
repository: https://kubernetes.github.io/ingress-nginx
condition: nginx.enabled
condition: nginx.enabled,ingress-nginx.enabled
15 changes: 8 additions & 7 deletions charts/sonarqube-dce/README.md
Expand Up @@ -125,7 +125,7 @@ The SonarQube helm chart is packed with multiple features enabling users to inst

Nonetheless, if you intend to run a production-grade SonarQube please follow these recommendations.

* Set `nginx.enabled` to **false**. This parameter would run the nginx chart. This is useful for testing purposes only. Ingress controllers are critical Kubernetes components, we advise users to install their own.
* Set `ingress-nginx.enabled` to **false**. This parameter would run the nginx chart. This is useful for testing purposes only. Ingress controllers are critical Kubernetes components, we advise users to install their own.
* Set `postgresql.enabled` to **false**. This parameter would run the postgresql pre-2022 bitnami chart. That is useful for testing purposes, however, given that the database is at the hearth of SonarQube, we advise users to be careful with it and use a well-maintained database as a service or deploy their own database on top of Kubernetes.
* Set `initSysctl.enabled` to **false**. This parameter would run **root** `sysctl` commands, while those sysctl-related values should be set by the Kubernetes administrator at the node level (see [here](#elasticsearch-prerequisites))
* Set `initFs.enabled` to **false**. This parameter would run **root** `chown` commands. The parameter exists to fix non-posix, CSI, or deprecated drivers.
Expand All @@ -147,10 +147,10 @@ Please find here the default SonarQube Xmx parameters to setup the memory reques

To comply with the 80% rule mentioned above, we set the following default values:

- searchNodes.resources.memory.request/limit=3072M
- ApplicationNodes.resources.memory.request/limit=4096M
* searchNodes.resources.memory.request/limit=3072M
* ApplicationNodes.resources.memory.request/limit=4096M

Please feel free to adjust those values to your needs. However, given that memory is a “non-compressible” resource, we advise you to set the memory requests and limits to the **same**, making memory a guaranteed resource. This is needed especially for production use cases.
Please feel free to adjust those values to your needs. However, given that memory is a “non-compressible” resource, we advise you to set the memory requests and limits to the **same**, making memory a guaranteed resource. This is needed especially for production use cases.

To get some guidance when setting the Xmx and Xms values, please refer to this [documentation](https://docs.sonarsource.com/sonarqube/latest/setup-and-upgrade/configure-and-operate-a-server/environment-variables/) and set the environment variables or sonar.properties accordingly.

Expand Down Expand Up @@ -373,7 +373,8 @@ The following table lists the configurable parameters of the SonarQube chart and

| Parameter | Description | Default |
| ------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------------------------ |
| `nginx.enabled` | Also install Nginx Ingress Helm | `false` |
| `ingress-nginx.enabled` | Install Nginx Ingress Helm | `false` |
| `nginx.enabled` | (DEPRECATED) please use `ingress-nginx.enabled` | `false` |
| `ingress.enabled` | Flag to enable Ingress | `false` |
| `ingress.labels` | Ingress additional labels | `{}` |
| `ingress.hosts[0].name` | Hostname to your SonarQube installation | `sonarqube.your-org.com` |
Expand All @@ -382,7 +383,7 @@ The following table lists the configurable parameters of the SonarQube chart and
| `ingress.hosts[0].servicePort` | Optional field to override the default servicePort of a path | `None` |
| `ingress.tls` | Ingress secrets for TLS certificates | `[]` |
| `ingress.ingressClassName` | Optional field to configure ingress class name | `None` |
| `ingress.annotations` | Field to add extra annotations to the ingress | {`nginx.ingress.kubernetes.io/proxy-body-size: "64m"`} if `nginx.enabled=true` |
| `ingress.annotations` | Field to add extra annotations to the ingress | {`nginx.ingress.kubernetes.io/proxy-body-size: "64m"`} if `ingress-nginx.enabled=true or nginx.enabled=true` |

### InitContainers

Expand Down Expand Up @@ -464,7 +465,7 @@ The bundled PostgreSQL Chart is deprecated. Please see <https://artifacthub.io/p
| `tests.enabled` | Flag that allows tests to be excluded from the generated yaml | `true` |
| `tests.image` | Set the test container image | `"ApplicationNodes.image.repository":"ApplicationNodes.image.tag"` |
| `tests.resources.limits.cpu` | CPU limit for test container | `500m` |
| `tests.resources.limits.memory` | Memory limit for test container | `200M` |
| `tests.resources.limits.memory` | Memory limit for test container | `200M` |

### ServiceAccount

Expand Down
2 changes: 1 addition & 1 deletion charts/sonarqube-dce/templates/NOTES.txt
Expand Up @@ -24,7 +24,7 @@ WARNING:
WARNING: The embedded PostgreSQL is intended for evaluation only, it is DEPRECATED, and it will be REMOVED in a future release.
Please visit https://artifacthub.io/packages/helm/sonarqube/sonarqube#production-use-case for more information.
{{- end }}
{{ if .Values.nginx.enabled }}
{{ if or (.Values.nginx).enabled (index .Values "ingress-nginx" "enabled") }}
WARNING: The ingress nginx controller dependency has been upgraded to a major version (4.x), please carefully read the changelogs at https://github.com/kubernetes/ingress-nginx/releases and refer to the documentation at https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/.
Please also visit https://artifacthub.io/packages/helm/sonarqube/sonarqube#production-use-case for more information.
{{- end }}
4 changes: 2 additions & 2 deletions charts/sonarqube-dce/templates/ingress.yaml
Expand Up @@ -13,12 +13,12 @@ metadata:
{{- if .Values.ingress.labels }}
{{ .Values.ingress.labels | toYaml | trimSuffix "\n"| indent 4 -}}
{{- end}}
{{- if or .Values.ingress.annotations .Values.nginx.enabled}}
{{- if or .Values.ingress.annotations (.Values.nginx).enabled (index .Values "ingress-nginx" "enabled") }}
annotations:
{{- range $key, $value := .Values.ingress.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- if and .Values.nginx.enabled (not (hasKey (.Values.ingress.annotations) "nginx.ingress.kubernetes.io/proxy-body-size")) }}
{{- if and (or (.Values.nginx).enabled (index .Values "ingress-nginx" "enabled")) (not (hasKey (.Values.ingress.annotations) "nginx.ingress.kubernetes.io/proxy-body-size")) }}
nginx.ingress.kubernetes.io/proxy-body-size: "64m"
{{- end -}}
{{- end }}
Expand Down
10 changes: 10 additions & 0 deletions charts/sonarqube-dce/values.schema.json
@@ -1,6 +1,16 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"nginx": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean",
"deprecated": true,
"$comment": "(DEPRECATED) Please use `ingress-nginx.enabled` instead"
}
}
},
"postgresql": {
"type": "object",
"deprecated": true,
Expand Down
12 changes: 10 additions & 2 deletions charts/sonarqube-dce/values.yaml
Expand Up @@ -352,10 +352,18 @@ OpenShift:
# if .Values.ApplicationNodes.env.SONAR_WEB_CONTEXT is set, this value will be ignored
sonarWebContext: ""

# also install the nginx ingress helm chart
nginx:
# (DEPRECATED) please use ingress-nginx instead
# nginx:
# enabled: false

# Install the nginx ingress helm chart
ingress-nginx:
enabled: false

# You can add here any values from the official nginx ingress chart
# controller:
# replicaCount: 3

service:
type: ClusterIP
externalPort: 9000
Expand Down
2 changes: 2 additions & 0 deletions charts/sonarqube/CHANGELOG.md
Expand Up @@ -8,6 +8,7 @@ All changes to this chart will be documented in this file.
* Update default `resources` values matching better default Xmx and Xms of the SonarQube processes.
* Make `ephemeral-storage` resource's limits and requests configurable for the SonarQube container
* Set memory and cpu limits for the test container
* Deprecate nginx.enabled in favor of ingress-nginx.enabled, to match with subchart config block
* Take `sonarWebContext` into account for the `PodMonitor` path

## [10.4.0]
Expand All @@ -18,6 +19,7 @@ All changes to this chart will be documented in this file.
* Add revisionHistoryLimit configuration for SonarQube application Deployment ReplicaSets & StatefulSets
* Update the security contexts to use root as group ID
* Fix empty ingress annotations in values
* Add support for dual stack and IPv6 single stack clusters in readiness/liveness probes

## [10.3.0]
* Upgrade SonarQube to 10.3.0
Expand Down
4 changes: 2 additions & 2 deletions charts/sonarqube/Chart.lock
Expand Up @@ -5,5 +5,5 @@ dependencies:
- name: ingress-nginx
repository: https://kubernetes.github.io/ingress-nginx
version: 4.9.1
digest: sha256:c0249e7c011b55419b325607256f224d86caba7fdd149da44cf1965c93ac26aa
generated: "2024-02-13T11:35:08.339361+01:00"
digest: sha256:7b295e856802bbcebf0766c71fc3a349eb47f97b9f582103f6ccdcbe03801571
generated: "2024-04-09T10:07:16.43662+02:00"
6 changes: 5 additions & 1 deletion charts/sonarqube/Chart.yaml
Expand Up @@ -44,6 +44,10 @@ annotations:
description: "Make 'ephemeral-storage' resource's limits and requests configurable for the SonarQube container"
- kind: changed
description: "Set memory and cpu limits for the test container"
- kind: fixed
description: "Add support for dual stack and IPv6 single stack clusters in readiness/liveness probes"
- kind: deprecated
description: "Deprecate nginx.enabled in favor of ingress-nginx.enabled, to match with subchart config block"
- kind: fixed
description: "Take `sonarWebContext` into account for the `PodMonitor` path"
artifacthub.io/containsSecurityUpdates: "false"
Expand All @@ -58,4 +62,4 @@ dependencies:
- name: ingress-nginx
version: 4.9.1
repository: https://kubernetes.github.io/ingress-nginx
condition: nginx.enabled
condition: nginx.enabled,ingress-nginx.enabled

0 comments on commit ceb1fb5

Please sign in to comment.