Skip to content

Add "Terminating" state for Pods #1109

Open
@woehrl01

Description

Description

Currently there is no way to query which pods are in terminating state inside NewRelic. Some pods take a long time to terminate and it would be great to track that progress

Could be easily added here:

for _, c := range pod.Status.Conditions {
switch c.Type {
case "Initialized":
if c.Status == "True" {
if !c.LastTransitionTime.IsZero() {
r["initializedAt"] = c.LastTransitionTime.In(time.UTC)
}
}
case "Ready":
r["isReady"] = string(c.Status)
if c.Status == "True" {
if !c.LastTransitionTime.IsZero() {
r["readyAt"] = c.LastTransitionTime.In(time.UTC)
}
}
case "ContainersReady":
if c.Status == "True" {
if !c.LastTransitionTime.IsZero() {
r["containersReadyAt"] = c.LastTransitionTime.In(time.UTC)

Needs to check for DeletionTimestamp, maybe directly use the logic similar like in k9s:
https://github.com/derailed/k9s/blob/6e0e41670672d0aa524a3df859feb6f772381c07/internal/render/pod.go#L314-L337

I'm open to provide a pull request, just would be curious which way to implement (I suggest adding a new status string)

Acceptance Criteria

Have the information in Newrelic:

either:

  • "isReady" will be back to 0
  • new attribute "isTerminating" = 1
  • new status "Terminating" instead of "Running" (prefered)

Describe Alternatives

A clear and concise description of any alternative solutions or features you've considered
Are there examples you could link us to?

Dependencies

Do any other teams or parts of the New Relic product need to be considered?
Some common areas: UI, collector, documentation

Additional context

What else should we know about this story that might not fit into the other categories?

Estimates

S

For Maintainers Only or Hero Triaging this bug

Suggested Priority (P1,P2,P3,P4,P5):
Suggested T-Shirt size (S, M, L, XL, Unknown):

Metadata

Assignees

No one assigned

    Labels

    feature requestCategorizes issue or PR as related to a new feature or enhancement.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions