feat: add init container state_started and last_terminated_timestamp metrics#2904
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: maksimp13 The full list of commands accepted by this bot can be found here. DetailsNeeds 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 DetailsInstructions 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. |
b52a67c to
102d158
Compare
…metrics Add two new init container metrics equivalent to their regular container counterparts: - kube_pod_init_container_state_started (STABLE): start time in unix timestamp for init containers in Running or Terminated state - kube_pod_init_container_status_last_terminated_timestamp (ALPHA): last terminated time in unix timestamp for init containers
102d158 to
ae0e40b
Compare
…tainer_status_last_terminated_timestamp to pod metrics documentation
… container metrics
What this PR does
Closes #2627
Adds two new init container metrics, equivalent to their existing regular container counterparts:
kube_pod_init_container_state_startedkube_pod_container_state_started(STABLE)kube_pod_init_container_status_last_terminated_timestampkube_pod_container_status_last_terminated_timestamp(ALPHA)kube_pod_init_container_state_startedemits the start time (unix timestamp) for init containers currently in Running or Terminated state.kube_pod_init_container_status_last_terminated_timestampemits the finish time (unix timestamp) of the last termination for an init container that has aLastTerminationState.Terminatedrecord.Both metrics start at ALPHA and can be graduated once they prove stable, following the standard graduation process.
Changes
internal/store/pod.go— added two new generator functions and registered them increatePodFamilyGeneratorsinternal/store/pod_test.go— added two new test cases covering both metricspkg/app/server_test.go— updated full scrape cycle expected output to include the new HELP/TYPE linesTesting