-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
kind/featureCategorizes issue or PR as related to a new feature.Categorizes issue or PR as related to a new feature.
Description
/kind feature
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.
mwysokin
Metadata
Metadata
Assignees
Labels
kind/featureCategorizes issue or PR as related to a new feature.Categorizes issue or PR as related to a new feature.