-
Notifications
You must be signed in to change notification settings - Fork 2.1k
feat: Add support for start/termination timestamp for init containers #2750
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat: Add support for start/termination timestamp for init containers #2750
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: onasser1 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This issue is currently awaiting triage. If kube-state-metrics contributors determine this is a relevant issue, they will accept it by applying the The 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. |
internal/store/pod.go
Outdated
func createPodInitContainerStateStartedFamilyGenerator() generator.FamilyGenerator { | ||
return *generator.NewFamilyGeneratorWithStability( | ||
"kube_pod_init_container_state_started", | ||
"Start time in unix timestamp for an_init_pod container.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Start time in unix timestamp for an_init_pod container.", | |
"Start time in unix timestamp for an init container inside the pod.", |
internal/store/pod.go
Outdated
"kube_pod_init_container_state_started", | ||
"Start time in unix timestamp for an_init_pod container.", | ||
metric.Gauge, | ||
basemetrics.STABLE, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
basemetrics.STABLE, | |
basemetrics.ALPHA, |
internal/store/pod.go
Outdated
func createPodInitContainerStatusLastTerminatedTimestampFamilyGenerator() generator.FamilyGenerator { | ||
return *generator.NewFamilyGeneratorWithStability( | ||
"kube_pod_init_container_status_last_terminated_timestamp", | ||
"Last terminated time for a pod init container in unix timestamp.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Last terminated time for a pod init container in unix timestamp.", | |
"Last terminated time for an init container inside a pod in unix timestamp.", |
What this PR does / why we need it: Init Containers do not have timestamps for
LastTerminated
andstate_started
Unlike Containers, so we provide themHow does this change affect the cardinality of KSM: (increases, decreases or does not change cardinality)
increases
Which issue(s) this PR fixes: (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged)Fixes #2627