appuio / appuio-cloud-reporting

Reporting for APPUiO Cloud
BSD 3-Clause "New" or "Revised" License
0 stars 1 forks source link

Add queries for APPUiO Managed billing #148

Closed HappyTetrahedron closed 1 year ago

HappyTetrahedron commented 1 year ago

Summary

This adds/updates the necessary queries for APPUiO Managed OpenShift reporting.

I've realized that we can use the same vCPU query for both the new and the old billing, and distinguish between the two models based on the SLA - the old model uses a disjoint list of SLAs.

In a similar vein, the Cluster query - used for the cluster base fee from the old billing model - is set up to only return values for clusters with one of the old SLAs. In this way, new clusters won't get facts for the cluster count, and therefore won't be billed for that.

~Currently, the queries use a lookup key format of query:cloud:sla:tenant:cluster[:role] - this only works if we accept #147. Without #147, the tenant must be at the 3rd position in the lookup key. It could be made to work that way, it would just lead to "uglier" product keys.~

Queries use the source key format query:cloud:tenant:cluster:sla[:role]

Checklist