Add support for InitContainer create/termination timestamps in Pod Metrics
What would you like to be added: Expose the init containers start/terminated timestamps
Why is this needed: We are trying to monitor the container start latencies and observed that kube_pod_container_state_started and kube_pod_container_status_last_terminated_timestamp does not provide information on the init containers.
Describe the solution you'd like Expose the epoch time stamps of the init-containers creation and termination events
Additional context
cc @CatherineF-dev /triage accepted /help
@richabanker: This request has been marked as needing help from a contributor.
Guidelines
Please ensure that the issue body includes answers to the following questions:
- Why are we solving this issue?
- To address this issue, are there any code changes? If there are code changes, what needs to be done in the code and what places can the assignee treat as reference points?
- Does this issue have zero to low barrier of entry?
- How can the assignee reach out to you for help?
For more details on the requirements of such an issue, please see here and ensure that they are met.
If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-help command.
In response to this:
cc @CatherineF-dev /triage accepted /help
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.
Hi, could you share some use cases of monitoring these short-lived containers?
I'm not the original asker, but I also want to monitor the start time of init containers.
In my case it's because we're using the new Kubernetes Sidecar containers https://kubernetes.io/docs/concepts/workloads/pods/sidecar-containers/ which are implemented as long running init containers.
I'm trying to monitor when each sidecar is started and how long it takes for it to become ready, but those metrics only exist for "normal" containers
I see. We have added tag help-wanted. Feel free to create a pull request.
Hey @CatherineF-dev , Apologies. I lost track of this issue and just saw your response.
We are interested in these metrics for a couple of reason
- We are interested to understand the overhead these init containers are causing during the pod startup.
- There are some long running init containers as @drolando-stripe mentioned.
Thanks Orlando for taking the look and creating the PR
Hi @darshanbm89 , Is this issue fixed by Orlando's PR or it's still available for me to work on?
@onasser1 The author seems to have dropped working on the linked PR and haven't responded in a while, so please feel free to pick this up, thank you.