From b0f04a19f6f87c6b26959db5d676cd2a8ed18af2 Mon Sep 17 00:00:00 2001 From: Aviram Hassan Date: Wed, 10 Jul 2024 10:03:21 +0300 Subject: [PATCH] Don't include non-running pods in node capacity check (#2583) --- changelog.d/2582.fixed.md | 1 + mirrord/kube/src/api/runtime.rs | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 changelog.d/2582.fixed.md 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() };