Skip to content

Commit

Permalink
fix: write terminating isntead of Running in the describe command (#1719
Browse files Browse the repository at this point in the history
)

Co-authored-by: Tamir David <tamirdavid@Tamirs-MacBook-Pro.local>
  • Loading branch information
tamirdavid1 and Tamir David authored Nov 10, 2024
1 parent 93298c9 commit 4db6329
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions k8sutils/pkg/describe/source/analyze.go
Original file line number Diff line number Diff line change
Expand Up @@ -434,11 +434,23 @@ func analyzePods(resources *OdigosSourceResources, expectedDevices Instrumentati
Value: pod.Spec.NodeName,
Explain: "the name of the k8s node where the current pod being described is scheduled",
}
phase := properties.EntityProperty{
Name: "Phase",
Value: pod.Status.Phase,
Status: podPhaseToStatus(pod.Status.Phase),
Explain: "the current pod phase for the pod being described",

var phase properties.EntityProperty

if pod.DeletionTimestamp != nil {
phase = properties.EntityProperty{
Name: "Phase",
Value: "Terminating",
Status: properties.PropertyStatusTransitioning,
Explain: "the current pod phase for the pod being described",
}
} else {
phase = properties.EntityProperty{
Name: "Phase",
Value: pod.Status.Phase,
Status: podPhaseToStatus(pod.Status.Phase),
Explain: "the current pod phase for the pod being described",
}
}

containers := make([]PodContainerAnalyze, 0, len(pod.Spec.Containers))
Expand Down

0 comments on commit 4db6329

Please sign in to comment.