-
Notifications
You must be signed in to change notification settings - Fork 16.7k
[stable/sonarqube] overiding image.tag=7.4-community does not install default sonarqube plugins #10195
Comments
PR created for this at: #10196 |
When I would like to install plugins, it seems that the default plugins cannot be installed:
I think this is related. Could you verify? |
Not sure if this relates, as I did not experience the same. And am sure this is a standard plugin. Please can you give some more info:
|
chart version
image version
values
logs
Discussion Although the aim was to install the sonar-go-plugin, a permission denied related to a completely different plugin is shown. When the install-plugins element is commented out again, the error vanished. |
@030 did you find a fix for this issue, as I'm having the same problem. Trying to install "sonar-auth-oidc" plugin, but the default plugins fail to install if custom plugins are being installed. |
@ahsan-storm Could you check in the logs whether you see the following error as well?
|
@030 yes I see the following error; with a different plugin name obviously |
Hi @030 and @ahsan-storm, I have just checked on
and get the same error's as you when including plugins to install ie: adding to values something along the lines of
I have checked on the changes I made in PR #10344 will correct both the initial issue I raised and the problem you are seeing. (NOTE: my PR does bump the version of sonarqube to 7.4-community but if you still need 6.7.6-community these changes work for both sonarqube versions in relation to installation of custom plugins) |
@melissapalmer in the latest version of sonarqube |
I did check yes, and with the above type of config for plugins.install those two plugins where installed for me yes. Maybe check the logs for pod starting .. and more specifically the initContainers logs |
Sorry maybe something I did forget please can you try include this in your values.yml file
|
@melissapalmer it did solve the issue. The copy_plugins.sh file was never being executed. Actually there is a new PR which downloads the plugins in the /extensions/plugins directory directly instead of /extensions/plugins/tmp. Once the PR is merged there won't be any need of this copy step which is an overhead I think. |
@ahsan-storm I had a look at the PR #10473 I hope that does not get merged in as it will revert, the changes which fixed the original problem described in this issue. Which was that when using The problem with ' downloads the plugins in the /extensions/plugins directory directly' is that the initContainer overrides the original /extensions/plugins & therefore removes any default plugins of image.tag=7.4-community |
Is there reason to not include the script As a minimum, this should be documented on the |
@carlosjgp FYI open PR #10510 to basically do what you have just suggested. |
* correct overwriting plugins folder Signed-off-by: Melissa Palmer <[email protected]> * correct overwriting plugins folder Signed-off-by: Melissa Palmer <[email protected]>
Is this a request for help?: No
Is this a BUG REPORT or FEATURE REQUEST? (choose one): BUG
Version of Helm and Kubernetes:
helm version
Client: &version.Version{SemVer:"v2.11.0", GitCommit:"2e55dbe1fdb5fdb96b75ff144a339489417b146b", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.11.0", GitCommit:"2e55dbe1fdb5fdb96b75ff144a339489417b146b", GitTreeState:"clean"}
minikube
Which chart: stable/sonarqube
What happened:
The default version of sonarqube used on this chart is 6.7.6-community.
.net core code needs 7.4-community to scan code correctly
Overriding the image.tag in values.yaml 7.4-community does use later docker image
HOWEVER
when its running in the pod 7.4-community does not install the default plugins for sonarqube itself.
even tho if you run the 7.4-community image via docker itself these plugins are installed correctly.
The reason for this is that....
BUT it does have plugins in the lib/bundled-plugins/ folder
SonarQube has class 'ServerPluginRepository.java' (links to both 6 and 7 branches below)
In this class the function 'copyBundledPlugins' copies jars from lib/bundled-plugins/ to /extensions/plugins during start up.
... hence on 6.7.6 the plugins are not in the /extensions/plugins to start with they are copied in later
and on 7.4 they are there to start with.
PROBLEM with the Helm Chart is that it includes a mounted volume to /opt/sonarqube/extensions
via the initContainer (used to download custom extra plugins)
k8s mounted volume is overriding the folder on base 7.4-community image and therefore that folder is empty and no plugins installed to sonarqube
https://stackoverflow.com/questions/53862726/stop-k8s-initcontainers-volume-overwriting-container-folder
What you expected to happen:
7.4-community to run on k8s cluster to have the base plugins installed on startup correctly.
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know: I have done work to correct this will submit a PR for this and add PR number when submitted.
The text was updated successfully, but these errors were encountered: