Is your feature request related to a problem or existing issue? Please describe.
I noticed in nodereadinessrule_controller.go that an EventRecorder is initialized in NewRuleReadinessController, but a quick grep shows it is never actually used to emit events (Event, Eventf).
When a rule fails to evaluate against a node or a taint fails to apply, the error is only printed to the controller's stdout logs. Standard Kubernetes practice is to emit an EventTypeWarning on the NodeReadinessRule (and possibly the Node) so users can easily see failures via kubectl describe nodereadinessrule <name> or kubectl get events.
Describe the solution you'd like
Add r.Controller.EventRecorder.Eventf(...) calls for major lifecycle events and failures.
For example:
- Normal: "TaintApplied" / "TaintRemoved"
- Warning: "EvaluationFailed" / "TaintApplyFailed"
Describe alternatives you've considered
Forcing users to scrape controller logs or rely entirely on Prometheus metrics, but kubectl describe is usually the first line of defense for users debugging why a node isn't ready.
Is your feature request related to a problem or existing issue? Please describe.
I noticed in
nodereadinessrule_controller.gothat anEventRecorderis initialized inNewRuleReadinessController, but a quick grep shows it is never actually used to emit events (Event,Eventf).When a rule fails to evaluate against a node or a taint fails to apply, the error is only printed to the controller's stdout logs. Standard Kubernetes practice is to emit an
EventTypeWarningon theNodeReadinessRule(and possibly theNode) so users can easily see failures viakubectl describe nodereadinessrule <name>orkubectl get events.Describe the solution you'd like
Add
r.Controller.EventRecorder.Eventf(...)calls for major lifecycle events and failures.For example:
Describe alternatives you've considered
Forcing users to scrape controller logs or rely entirely on Prometheus metrics, but
kubectl describeis usually the first line of defense for users debugging why a node isn't ready.