Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion CONTEXT.md
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,6 @@ spec:
### Error Recovery
- Failed node evaluations recorded in rule status
- Controller continues processing other nodes on individual failures
- Global dry-run mode as emergency off-switch
- Conservative approach: missing conditions = unsatisfied (keep restrictive taints)

### Observability
Expand Down
4 changes: 2 additions & 2 deletions internal/controller/node_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ func (r *RuleReadinessController) processNodeAgainstAllRules(ctx context.Context
continue
}

// Skip if dry run or global dry run
if rule.Spec.DryRun || r.globalDryRun {
// Skip if dry run
if rule.Spec.DryRun {
log.Info("Skipping rule - dry run mode",
"node", node.Name, "rule", rule.Name)
continue
Expand Down
8 changes: 0 additions & 8 deletions internal/controller/nodereadinessrule_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,6 @@ type RuleReadinessController struct {
// Cache for efficient rule lookup
ruleCacheMutex sync.RWMutex
ruleCache map[string]*readinessv1alpha1.NodeReadinessRule // ruleName -> rule

// Global dry run mode (emergency off-switch)
globalDryRun bool
Comment thread
ajaysundark marked this conversation as resolved.
}

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

// SetGlobalDryRun sets the global dry run mode (emergency off-switch).
func (r *RuleReadinessController) SetGlobalDryRun(dryRun bool) {
r.globalDryRun = dryRun
}

// cleanupTaintsForRule removes taints managed by this rule from all applicable nodes.
func (r *RuleReadinessController) cleanupTaintsForRule(ctx context.Context, rule *readinessv1alpha1.NodeReadinessRule) error {
log := ctrl.LoggerFrom(ctx)
Expand Down