Răsfoiți Sursa

status patch for failed controller/pods

sunguroku 5 ani în urmă
părinte
comite
c43694881e

+ 13 - 1
dashboard/src/main/home/cluster-dashboard/expanded-chart/status/ControllerTab.tsx

@@ -141,7 +141,7 @@ export default class ControllerTab extends Component<PropsType, StateType> {
 
       status?.containerStatuses?.forEach((s: any) => {
         if (s.state?.waiting) {
-          collatedStatus = "waiting";
+          collatedStatus = s.state?.waiting.reason === "CrashLoopBackOff" ? "failed" : "waiting";
         } else if (s.state?.terminated) {
           collatedStatus = "failed";
         }
@@ -195,6 +195,18 @@ export default class ControllerTab extends Component<PropsType, StateType> {
     let [available, total] = this.getAvailability(controller.kind, controller);
     let status = available == total ? "running" : "waiting";
 
+    controller?.status?.conditions?.forEach(
+      (condition: any) => {
+        if (
+          condition.type == "Progressing" &&
+          condition.status == "False" &&
+          condition.reason == "ProgressDeadlineExceeded"
+        ) {
+          status = 'failed';
+        }
+      }
+    );
+    
     if (controller.kind.toLowerCase() === "job" && this.state.raw.length == 0) {
       status = "completed";
     }