kruise icon indicating copy to clipboard operation
kruise copied to clipboard

[feature request] add inPlaceUpdate restart count to annotation

Open szy441687879 opened this issue 3 years ago • 5 comments

What would you like to be added: Add inPlaceUpdate restart count to annotation Why is this needed: Our developers use restartCount as a way to judge the status of service, but inPlaceUpdate or Container Restart will add restart count, it may make them confused. Since it hard to change the logic of pod restart count, it's also useful to add restart Caused by kruise in annotation, then handle this in ui。

szy441687879 avatar Feb 23 '22 06:02 szy441687879

@szy441687879 Thanks! I'm thinking should the inPlaceUpdate restart count in annotation to be the count of whole pod or the counts of each containers in pod?

FillZpp avatar Feb 23 '22 07:02 FillZpp

@FillZpp In our scene, the count of whole pod is enough.But record the count of each containers may be more consistent with pod status.

szy441687879 avatar Feb 23 '22 08:02 szy441687879

/assign @szy441687879

FillZpp avatar Mar 07 '22 04:03 FillZpp

I implemented this in my own environment and the result is shown below: Annotations:

apps.kruise.io/inplace-update-containers-restart-count: '{"nginx":{"revision":"sample-d97f89dcf","restartCount":1,"timestamp":"2022-03-24T08:03:23Z"},"sidecar":{"revision":"sample-d97f89dcf","restartCount":1,"timestamp":"2022-03-24T08:03:23Z"}}'
apps.kruise.io/inplace-update-pod-restart-count: "2"

apps.kruise.io/inplace-update-pod-restart-count: The Pod restart count. apps.kruise.io/inplace-update-containers-restart-count: Every container restart count of the pod. (revision: the revision of the container updated.)

The revision and timestamp maybe is different between the containers when we just update one(or a part of containers in the pod) container of the pod.Because we just update the restart count of the container when it will be updated(inplace-update). create a PR for this issue.

diannaowa avatar Mar 24 '22 08:03 diannaowa

Is there any progress on this issue?

chenshiwei-io avatar Aug 01 '22 08:08 chenshiwei-io