Skip to content

feat: collect container requests/limits and pod QoS class - #6

Merged
kfeofantov merged 1 commit into
mainfrom
feat/container-resources
Jul 28, 2026
Merged

kfeofantov merged 1 commit into
mainfrom
feat/container-resources

Conversation

@kfeofantov

Copy link
Copy Markdown
Contributor

Second collector slice — from metadata to resource data:

  • Container gains a Resources struct: CPU request/limit in millicores, memory request/limit in bytes — normalized at the source per ADR 0004 (resource units are the truth), no quantity strings downstream.
  • Absent request/limit stays nil, not zero: "not set" is itself a signal (BestEffort pods are prime finding candidates).
  • PodInfo gains the pod's QoS class from status.
  • Still log-only; nothing written or transmitted.

No security.md change needed: §8 already lists requests/limits under resource metrics and keeps spec.containers[].resources in field minimization — the code catches up with the promise, not the other way around.

Tests: unit coverage for full/partial/absent resource declarations (incl. init containers) on the fake clientset; e2e deployment now declares requests/limits and asserts the normalized numbers and QoS class against a real cluster. e2e verified locally on kind v1.36.1.

🤖 Generated with Claude Code

Requests and limits are normalized at the source: CPU to millicores,
memory to bytes. Absent values stay nil — "not set" is a meaningful
fact, distinct from zero. Pod QoS class is taken from status. Already
covered by docs/security.md §8 (resource metrics, field minimization
keeps spec.containers[].resources).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@kfeofantov
kfeofantov merged commit d47b784 into main Jul 28, 2026
3 checks passed
@kfeofantov
kfeofantov deleted the feat/container-resources branch July 28, 2026 19:56
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