-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bad log message #2914
Comments
Hm. I think we have a few options:
(cc @alvaroaleman) |
I vote for this. |
Weird, did we break this or did it never work but no one reported it? |
I think we didn't break it, it's just that not every source is nicely printable that way :) E.g. kind source looks better:
Hm, I guess actually the better fix would be to add String() funcs to the sources that don't have one already |
@tamalsaha What source are you using? |
|
Is this a builtin source from controller-runtime or one that has been implemented outside of it? |
This is a typical |
Hm that's strange. I would have expected all of them to use the kind source and thus have a String() func and produce a similar output to: #2914 (comment) |
I'm wondering what logger is used that tries to convert the source to a JSON. We're using component-base in Cluster API and neither the text format (klog) nor the JSON format (zap) is doing this: text:
JSON:
|
|
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
We see log lines like below in our cluster:
I0808 07:14:05.625541 1 controller.go:130] "msg"="Starting EventSource" "controller"="servicemonitor" "controllerGroup"="monitoring.coreos.com" "controllerKind"="ServiceMonitor" "source"=<<error: json: unsupported type: func(event.TypedCreateEvent[sigs.k8s.io/controller-runtime/pkg/client.Object]) bool>>
This is coming from
controller-runtime/pkg/internal/controller/controller.go
Line 132 in fdc8bd7
It seems that
src
can't be converted into a json object. We are using v0.18.4The text was updated successfully, but these errors were encountered: