[stable/sonarqube] Remove privileged securityContext from chmod-volume-mounts init container (#20525)

* [stable/sonarqube] Remove privileged securityContext from chmod-volume-mounts init container

Signed-off-by: Chris Suran <suran.c@gmail.com>

* [stable/sonarqube] Update README to clarify Elasticsearch settings

Signed-off-by: Chris Suran <suran.c@gmail.com>
This commit is contained in:
Chris Suran
2020-02-18 06:53:28 -08:00
committed by GitHub
parent c89126cc91
commit d3b9ed1ecd
3 changed files with 3 additions and 5 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
apiVersion: v1
name: sonarqube
description: SonarQube is an open sourced code quality scanning tool
version: 3.4.0
version: 3.4.1
appVersion: 7.9.2
keywords:
- coverage
+2 -2
View File
@@ -149,8 +149,8 @@ Since SonarQube comes bundled with an Elasticsearch instance, some [bootstrap ch
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`
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.
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.
Note that if node configuration is not enabled, then you will likely need to disable the Elasticsearch bootstrap checks. These can be explicitly enabled by setting `elasticsearch.bootstrapChecks` to `false`.
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`.
@@ -43,8 +43,6 @@ spec:
chown 999:999 -R $(printf "/opt/sonarqube/${1-%s\n}" temp logs data extensions/downloads extensions/plugins/tmp extensions/plugins)'
image: busybox:1.31
imagePullPolicy: IfNotPresent
securityContext:
privileged: true
volumeMounts:
- mountPath: /opt/sonarqube/temp
name: sonarqube