kubernetes-sigs / kubernetes-sigs/node-readiness-controller
[FEATURE] Add a suspend field to `NodeReadinessRuleSpec` to pause rule evaluation
- Dominant language
- Go
- Stars
- 163
- Forks
- 74
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 9
Description
### Is your feature request related to a problem or existing issue? Please describe.
Currently, there is no way to temporarily disable or pause the evaluation of a `NodeReadinessRule`. If an administrator needs to perform maintenance on a cluster, test a change, or debug an issue without the controller constantly evaluating and applying/removing taints, their only option is to delete the rule entirely or switch it to dry-run mode (which still runs the evaluations and updates the status).
### Describe the solution you'd like
I would like a `suspend: true` boolean field added to the `NodeReadinessRuleSpec`.
When `suspend` is true, the controller should immediately skip the reconciliation loop for that rule, making no changes to the cluster or the rule's status. The rule essentially becomes frozen in its current state.
YAML example:
```yaml
apiVersion: readiness.node.x-k8s.io/v1alpha1
kind: NodeReadinessRule
metadata:
name: example-rule
spec:
suspend: true # <--- New field
enforcementMode: continuous
taint:
key: readiness.k8s.io/not-ready
effect: NoSchedule
nodeSelector:
matchLabels:
kubernetes.io/os: linux
conditions:
- type: Ready
requiredStatus: "True"
### Describe alternatives you've considered
1. **Using `dryRun: true`:** This doesn't actually stop the controller from evaluating nodes, it just prevents applying the taints. It still consumes controller resources to compute the dry-run results.
2. **Deleting the rule:** Deleting the rule works, but it causes the controller to remove all taints it applied, which alters the cluster state during maintenance. It also requires the user to back up and restore the YAML to pause operations.
Contributor guide
Research direction
Locate NodeReadinessRuleSpec and the controller's reconciliation loop, then trace how rule evaluation, taint changes, and status updates are triggered. Implement the suspend behavior described in the issue and verify that a suspended rule remains unchanged while resuming restores normal evaluation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes
- Domain
- infrastructure
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100