mirror of
https://github.com/ubicloud/ubicloud.git
synced 2025-10-05 22:31:57 +08:00
KubernetesClusterNexus#create_billing_records is replaced with update_billing_records. This method compares the desired list and existing list of billing records and performs add/remove to make the desired list the reality with minimal changes. The removal of billing records are done on the later-created ones, in order to create less confusion around the final bill. If a user creates a 3-node cluster, then scales it to 5 nodes to reduce it back to 3 nodes, at the end of the month, the user will see 3 long and 2 short nodes in the billing items. The billing update is done right at the beginning of node removal and at the end of node addition process, skewing the bill in favor of the user. The update semaphore is raised right after the node removal begins, and the updating logic eliminates the nodes flagged for retirement from the equation. |
||
---|---|---|
.. | ||
kubernetes_cluster.rb | ||
kubernetes_node.rb | ||
kubernetes_nodepool.rb |