Update pod status to terminating

Signed-off-by: Sumit Lalwani <sumit.lalwani97@gmail.com>
This commit is contained in:
Sumit Lalwani
2019-11-25 11:31:48 +05:30
parent 534505253f
commit 1ce7707f25

View File

@@ -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)
}
@@ -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),
}