Skip to content

Rightsizing remediation: patch-requests (FEAT-1) - #32

Merged
joy-software merged 1 commit into
mainfrom
feature/rightsizing-remediation
Jun 7, 2026
Merged

Rightsizing remediation: patch-requests (FEAT-1)#32
joy-software merged 1 commit into
mainfrom
feature/rightsizing-remediation

Conversation

@joy-software

Copy link
Copy Markdown
Contributor

Closes the loop the resource-usage probe opens (it flags hot pods read-only). The new patch-requests remediation raises/lowers a deployment's requests via kubectl set resources deployment/<name> --requests=cpu=...,memory=... (optional -c container).

Marked destructive (mutates the spec + triggers a rolling restart), so auto is rejected at policy load — a human or the AI approver always gates it. Requires at least one of cpu/memory.

Registered in REMEDIATIONS. Tests: command construction (both/cpu-only), the require-a-resource guard, destructive+auto rejection, gated build. 220 passed; ruff/mypy clean. Task #19.

Closes the loop the resource-usage probe opens: when a pod runs hot against its
declared requests, `patch-requests` raises (or lowers) them via
`kubectl set resources deployment/<name> --requests=cpu=...,memory=...` (optional
-c container). It is marked destructive -- it mutates the workload spec and
triggers a rolling restart -- so autonomy `auto` is rejected at policy load and a
human or the AI approver always gates it. At least one of cpu/memory is required.
@joy-software
joy-software merged commit 3a741cb into main Jun 7, 2026
8 checks passed
@joy-software
joy-software deleted the feature/rightsizing-remediation branch June 7, 2026 21:10
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