Skip to content

Conversation

@cfiehe
Copy link

@cfiehe cfiehe commented Oct 9, 2025

The PR adds the possibility to add lifecycle hooks to the SonarQube container. With the help of a postStart lifecycle hook it is possible to do an auto database migration by backing up the database and triggering the database migration. An init container does not work because it must terminate before the application container is started, and a sidecar container terminating after the database migration gets automatically restarted. Using a job has the drawback that it becomes difficult to ensure that the job is always started when the SonarQube pod starts. A postStart lifecycle hook is the perfect and lightweight solution for this kind of use case.

Please ensure your pull request adheres to the following guidelines:

  • explain your motives to contribute this change: what problem you are trying to fix, what improvement you are trying to make
  • Document your Changes in the CHANGELOG.md file of the respected chart as well as the Chart.yaml

@carminevassallo carminevassallo self-requested a review October 27, 2025 09:52
@carminevassallo carminevassallo self-assigned this Oct 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants