-
Notifications
You must be signed in to change notification settings - Fork 734
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trigger upgrades automatically on statefulset change #55
Conversation
Yeh it requires 1.7. |
Proposing that this gets merged to master, for next major, see #84 |
Apparently I didn't read up on this enough. For example the change of readiness probe in #81 did not trigger restarts. |
Has the update behaviour changed in 1.8? I had an issue with this when testing rolling updates on StatefulSets. They were first scaled back to 0 and then back to full size when I tested it with upgrading Kafka. Meaning there is a down time. The way I did it was stage the updates with apply, and then removed each pod, waited till it was back up and back again and then picked the next one. |
Under the circumstances I will postpone this. My thinking goes, as in #81 (comment), that the scope of this repo isn't - at least not yet :) - to automate Kafka ops tasks that are manual in a typical non-k8s setup. Also, there won't be any automatic upgrade on configmap changes, though they can be as fundamental as an image or env change, so RollingUpdate might be misleading. |
Haha, just discovered that RollingUpdate is default. Will produce a PR that reverts to OnDelete, based on the argument above. Upon a fresh create from master in minikube v1.8.0:
|
To see this in action, with no other changes: kubectl -n kafka patch statefulset kafka --type='json' -p='[{"op": "replace", "path": "/spec/updateStrategy/type", "value": "RollingUpdate"}]'
144dd60
to
0bce54f
Compare
I guess that recent adopters of Kubernetes will be surprised by not having RollingUpdate. Oldies like me should simply embrace pod volatility :) |
The biggest flaw here is that we don't restart in case of |
A common pattern seems to be to have a sidecar container that mounts the same configmap as a volume and detects changes inside the configmap, then triggers a reload. https://github.com/coreos/prometheus-operator does this for their prometheus statefulsets for example. Googled a bit and found https://stackoverflow.com/a/37331352/1740999 which has some interesting ideas EDIT: Adding sidecars always feels a bit cumbersome though. |
Not when they're ingenious 😬 ... I created #225 to track this. |
Any votes on this? No need to do
kubectl delete
manually, but on the other hand the pod restart sequence may come as a surprise. Also I think it requires Kubernetes 1.7.