fix(kubernetes): include structured key/value context in client-go logs (#8490)

This commit is contained in:
Sakıp Han Dursun
2026-09-15 10:42:44 +03:00
committed by GitHub
parent b0b317fdd6
commit 8de7a8b89d
3 changed files with 204 additions and 7 deletions

View File

@@ -32,7 +32,7 @@ func init() { plugin.Register(pluginName, setup) }
func setup(c *caddy.Controller) error {
// Do not call klog.InitFlags(nil) here. It will cause reload to panic.
klog.SetLogger(logr.New(&loggerAdapter{log}))
klog.SetLogger(logr.New(&loggerAdapter{P: log}))
k, err := kubernetesParse(c)
if err != nil {