Skip to content

Commit 8679820

Browse files
committed
do not choke on bad pod names
1 parent cf17f2b commit 8679820

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

dashboard/api.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,11 @@ def pods_dict():
6161
restart_age = mk_dt(datetime.now(timezone.utc)-c.last_state.terminated.finished_at)
6262
restart_cause = c.last_state.terminated.reason
6363

64-
svc,deployment,pid = i.metadata.name.rsplit("-", 2)
64+
try:
65+
svc,deployment,pid = i.metadata.name.rsplit("-", 2)
66+
except:
67+
svc,deployment,pid = i.metadata.name,"",""
68+
6569
if svc not in svcs:
6670
svcs[svc] = {}
6771
if deployment not in svcs[svc]:

0 commit comments

Comments
 (0)