Skip to content

Commit

Permalink
SONAR-24105 remove 9.9 deprecated feature
Browse files Browse the repository at this point in the history
  • Loading branch information
jCOTINEAU committed Jan 8, 2025
1 parent ac950e6 commit a84ae59
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion charts/sonarqube-dce/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@ Since SonarQube needs Elasticsearch, some [bootstrap checks](https://www.elastic
This chart offers the option to use an initContainer in privilaged mode to automatically set certain kernel settings on the kube worker. While this can ensure proper functionality of Elasticsearch, modifying the underlying kernel settings on the Kubernetes node can impact other users. It may be best to work with your cluster administrator to either provide specific nodes with the proper kernel settings, or ensure they are set cluster wide.
To enable auto-configuration of the kube worker node, set `elasticsearch.configureNode` to `true`. This is the default behavior, so you do not need to explicitly set this.
To enable auto-configuration of the kube worker node, set `initSysctl.enabled` to `true`. This is the default behavior, so you do not need to explicitly set this.

This will run `sysctl -w vm.max_map_count=262144` on the worker where the sonarqube pod(s) get scheduled. This needs to be set to `262144` but normally defaults to `65530`. Other kernel settings are recommended by the [docker image](https://hub.docker.com/_/sonarqube/#requirements), but the defaults work fine in most cases.

Expand Down
1 change: 1 addition & 0 deletions charts/sonarqube/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ All changes to this chart will be documented in this file.
* Update ingress-nginx subchart to 4.11.3
* Support Kubernetes v1.32
* Remove the default passcode provided with `monitoringPasscode`
* Remove deprecated `elasticsearch.configureNode`

## [10.8.1]
* Update Chart's version to 10.8.1
Expand Down
2 changes: 2 additions & 0 deletions charts/sonarqube/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ annotations:
description: "Support Kubernetes v1.32"
- kind: changed
description: "Remove the default passcode provided with 'monitoringPasscode'"
- kind: removed
description: "Remove deprecated `elasticsearch.configureNode`"
artifacthub.io/containsSecurityUpdates: "false"
artifacthub.io/images: |
- name: sonarqube
Expand Down
5 changes: 2 additions & 3 deletions charts/sonarqube/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,6 @@ The following table lists the configurable parameters of the SonarQube chart and

| Parameter | Description | Default |
| ------------------------------- | ----------------------------------------------- | ------- |
| `elasticsearch.configureNode` | [DEPRECATED] Use initSysctl.enabled instead. | `false` |
| `elasticsearch.bootstrapChecks` | Enables/disables Elasticsearch bootstrap checks | `true` |

### Service
Expand Down Expand Up @@ -624,11 +623,11 @@ Since SonarQube comes bundled with an Elasticsearch instance, some [bootstrap ch

This chart offers the option to use an initContainer in privileged mode to automatically set certain kernel settings on the kube worker. While this can ensure proper functionality of Elasticsearch, modifying the underlying kernel settings on the Kubernetes node can impact other users. It may be best to work with your cluster administrator to either provide specific nodes with the proper kernel settings, or ensure they are set cluster wide.

To enable auto-configuration of the kube worker node, set `elasticsearch.configureNode` to `true`. This is the default behavior, so you do not need to explicitly set this.
To enable auto-configuration of the kube worker node, set `initSysctl.enabled` to `true`. This is the default behavior, so you do not need to explicitly set this.

This will run `sysctl -w vm.max_map_count=262144` on the worker where the sonarqube pod(s) get scheduled. This needs to be set to `262144` but normally defaults to `65530`. Other kernel settings are recommended by the [docker image](https://hub.docker.com/_/sonarqube/#requirements), but the defaults work fine in most cases.

To disable worker node configuration, set `elasticsearch.configureNode` to `false`. Note that if node configuration is not enabled, then you will likely need to also disable the Elasticsearch bootstrap checks. These can be explicitly disabled by setting `elasticsearch.bootstrapChecks` to `false`.
To disable worker node configuration, set `initSysctl.enabled` to `false`. Note that if node configuration is not enabled, then you will likely need to also disable the Elasticsearch bootstrap checks. These can be explicitly disabled by setting `elasticsearch.bootstrapChecks` to `false`.

### Extra Config

Expand Down
2 changes: 1 addition & 1 deletion charts/sonarqube/templates/_pod.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ spec:
env:
{{- (include "sonarqube.combined_env" . | fromJsonArray) | toYaml | trim | nindent 8 }}
{{- end }}
{{- if and (or .Values.initSysctl.enabled .Values.elasticsearch.configureNode) (not .Values.OpenShift.enabled) }}
{{- if and .Values.initSysctl.enabled (not .Values.OpenShift.enabled) }}
- name: init-sysctl
image: {{ default (include "sonarqube.image" $) .Values.initSysctl.image }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
Expand Down
2 changes: 0 additions & 2 deletions charts/sonarqube/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,6 @@ containerSecurityContext:

# Settings to configure elasticsearch host requirements
elasticsearch:
# (DEPRECATED) Use initSysctl.enabled instead
configureNode: false
bootstrapChecks: true

service:
Expand Down

0 comments on commit a84ae59

Please sign in to comment.