Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add queries for APPUiO Managed billing #148

Merged
merged 1 commit into from
Aug 22, 2023

Conversation

HappyTetrahedron
Copy link
Contributor

@HappyTetrahedron HappyTetrahedron commented Aug 17, 2023

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

  • Categorize the PR by setting a good title and adding one of the labels:
    bug, enhancement, documentation, change, breaking, dependency
    as they show up in the changelog
  • Update tests.

@HappyTetrahedron HappyTetrahedron added the enhancement New feature or request label Aug 17, 2023
@HappyTetrahedron HappyTetrahedron requested a review from a team as a code owner August 17, 2023 16:57
@HappyTetrahedron HappyTetrahedron force-pushed the feat/appuio_managed_queries branch 2 times, most recently from 9557e99 to a46a604 Compare August 21, 2023 11:35
@HappyTetrahedron HappyTetrahedron merged commit affd316 into master Aug 22, 2023
3 checks passed
@HappyTetrahedron HappyTetrahedron deleted the feat/appuio_managed_queries branch August 22, 2023 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants