diff --git a/changelog.d/2582.fixed.md b/changelog.d/2582.fixed.md new file mode 100644 index 00000000000..3ad5b529aec --- /dev/null +++ b/changelog.d/2582.fixed.md @@ -0,0 +1 @@ +Don't include non-running pods in node capacity check \ No newline at end of file diff --git a/mirrord/kube/src/api/runtime.rs b/mirrord/kube/src/api/runtime.rs index f10edbb62ee..ac07095ee51 100644 --- a/mirrord/kube/src/api/runtime.rs +++ b/mirrord/kube/src/api/runtime.rs @@ -184,7 +184,10 @@ impl RuntimeData { let mut pod_count = 0; let mut list_params = ListParams { - field_selector: Some(format!("spec.nodeName={}", self.node_name)), + field_selector: Some(format!( + "status.phase=Running,spec.nodeName={}", + self.node_name + )), ..Default::default() };