Skip to content

Commit 6e6329d

Browse files
authored
cleanup: Remove unused globalDryRun feature (#123) (#130)
1 parent 0715ec6 commit 6e6329d

File tree

3 files changed

+2
-11
lines changed

3 files changed

+2
-11
lines changed

CONTEXT.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,6 @@ spec:
312312
### Error Recovery
313313
- Failed node evaluations recorded in rule status
314314
- Controller continues processing other nodes on individual failures
315-
- Global dry-run mode as emergency off-switch
316315
- Conservative approach: missing conditions = unsatisfied (keep restrictive taints)
317316

318317
### Observability

internal/controller/node_controller.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,8 @@ func (r *RuleReadinessController) processNodeAgainstAllRules(ctx context.Context
132132
continue
133133
}
134134

135-
// Skip if dry run or global dry run
136-
if rule.Spec.DryRun || r.globalDryRun {
135+
// Skip if dry run
136+
if rule.Spec.DryRun {
137137
log.Info("Skipping rule - dry run mode",
138138
"node", node.Name, "rule", rule.Name)
139139
continue

internal/controller/nodereadinessrule_controller.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,6 @@ type RuleReadinessController struct {
5656
// Cache for efficient rule lookup
5757
ruleCacheMutex sync.RWMutex
5858
ruleCache map[string]*readinessv1alpha1.NodeReadinessRule // ruleName -> rule
59-
60-
// Global dry run mode (emergency off-switch)
61-
globalDryRun bool
6259
}
6360

6461
// RuleReconciler handles NodeReadinessRule reconciliation.
@@ -577,11 +574,6 @@ func (r *RuleReadinessController) processDryRun(ctx context.Context, rule *readi
577574
return nil
578575
}
579576

580-
// SetGlobalDryRun sets the global dry run mode (emergency off-switch).
581-
func (r *RuleReadinessController) SetGlobalDryRun(dryRun bool) {
582-
r.globalDryRun = dryRun
583-
}
584-
585577
// cleanupTaintsForRule removes taints managed by this rule from all applicable nodes.
586578
func (r *RuleReadinessController) cleanupTaintsForRule(ctx context.Context, rule *readinessv1alpha1.NodeReadinessRule) error {
587579
log := ctrl.LoggerFrom(ctx)

0 commit comments

Comments
 (0)