Open porridge opened 5 months ago
I also encountered this problem,this warning will be triggered when running a lot of harnesses
This thread might (or not) have some hints on how to approach this.
controller-runtime
expects this struct for logging. We can likely use logr.New(...) for this. But the existing Logger
interface would need to be made compatible with logr.LogSink.
More effort but does it make sense to migrate to zap
?
the existing
Logger
interface would need to be made compatible with logr.LogSink.
This should be possible without touching the existing methods, right?
What would be the benefits of using zap
? Sorry, I never quite figured out the logging landscape of kubernetes :-)
the existing
Logger
interface would need to be made compatible with logr.LogSink.This should be possible without touching the existing methods, right?
Not really, since the interface signatures must match.
What would be the benefits of using
zap
? Sorry, I never quite figured out the logging landscape of kubernetes :-)
zap
is pretty much now the standard with K8s Operators now since it works well with controller-runtime
. It's also easy to integrate with cobra
and has neat structured logs.
the existing
Logger
interface would need to be made compatible with logr.LogSink.This should be possible without touching the existing methods, right?
Not really, since the interface signatures must match.
I don't see any overlapping methods, am I missing something?
What would be the benefits of using
zap
? Sorry, I never quite figured out the logging landscape of kubernetes :-)
zap
is pretty much now the standard with K8s Operators now since it works well withcontroller-runtime
. It's also easy to integrate withcobra
and has neat structured logs.
Right. However what matters for kuttl is whether it can act as a proxy to testing.T.Log
?
What happened:
Noticed this warning in a test run:
What you expected to happen:
No warning :-)
How to reproduce it (as minimally and precisely as possible):
Not sure...
Anything else we need to know?:
Environment:
kubectl version
):kubectl kuttl version
):v0.15.1-0.20240201073944-c735bec25959
uname -a
):