API: Include total resources for a node in the node API responses
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 17k
- Forks
- 2.1k
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 105
Description
The node API will currently give the following information:
- NodeResources: The resources available to nomad, as configured in the client config
- ReservedResources: The resources currently reserved by allocations running on the node
What is missing is the total amount of resources as fingerprinted, not necessarily available to nomad.
This would allow us to do things like "X% of available resources are reserved. Y% node resources are available to nomad" without hitting the client stats endpoint like the nomad node status command currently does.
Endpoints affected
/v1/nodes?resources=true/v1/node/:node_id
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the handlers and response structures for /v1/nodes?resources=true and /v1/node/:node_id, then locate the existing NodeResources and ReservedResources fields. Confirm how the node's fingerprinted total resources are represented before adding the response field. Done means both endpoints expose the total and the returned values support comparing total, available, and reserved resources.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- api
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100