kubernetes-sigs / kubernetes-sigs/node-readiness-controller
[TEST] Add an opt-in NPD + NRC end-to-end compatibility suite
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 164
- Forks
- 75
- Avg merge
- 8d 23h
- Merged PRs (30d)
- 13
Description
Motivation
While testing node-readiness transitions, I noticed that the current E2E tests update NodeConditions directly. That tests NRC in isolation, but not the production-like path:
NPD monitor -> NodeCondition -> NRC -> Node taint
Would maintainers be interested in a small, opt-in Kind E2E test for this compatibility path?
Proposed scope
Add a separate target so the existing E2E path remains unchanged:
make test-e2e-npd-kind
- Create a Kind worker with an initial readiness
NoScheduletaint. - Run a pinned stock NPD image; the NPD DaemonSet must tolerate the startup taint.
- Use a deterministic Custom Plugin to test the main lifecycle without patching
NodeConditions from the test:- exit
0-> problem conditionFalse-> taint removed; - exit
1-> conditionTrue-> taint added; - another exit code -> condition
Unknown-> taint retained; - recovery to exit
0-> taint removed.
- exit
- Add one built-in
SystemLogMonitor(filelog) case: a synthetic matching log changes a permanent condition toTrue, which NRC consumes and turns into a taint. - Use a continuous Rule with
requiredStatus: "False"and nodefaultStatus, so a missing condition remains fail-closed. - Assert the Node
Readycondition is preserved and collect Node, Rule, Event, Pod, and NPD/NRC logs on failure.
The test would use bounded polling (Eventually) and pinned image versions. It would start as local/opt-in or periodic and only become presubmit-gating after stability data is available.
Non-goals
- No direct
NodeConditionpatching in this suite. - No dependency on the
npd-proberwork in #159. - No Descheduler/remediation flow from #201.
- No Reporter, heartbeat freshness enforcement, destructive host fault injection, or exhaustive testing of every NPD monitor.
- No new NRC API or build-time dependency on NPD.
This should complement the existing direct NRC E2E tests and the examples in #159/#201 by validating the producer-to-policy contract. Would this focused scope be useful, and should it remain opt-in or run periodically first?
/kind feature
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read the existing direct NRC E2E tests and current E2E make targets first, then evaluate the proposed make test-e2e-npd-kind entry point with Kind and pinned NPD images. Done means the opt-in suite covers the listed Custom Plugin, SystemLogMonitor, fail-closed Rule, condition-preservation, polling, and failure-log collection cases without directly patching NodeConditions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes
- Domain
- devops, testing
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100