in modules/python/clients/kubernetes_client.py [0:0]
def _is_node_schedulable(self, node):
status_conditions = {cond.type: cond.status for cond in node.status.conditions}
is_schedulable = (
status_conditions.get("Ready") == "True"
and status_conditions.get("NetworkUnavailable") != "True"
and node.spec.unschedulable is not True
)
if not is_schedulable:
logger.info(f"Node NOT Ready: '{node.metadata.name}' is not schedulable. status_conditions: {status_conditions}. unschedulable: {node.spec.unschedulable}")
return is_schedulable