feat(lifecycle-manager): add Helm chart support for MaintenanceRequest [3/3] #1735
All Vouch review confidence checks passed
Residual risk 0.30 = Change Risk (0.75) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.75 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.388
Shallow Review Depth
shallow_review_depth
0.289
Sensitive Paths
sensitive_paths
0.075
Real PR Conversation Timeline
1 comments
"Review active on #1735"
general
weight: 0.35
cbumb
Summary
Helm chart changes to deploy the
MaintenanceRequestfeature introduced in Part 1 and Part 2, plus the platform-connector authentication the feature needs in order to work at all. Gated behindcontrollers.maintenanceRequest.enabled(defaults tofalse, opt-in).Part 3 of 3. Parts 1 and 2 are merged; this branch is rebased onto current
main.Why authentication is in scope here
A
MaintenanceRequestmay name any node, butlifecycle-manageris a Deployment running on one node. platform-connector pins a publisher to its own node unless that publisher is on the cross-node allowlist and presents a ServiceAccount token minted for the configured audience.Without both halves the failure is silent: the MR is admitted, its
HealthEventEmittedcondition goesTrue, and the node simply never cordons, with the rejection visible only as anode_mismatchcounter on platform-connector.What's included
Feature deployment
maintenancerequests,maintenancerequests/status,maintenancerequests/finalizers, and node annotation access--enable-maintenance-controllerand--platform-connector-socketflags, platform-connector socket volume mountMaintenanceRequestcontrollers.maintenanceRequest.enabled, documented inlinePlatform-connector authentication
pcAuthhelpers — copied fromkubernetes-object-monitor, namedlifecycle-manager.so the subchart renders standalone without overriding the umbrella'snvsentinel.definitions--platform-connector-token-pathplus the projected ServiceAccount token volume and mount, nested inside the existing feature gatesystem:serviceaccount:<namespace>:lifecycle-managerintoAuthCrossNodeServiceAccountsQuarantine rule — fault-quarantine ruleset matching the
maintenanceRequestNamemetadata key that the mutating webhook stamps on every MR-originated eventTests — 3 helm-unittest suites (8 tests) and an E2E covering create-to-cordon and delete-to-uncordon
Docs —
docs/configuration/lifecycle-manager.md, cross-referencing [authentication.md](docs/configuration/authentication.md)Design notes for reviewers
The allowlist entry is gated on the subchart's own value,
lifecycle-manager.controllers.maintenanceRequest.enabled, read from the umbrella via.Values["lifecycle-manager"]— not on a newglobalkey. One switch drives both the credential and the grant, so they cannot be enabled independently. A second switch is precisely how you end up with a pod holding a valid token that the connector has never heard of.The ServiceAccount name is derived, not written out. It resolves to a fixed
lifecycle-manageronly because the subchart shipsfullNameOverride; overriding that orserviceAccount.namewould otherwise leave the allowlist naming an identity that does not exist. Same class of bug as the hardcoded namespace the derived list already exists to prevent.The two halves cannot be asserted in one test. The umbrella suite runs with
--with-subchart=false, so a subchart template is not selectable from it. Both suites are keyed on the same value instead, with a comment explaining why they are apart.Enabling this rolls platform-connector cluster-wide, because the allowlist lives in its ConfigMap and that ConfigMap's checksum is stamped on the DaemonSet pod template. True of enabling any cross-node publisher, but worth scheduling deliberately. Documented.
Backwards compatible. With
global.platformConnectorAuth.enabled=false, the rendered Deployment is byte-identical to before this change (verified by diff).Type of Change
Component(s) Affected
Testing
Automated
| Gate | Result |
|---|---|
|
make helm-lint| Pass ||
make helm-test| Pass — 8 new tests across 3 suites ||
make license-headers-lint| Pass ||
make gomod-lint| Pass — 33 modules ||
make -C tests lint-test| Pass — 0 issues ||
make -C lifecycle-manager lint-test| Pass |The allowlist test was mutation-checked: removing the MaintenanceRequest condition from the gate (the exact mistake someone would make while tidying that entry into the table with the other five) fails
must not allowlist lifecycle-manager when the MR controller is disabledby name.Switch matrix
Rendered for all four combinations. The token's three pieces appear only when both switches are on:
| MaintenanceRequest | Auth | Token in pod |
|---|---|---|
| on | on | flag, mount, volume |
| on | off | none |
| off | on | none |
| off | off | none |
Live Cluster Testing
Tested on
nvs-dgxc-k8s-azr-scus-dev1using candidateb224f566.3/3, platform-connectors29/29, and lifecycle-manager1/1.lifecycle-managerand preserved the original agent in event metadata.drainOverrides.skip=true.v1.16.0; all workloads recovered and no test resources remained.Checklist
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
Summary by CodeRabbit
- Added opt-in MaintenanceRequest support to Lifecycle Manager, including validation, health-event publishing, node targeting, and platform-connector authentication.
- Added quarantine rules that cordon affected nodes and restore them after maintenance completes.
- Added cross-node authorization for maintenance events.
- Validation webhooks now process only create and update operations.
- Added Lifecycle Manager configuration guidance, authentication details, examples, and quarantine behavior.
- Added coverage for deployment, permissions, authentication, cross-node authorization, and the end-to-end MaintenanceRequest lifecycle.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->