For when a node or cluster monthly cost is added, the user will need to choose between CPU or Memory for where the Monthly cost should be distributed. This issue is to handle the distributed cost for when the User chooses memory.
Python Changes Location
We can lean on the upsert_monthly_cluster_cost_line_item method within the ocp_report_db_accessor.py to handle this. (We will also need to do this for tags).
Database Changes
We change the default value of the monthly_infrastructure_cost from a decimal to a json to match the infrastructure and supplementary cost.
- Example of new infrastructure_monthly_cost & supplementary_monthly_cost:
- {"cpu": 0.000000, "memory": 0.000000}
How do I figure out the cpu distributed cost?
- (node Memory capacity / cluster Memory capacity) x cluster cost
Notes:
- the current node monthly cost is being calculated in the no-node option. As a byproduct of this change, we may need to lose the no-node.