kruise
kruise copied to clipboard
[feature request] add inPlaceUpdate restart count to annotation
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 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 In our scene, the count of whole pod is enough.But record the count of each containers may be more consistent with pod status.
/assign @szy441687879
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.
Is there any progress on this issue?