remove pids from hardeviction, kube and system reserved when nodehardening is true - #1883
remove pids from hardeviction, kube and system reserved when nodehardening is true#1883Sri Harsha (SriHarsha001) wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
The change is scoped, consistent across code and tests, and the remaining feedback is a low-severity maintainability note.
Pull request overview
Updates kubelet configuration generation to omit PID reservations and PID hard-eviction thresholds when node hardening is enabled, aligning tests with the new behavior.
Changes:
- Stop injecting
pidintokube-reserved/system-reservedand removepid.availablefromevictionHardwhen node hardening is enabled. - Keep PID reservation and
pid.availablehard-eviction for the non-hardened path. - Update unit/integration tests to assert the absence of PID-related kubelet flags under node hardening.
File summaries
| File | Description |
|---|---|
| pkg/providers/instancetype/suite_test.go | Updates integration expectations to ensure hardened kubelet flags no longer include PID settings. |
| pkg/providers/instancetype/nodehardening.go | Removes the hardened SystemReservedPIDs constant (PID reserved no longer modeled under hardening). |
| pkg/providers/imagefamily/resolver.go | Adjusts kubelet config construction to only add PID reservation + PID hard-eviction when node hardening is disabled. |
| pkg/providers/imagefamily/resolver_unit_test.go | Updates unit tests for hardened vs non-hardened kubelet config outputs regarding PID settings. |
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
🟡 Changes recommended
The bootstrapping-client unit test was weakened (only checks EvictionHard non-nil) and should explicitly assert the PID hard-eviction key remains present to prevent regressions in the “hardening excluded by provision mode” path.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 1
- Review effort level: Lite
There was a problem hiding this comment.
🟢 Approval recommended
The changes are narrowly scoped, align with the stated intent (PID omission only under node hardening), and are backed by targeted test updates for both hardened and non-hardened behavior.
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 0 new
- Review effort level: Lite
This PR is to remove pids from hardeviction, kube and system reserved when nodehardening is true
Fixes #
Description
With node hardening enabled, PID is omitted from --kube-reserved, --system-reserved, and --eviction-hard.
Memory and filesystem hard-eviction thresholds remain unchanged.
Non-hardened and bootstrapping-client behavior remains unchanged.
How was this change tested?
Does this change impact docs?
Release Note