Repository navigation
fix(operator): scope package pod events to the operator namespace - #646
Conversation
Signed-off-by: Max Freedom Pollard <[email protected]>
|
Welcome to NodeWright, @MaxFreedomPollard! Thanks for your first pull request. Before review, please ensure:
A maintainer will review this soon. |
|
Important Review skippedReview was skipped as selected files did not have any reviewable changes. ⚙️ Run configurationConfiguration used: Repository: NVIDIA/nodewright/.coderabbit.yaml Review profile: ASSERTIVE Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: NVIDIA/nodewright/.coderabbit.yaml Review profile: ASSERTIVE Plan: Enterprise Run ID: 📒 Files selected for processing (5)
Included review availability: Your plan provides up to 12 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe Pod reconciler now receives and stores the configured operator namespace. Its pod predicate requires that pods belong to this namespace and have both node name and package labels. Pods in other namespaces remain available for draining but do not enter the package-pod workqueue. Tests cover event types, namespace variants, and incomplete labels. Documentation reflects the updated scope. Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix 🚥 Pre-merge checks | ✅ 6✅ Passed checks (6 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Coverage Report for CI Build 35904305825Coverage increased (+0.3%) to 82.506%Details
Uncovered ChangesNo uncovered changes found. Coverage Regressions2 previously-covered lines in 1 file lost coverage.
Coverage Stats
💛 - Coveralls |
Description
Closes #477.
The Pod cache is cluster-wide because drain must see workload pods in every namespace. The package-pod watch currently admits any pod carrying the name label, even outside the operator namespace.
Pass the configured namespace into
PodReconcilerand require bothnodewright.nvidia.com/nameandnodewright.nvidia.com/packageat the watch predicate. This hardens the scope described in the issue while leaving the shared cache and drain behavior unchanged. The documentation now distinguishes cache scope from workqueue admission.Tests cover all four predicate event types, copied labels outside the namespace, missing labels, and legacy/custom install namespaces. The copied-label and name-only cases fail on the base implementation.
Validation:
make fmt,make unit-tests(15 suites, including envtest), andmake lintpass with Go 1.27.1 and Kubernetes 1.37.0 envtest binaries. Cluster e2e suites were not run locally. The CLI contract is unchanged.Checklist