Skip to content

remove pids from hardeviction, kube and system reserved when nodehardening is true - #1883

Open
Sri Harsha (SriHarsha001) wants to merge 3 commits into
mainfrom
removePIDlimits
Open

remove pids from hardeviction, kube and system reserved when nodehardening is true#1883
Sri Harsha (SriHarsha001) wants to merge 3 commits into
mainfrom
removePIDlimits

Conversation

@SriHarsha001

@SriHarsha001 Sri Harsha (SriHarsha001) commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

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?

  • Yes, PR includes docs updates
  • Yes, issue opened: #
  • No

Release Note


Copilot AI lite review requested due to automatic review settings September 1, 2026 23:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 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 pid into kube-reserved / system-reserved and remove pid.available from evictionHard when node hardening is enabled.
  • Keep PID reservation and pid.available hard-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.

Comment thread pkg/providers/instancetype/nodehardening.go
Copilot AI review requested due to automatic review settings September 1, 2026 23:59
@SriHarsha001 Sri Harsha (SriHarsha001) changed the title remove pids from hardeviction, kube and system reserved when nodehard… remove pids from hardeviction, kube and system reserved Sep 1, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 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

Comment thread pkg/providers/imagefamily/resolver_unit_test.go
Copilot AI review requested due to automatic review settings September 3, 2026 18:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 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

@SriHarsha001 Sri Harsha (SriHarsha001) changed the title remove pids from hardeviction, kube and system reserved remove pids from hardeviction, kube and system reserved when nodehardening is true Sep 3, 2026
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