feat: added StartupProbes status (S) to the PROBES column in the container render (#2920)

* feat: added StartupProbes status (S) to the PROBES column in the container render

Signed-off-by: ffais <ffais@fbk.eu>

* fix: fix tests  in container render

Signed-off-by: ffais <ffais@fbk.eu>

---------

Signed-off-by: ffais <ffais@fbk.eu>
mine
ffais 2024-10-17 18:54:57 +02:00 committed by GitHub
parent f139a5700d
commit be1ec87840
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -79,7 +79,7 @@ func (Container) Header(ns string) model1.Header {
model1.HeaderColumn{Name: "STATE"},
model1.HeaderColumn{Name: "INIT"},
model1.HeaderColumn{Name: "RESTARTS", Align: tview.AlignRight},
model1.HeaderColumn{Name: "PROBES(L:R)"},
model1.HeaderColumn{Name: "PROBES(L:R:S)"},
model1.HeaderColumn{Name: "CPU", Align: tview.AlignRight, MX: true},
model1.HeaderColumn{Name: "MEM", Align: tview.AlignRight, MX: true},
model1.HeaderColumn{Name: "CPU/R:L", Align: tview.AlignRight},
@ -116,7 +116,7 @@ func (c Container) Render(o interface{}, name string, r *model1.Row) error {
state,
boolToStr(co.IsInit),
restarts,
probe(co.Container.LivenessProbe) + ":" + probe(co.Container.ReadinessProbe),
probe(co.Container.LivenessProbe) + ":" + probe(co.Container.ReadinessProbe) + ":" + probe(co.Container.StartupProbe),
toMc(cur.cpu),
toMi(cur.mem),
toMc(res.cpu) + ":" + toMc(res.lcpu),

View File

@ -38,7 +38,7 @@ func TestContainer(t *testing.T) {
"Running",
"false",
"0",
"off:off",
"off:off:off",
"10",
"20",
"20:20",