fabric8 icon indicating copy to clipboard operation
fabric8 copied to clipboard

mvn fabric8:apply / mvn fabric8:recreate never seems to delete any pods now

Open jstrachan opened this issue 8 years ago • 7 comments

seems to be regression since the new kubernetes client.

Only tested on kubernetes so far. Normally when you run 'mvn fabric8:apply' or 'mvn fabric8:recreate' then after an RC is recreated/updated all the pods are deleted

jstrachan avatar Jul 28 '15 06:07 jstrachan

I wonder if its due to changes in helper methods; like finding all the pods for an RC so they can be deleted?

jstrachan avatar Jul 28 '15 06:07 jstrachan

We should add in functionality to scale rc to 0 before deleting rc. Optional I guess but default to scale down to mimic upstream delete IIRC.

jimmidyson avatar Jul 28 '15 07:07 jimmidyson

I guess we'd also need to wait for the scale to zero to take effect before recreating/updating the RC too. But yeah - nice idea!

jstrachan avatar Jul 28 '15 07:07 jstrachan

BTW we have the same issue with updating an RC too btw. Typically if you update an RC (e.g. to use a different set of env vars or docker image) we need to scale down the RC before applying the update

jstrachan avatar Jul 28 '15 07:07 jstrachan

We need to ensure compatibility with kubernetes client to get consistent experience but can add as option. Important to think of zero downtime, meaning no scale down, update, scale up - need to think of rolling updates.

jimmidyson avatar Jul 28 '15 07:07 jimmidyson

Yes, using a rolling update is another option we should support; though we probably want a separate maven goal for that as we'd not be recreating / updating a single RC but probably having a new RC for the new version etc

jstrachan avatar Jul 28 '15 08:07 jstrachan

Following the convention in kubectl, update the client should default to deleting cascaded resources (e.g. pods when updating an RC). update is now deprecated btw & called replace - follow fabric8io/kubernetes-client#44 for that change.

So it should be fine to do a client.replace(...) & related resources should be deleted & replaced too.

Rolling update will come along soon too.

jimmidyson avatar Aug 03 '15 09:08 jimmidyson