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:
- Label definition: helm-chart-sonarqube/charts/sonarqube/templates/_helpers.tpl at sonarqube-10.8.0-sonarqube-dce-10.8.0 · SonarSource/helm-chart-sonarqube · GitHub
- Usage: helm-chart-sonarqube/charts/sonarqube/templates/sonarqube-sts.yaml at sonarqube-10.8.0-sonarqube-dce-10.8.0 · SonarSource/helm-chart-sonarqube · GitHub
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.