keel
keel copied to clipboard
What deployment strategy does keel use?
I am keen to know what deployment strategy keel uses when redeploying pods with updated images (e.g. rolling update, recreate, canary).
My use case is as follows. I want to use an ACR webhook to automatically restart my pods everytime an ACR task updating an image is run. I only have one running pod and would like to achieve this with minimum downtime.
My understanding is that by specifying the max surge value to be one during a rolling restart update this can be easily achieved.
It's using RollingUpdate by default and there is a problem when you want to use the Persistent Volume.
The attempt of update will result in Multi-Attach error for volume...
PR opened https://github.com/keel-hq/keel/pull/642
If your use case can only have a single pod connected to a Persistent Volume at a time like in the case of using an iscsi device. Setting the following worked for me. This will make it so that for a moment you will have 0 pods for a deployment but will ensure that it doesn't try to connect the volume to more than one.
accessModes:
- ReadWriteOncePod
Introducing Single Pod Access Mode for PersistentVolumes
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 0
maxUnavailable: 100%