Skip to content

Commit

Permalink
skip DisruptionTarget pod
Browse files Browse the repository at this point in the history
  • Loading branch information
acoshift committed Oct 7, 2024
1 parent dc81777 commit d74bc4e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,13 @@ func statusHandler(w http.ResponseWriter, r *http.Request) {
continue
}

for _, c := range p.Status.Conditions {
// skip DisruptionTarget pod
if c.Type == "DisruptionTarget" && c.Status == "True" { // reason: TerminationByKubelet
continue
}
}

status.Count++
if p.Status.ContainerStatus.Ready {
status.Ready++
Expand Down

0 comments on commit d74bc4e

Please sign in to comment.