New StatefulSet selector forces deletion of SonarQube sts for every upgrade

Must-share information (formatted with Markdown):

  • which versions are you using: SonarQube Server (We’re using Developer edition, but this applies to any version deployed with the official Helm chart.)
  • how is SonarQube deployed: Helm

The new (10.8.0) version of the Helm chart includes the version of SonarQube being deployed as one of the SonarQube StatefulSet selector labels:

The spec.selector field in a StatefulSet is immutable, which means that having the version of SonarQube in spec.selector.MatchLabels means that you cannot update the SonarQube StatefulSet to a new version in-place. (If you try, you’ll get the following error: Forbidden: updates to statefulset spec for fields other than 'replicas', 'ordinals', 'template', 'updateStrategy', 'persistentVolumeClaimRetentionPolicy' and 'minReadySeconds' are forbidden) In order to update, you need to delete the SonarQube StatefulSet. Either the upgrade documentation should reflect this or (preferably) you could remove the version from the selector labels to allow in-place upgrades again.

Dear @frimano,

Thanks for posting in our community!

The bug you are highlighting was indeed affecting 10.8.0. Given its severity, we worked on patch release of our helm chart (10.8.1) that is already available on ArtifactHub.

(As you might know already, an upgrade to 10.8.1 would still require to delete your Statefulset).

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.