keel icon indicating copy to clipboard operation
keel copied to clipboard

What deployment strategy does keel use?

Open uceimmp opened this issue 4 years ago • 3 comments

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.

uceimmp avatar Sep 03 '21 06:09 uceimmp

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...

andridzi avatar Nov 04 '21 12:11 andridzi

PR opened https://github.com/keel-hq/keel/pull/642

andridzi avatar Nov 08 '21 23:11 andridzi

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%

segfaultex avatar Nov 18 '21 16:11 segfaultex