Skip to content

Commit

Permalink
Evaluate pod readiness gates when determining row color
Browse files Browse the repository at this point in the history
Signed-off-by: Jeremiah Snapp <jeremiahs@tomonetworks.com>
  • Loading branch information
Jeremiah Snapp committed Aug 10, 2024
1 parent 8e1a29f commit 442825c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions internal/render/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,15 @@ func (p Pod) ColorerFunc() model1.ColorerFunc {
case Running:
if c != model1.ErrColor {
c = model1.StdColor

idx, ok = h.IndexOf("READINESS GATES", true)
if ok {
rg := strings.TrimSpace(re.Row.Fields[idx])
rgs := strings.Split(rg, "/")
if (len(rgs) == 2) && (rgs[0] != rgs[1]) {
c = model1.ErrColor
}
}
}
case Terminating:
c = model1.KillColor
Expand Down

0 comments on commit 442825c

Please sign in to comment.