Resolve "Unable to update redis/minio in cluster"
Set the spec.strategy.type: Recreate
for minio/redis, as they are stateful deployments with PVCs that can not be shared. The introduction of the default to RollingUpdate
broke upgrades, and required manual user intervention to scale 0
both deployments in order to upgrade. This ensures the value is present, resulting in explicit behavior.
Closes #633 (closed)
Update: Removed breaking thanks to timely find by @twk3 to add
spec:
strategy:
rollingUpdate: null
Leaving the following for posterity/search results
Labelled breaking because k8s exploding due to pre-existing added defaults
$ helm get values gitlab > config.yaml
$ helm upgrade gitlab . -f config.yaml
Error: UPGRADE FAILED: Deployment.apps "gitlab-minio" is invalid: spec.strategy.rollingUpdate: Forbidden: may not be specified when strategy `type` is 'Recreate' && Deployment.apps "gitlab-redis" is invalid: spec.strategy.rollingUpdate: Forbidden: may not be specified when strategy `type` is 'Recreate'
To get around this, one will have to either delete the deployments manually, or
kubectl patch deployment gitlab-redis --type=json -p '[{"op":"replace", "path":"/spec/strategy", "value":{"type":"Recreate"}}]'
kubectl patch deployment gitlab-minio --type=json -p '[{"op":"replace", "path":"/spec/strategy", "value":{"type":"Recreate"}}]'
Edited by Jason Plum