Skip to content

Commit e4e7474

Browse files
committed
feat: consider removing pod in terminating state
1 parent 8420b99 commit e4e7474

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

webhook-server/app/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def get_nodes_of_service_running_pods(v1, namespace:str, service_selectors: dict
6363
nodes = {
6464
pod.spec.node_name
6565
for pod in pods.items
66-
if pod.spec.node_name # exclude unscheduled pods
66+
if pod.spec.node_name and pod.metadata.deletion_timestamp is None
6767
}
6868
print(f"nodes where pods are scheduled: {nodes}")
6969
return nodes

0 commit comments

Comments
 (0)