You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to consider extending the set of injected key-value pairs by controller-runtime to include the "replicaRole" key, indicating "leader" or "follower". This could be either by default, or opt-in when wiring a controller or webhook.
This would be very helpful when filtering logs for debugging to quickly see all logs, and only those from the "leader".
I'm exploring the solution inside controller-runtime as it is already injecting some key-value pairs into the logger, plus it is aware of leader election.
The motivation is this effort in Kueue: kubernetes-sigs/kueue#6772, and probably a workaround is possible using LogConstructor option.