-
Notifications
You must be signed in to change notification settings - Fork 40.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
cronjob controller: reconsider log verbosity #115574
Comments
/sig instrumentation |
/assign @pohly |
@ffilippopoulos you are referring to
when you refer to where is logged as klog.V(4).InfoS So arguably this line should not appear on our controller logs. but the message you are getting is from
I could be wrong here |
@RayAsh37: well spotted.
Whether events should be logged at that verbosity I don't know. The /unassign |
--v
flag to set logs verbosity level
Ok, I assumed that I am seeing the message from |
Not without modifying the source code of the cronjob controller. |
Is the verbosity I think we can increase this value or make it changeable. |
Makes sense to me. |
I traced it down to this change #91712 and most controllers are doing |
I don't think that SIG instrumentation has recommendations for this particular case. Also note that #91712 didn't change the verbosity of these events, they were at "info" (v=0) level already before in kube-controller-manager. It's under the purvey of the individual code owners how important these events are, except that here we probably want consistency inside kube-controller-manager, so this probably should go to SIG Apps. FWIW, logging at level 3 makes more sense to me than the current level 0. |
/remove-sig instrumentation |
Looking at this issue more in depth there are 2 things that I'd like to see being resolved:
In other words, looking at cronjob controller we need:
jm.broadcaster.StartStructuredLogging(3)
eventBroadcaster := record.NewBroadcaster(record.WithContext(ctx)) This should be applied consistently to all controllers. @mengjiao-liu since you're bringing this over to sig-apps call, are you interested in working on this? |
/assign Thanks for the reply. I will work on this. |
@mengjiao-liu once you have a PR up and ready for review, please ping me directly on slack to get a faster response. Thank you! |
What happened?
We are running Kubernetes 1.25.5 and trying to configure kube-controller-manager to be less verbose when logging.
We run kube-controller-manager as a static pod created by Kubelet and use the following command where we pass
--v=0
:The
--v=0
flag seems to passed fine to the final command line of kube-controller-manager:Even though we get tons of the following logs periodically:
which come from https://github.com/kubernetes/kubernetes/blob/master/pkg/controller/cronjob/cronjob_controllerv2.go#L575 where is logged as klog.V(4).InfoS
So arguably this line should not appear on our controller logs.
What did you expect to happen?
Setting flag
--v=0
should be enough to lower log verbosity level according to: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-instrumentation/logging.mdHow can we reproduce it (as minimally and precisely as possible)?
Scheduling a long running job at small intervals should be enough to reproduce our exact case and get the above mentioned logs.
Anything else we need to know?
No response
Kubernetes version
Cloud provider
OS version
Install tools
Container runtime (CRI) and version (if applicable)
Related plugins (CNI, CSI, ...) and versions (if applicable)
The text was updated successfully, but these errors were encountered: