Skip to content

Commit 220d31a

Browse files
committed
fix pod phase process
1 parent abeab9f commit 220d31a

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

Extension/k8s/PodExtension.cs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public static bool IsReady(this V1Pod pod)
9191

9292
public static bool IsProcessing(this V1Pod pod)
9393
{
94-
var phase = pod.Status?.Phase switch
94+
return pod.Status?.Phase switch
9595
{
9696
"Pending" => true,
9797
"Running" => false,
@@ -100,13 +100,8 @@ public static bool IsProcessing(this V1Pod pod)
100100
"Failed" => false,
101101
_ => false
102102
};
103-
// Console.WriteLine($"IsProcessing {pod.Metadata.Name} {phase}");
104-
if (phase)
105-
{
106-
return true;
107-
}
108103

109-
return phase;
104+
110105
// if (pod.Status?.Conditions == null) return false;
111106
// return pod.Status.Conditions.Any(condition => condition.Status != "True");
112107
}

0 commit comments

Comments
 (0)