Skip to content

Commit

Permalink
fixup! Add nodepool to the CRD
Browse files Browse the repository at this point in the history
  • Loading branch information
tomach committed Nov 6, 2023
1 parent 8b0d3f8 commit 85b5041
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions crate/operator/create.py
Original file line number Diff line number Diff line change
Expand Up @@ -1117,19 +1117,7 @@ async def create_system_user(


def is_shared_resources_cluster(node_spec: Dict[str, Any]) -> bool:
try:
cpu_request = node_spec["resources"].get("requests", {}).get("cpu")
cpu_limit = node_spec["resources"].get("limits", {}).get("cpu")
memory_request = node_spec["resources"].get("requests", {}).get("memory")
memory_limit = node_spec["resources"].get("limits", {}).get("memory")
nodepool = node_spec.get("nodepool")
if not (cpu_request or memory_request):
return False
return (
cpu_request != cpu_limit or memory_request != memory_limit
) and nodepool == Nodepool.SHARED
except KeyError:
return False
return node_spec.get("nodepool") == Nodepool.SHARED


def get_cluster_resource_requests(
Expand Down

0 comments on commit 85b5041

Please sign in to comment.