Add more context info in all KCP logs, especially the logical cluster name and possibly workload cluster name
Is your feature request related to a problem? Please describe.
On shared KCP environments with a number of organizations, workspaces, and registered workload clusters, it can be really hard to locate logs that relate to a given support problem, because a number of log messages are lacking required context information. For example:
processing discovery for resource deployments (deployments.apps)
doesn't show for which logical cluster and workload cluster this action occurs.
Describe the solution you'd like
It would greatly help support to include context information like (at least logical cluster name and workload cluster name) in every log message where they make sense. Additionally, printing them with always the same formatting (structural logging ?) would make it really easier to filter the logs based on this context information.
cc @kylape @csams
Beware rebase cost.
Removed the "good first issue". I am not sure we want that. Doing it throughout our kube fork will be costly.
I agree about the Kube fork. I was at first thinking of KCP code at least: the example mentioned is pure KCP code.
This IMHO should come after refactoring kcp to use logr/v2 and structured logs.