Skip to content

Commit

Permalink
Merge pull request #3729 from slalwani97/update-terminating-state
Browse files Browse the repository at this point in the history
Update pod status to terminating
  • Loading branch information
bboreham committed Nov 26, 2019
2 parents 5345052 + 1ce7707 commit 5dc8332
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions probe/kubernetes/pod.go
Expand Up @@ -56,6 +56,10 @@ func (p *pod) AddParent(topology, id string) {
}

func (p *pod) State() string {
if p.ObjectMeta.DeletionTimestamp != nil {
return "Terminating"
}

return string(p.Status.Phase)
}

Expand Down Expand Up @@ -83,8 +87,8 @@ func (p *pod) VolumeClaimNames() []string {

func (p *pod) GetNode(probeID string) report.Node {
latests := map[string]string{
State: p.State(),
IP: p.Status.PodIP,
State: p.State(),
IP: p.Status.PodIP,
report.ControlProbeID: probeID,
RestartCount: strconv.FormatUint(uint64(p.RestartCount()), 10),
}
Expand Down

0 comments on commit 5dc8332

Please sign in to comment.