Can someone help me resolve the issue related to the deployment object change?
I’m trying to upgrade the SonarQube app from version 9.9.8 to 25.10.
Currently, the app is deployed via a Helm chart, and the current chart version is 8.0.8+3946.
According to the documentation, I first need to upgrade to 24.12, and then proceed to 25.10 app version
The corresponding Helm chart version for app version 24.12 is 10.8.0.
During the upgrade process, I encountered the issue shown below.
I’m also using the fullNameOverride parameter, which is set to “ci”
Upgrade failed: cannot patch "sonarqube-ci" with kind Deployment:
│ Deployment.apps "sonarqube-ci-tools" is invalid: spec.selector: Invalid
│ value: v1.LabelSelector{MatchLabels:map[string]string{"app":"ci",
│ "app.kubernetes.io/name":"sonarqube",
│ "app.kubernetes.io/version":"10.8.0-community", "release":"sonarqube"},
│ MatchExpressions:[]v1.LabelSelectorRequirement(nil)}: field is immutable
The safest solution is to delete just the Deployment resource before upgrading: kubectl delete deployment sonarqube-ci -n <namespace>, then run your helm upgrade command. This won’t delete your PersistentVolumeClaims or database data - Helm will recreate the Deployment with the correct labels and reattach to your existing volumes.
Alternatively, you can use helm upgrade sonarqube sonarqube/sonarqube --version 10.8.0 -f your-values.yaml --force, which automates the deletion and recreation process. Just make sure you have database backups in case something goes wrong.
Thanks for the reply. Yes, I was able to find the changes that produce such an issue
By the way, could you please advise what might be the reason for the absence of metrics on the Database Connectivity graph?I’ve connected the PodMonitor, and other metrics started to appear, except for this one.I’m using RDS PostgreSQL