Allow persistence for plugins when installing both via values and marketplace #687
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello,
I would like to suggest a small change in the algorithm of plugin installation. Currently, if
plugins.install
value is not an empty array, all plugins added via marketplace and not mentioned in values are wiped out on pod restart, despite having persistence enabled in values. It poses an issue in cases where a user has to use helm values for some base plugins, but wants to enable those who work with Sonarqube later to install additional plugins from marketplace as needed.Proposed solution:
I have modified install-plugin.sh script, so that it would write the names of plugin jars installed via values in installed-plugins.txt file and delete only these jars on restart (thus not deleting the plugins installed in another way).
This is NOT a breaking change. If the installed-plugins.txt is not found, the script reverts to original behavior and deletes all plugin files before creating a new txt file and downloading plugins requested in values.
Additionally, I modified the chart to execute the install-plugin.sh script not only if
plugins.install
array is not empty, but also if persistence is enabled. It seems necessary since with enabled persistence even if currently there are no plugins to install in values, there can be plugin jars remaining from the previous deployment in the persistent volume which need to be removed.I hope you will take my suggestion into consideration. It would be a helpful feature for users like me. Thank you for your time.
Please ensure your pull request adheres to the following guidelines:
CHANGELOG.md
file of the respected chart as well as theChart.yaml