Skip to content

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.
Copy link
Collaborator

@QuanMPhm QuanMPhm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some minor comments

@naved001
Copy link
Collaborator Author

@QuanMPhm I have addressed your comments.

@naved001 naved001 merged commit 77a3fd7 into CCI-MOC:main Feb 26, 2025
2 checks passed
@naved001 naved001 deleted the rhods-notebook branch February 27, 2025 15:19
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.

3 participants