Skip to content

Commit

Permalink
feat: Fetch node count from md object when autoscaling enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
okozachenko1203 authored and mnaser committed Nov 16, 2023
1 parent 66eda8b commit d64ca86
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion magnum_cluster_api/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,9 @@ def update_nodegroup_status(self, context, cluster, nodegroup):
nodegroup.status = f"{action}_COMPLETE"
elif phase in ("Failed", "Unknown"):
nodegroup.status = f"{action}_FAILED"

# Note: Fetch node_count from md object when autoscaling enabled
if utils.get_auto_scaling_enabled(cluster):
nodegroup.node_count = md.obj["spec"]["replicas"]
nodegroup.save()

return nodegroup
Expand Down

0 comments on commit d64ca86

Please sign in to comment.