Support lifecycle hooks and fix terminationGracePeriodSeconds for SonarQube container#802
Open
Rumbles wants to merge 1 commit intoSonarSource:masterfrom
Open
Support lifecycle hooks and fix terminationGracePeriodSeconds for SonarQube container#802Rumbles wants to merge 1 commit intoSonarSource:masterfrom
Rumbles wants to merge 1 commit intoSonarSource:masterfrom
Conversation
…rQube container - Add `lifecycle` value to allow configuring container lifecycle hooks (e.g. preStop hook for graceful ALB draining on spot instance termination) - Fix `terminationGracePeriodSeconds` which was present in values.yaml but never rendered into the pod spec template Relates to: https://sonarsource.atlassian.net/browse/SONAR-26367 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
pedroamantecon
approved these changes
Mar 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
This PR addresses SONAR-26367, re-implementing the work from the previously closed #745.
Changes
lifecyclevalue to allow configuring container lifecycle hooks on the SonarQube container. This enables use cases such as apreStophook to give the load balancer time to drain connections before the pod terminates — particularly important when running on spot/preemptible instances.terminationGracePeriodSeconds— this value has existed invalues.yamlsince v0.9.0 but was never rendered into the pod spec template. It was recently marked as(DEPRECATED) This value is not used in the templatesin the 10.8.0 changelog, but we believe this is a bug rather than an intentional removal: the value is meaningless if it isn't applied. This PR wires it up correctly.Example usage
Checklist
CHANGELOG.mdRelates to: https://sonarsource.atlassian.net/browse/SONAR-26367