Remove zoekt-dynamic-indexserver. Release 1.0.0
What does this MR do and why?
This MR removes zoekt-dynamic-indexserver
. This is a breaking change because k8s refuses to update volumeClaimTemplates
Error: UPGRADE FAILED: cannot patch "gitlab-zoekt" with kind StatefulSet: StatefulSet.apps "gitlab-zoekt" is invalid: spec: Forbidden: updates to statefulset spec for fields other than 'replicas', 'ordinals', 'template', 'updateStrategy', 'persistentVolumeClaimRetentionPolicy' and 'minReadySeconds' are forbidden
Important
Before this MR is released in the main helm chart, we have to execute kubectl delete StatefulSet gitlab-zoekt --cascade=orphan
to allow the upgrade to happen during the next deploy. This will be done without any downtime since the original Pods and PersistentVolumeClaims will be kept (due to --cascade=orphan
).
How to set up and validate locally
- Checkout the main branch
git checkout main
- Uninstall the chart if it's installed
helm uninstall gitlab-zoekt --wait &> /dev/null
- Install the chart
helm install gitlab-zoekt . --set replicas=2 --wait > /dev/null
- Check out the names of the containers in the stateful set
kubectl get po gitlab-zoekt-0 -o yaml | yq -P '.spec.containers[].name'
- Check out the branch of this MR
git checkout remove-dynamic-indexserver
- Attempt to upgrade the chart
helm upgrade gitlab-zoekt . --reuse-values --wait > /dev/null
- It should fail with the invalid StatefulSet error
- Delete the stateful set manually, but keep the pods around
kubectl delete StatefulSet gitlab-zoekt --cascade=orphan
- Upgrade the chart again
helm upgrade gitlab-zoekt . --reuse-values --wait > /dev/null
- Check out the names of the containers in the stateful set. This time you shouldn't see zoekt-dynamic-indexserver
kubectl get po gitlab-zoekt-0 -o yaml | yq -P '.spec.containers[].name'
- Clean up the PVC's that were used by zoekt-dynamic-indexserver
kubectl delete pvc zoekt-data-gitlab-zoekt-0 zoekt-data-gitlab-zoekt-1
Edited by Jason Plum