What happened:
A plain controller-runtime manager.Runnable does not opt into leader election; runnables that do not implement LeaderElectionRunnable are started on every replica. With HA replicas this loop therefore performs competing accrual writes and splits successful windows across process-local counters, exactly the state this comment intends to prevent. Make CostAccrual implement NeedLeaderElection() bool and return true.
What you expected to happen:
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
Environment:
What happened:
A plain controller-runtime manager.Runnable does not opt into leader election; runnables that do not implement LeaderElectionRunnable are started on every replica. With HA replicas this loop therefore performs competing accrual writes and splits successful windows across process-local counters, exactly the state this comment intends to prevent. Make CostAccrual implement NeedLeaderElection() bool and return true.
What you expected to happen:
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
Environment: