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 query to get pod labels and generate report by class labels #106

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

naved001
Copy link
Collaborator

@naved001 naved001 commented Feb 18, 2025

This was a request so we can get a breakdown of the rhods-notebooks namespace by class. There's a mutating webhook that adds a label to the pod which is what we use to figure out which class a pod belongs to.

Note that this does not mess with the original invoice and instead generates a new report.

We specifically get pod labels where the class label isn't empty. This label
is currently only expected to be found for the rhods-notebooks namespace.

Once we have the pod labels, we insert this label with the cpu metrics. This
is arbritary, it could have been merged with memory metrics.

Finally, when we are merging our metrics we add this label to the merged_data
dictionary which is ultimately used for processing.
This is basically like how write_metrics_by_namespaces works except:
- it doesn't gather data from coldfront
- instead of namespaces we use namespace+classname as a project name to
create ProjectInvoice objects.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant