cluster-autoscaler: honor stderrthreshold when logtostderr is enabled#9408
cluster-autoscaler: honor stderrthreshold when logtostderr is enabled#9408pierluigilenoci wants to merge 2 commits intokubernetes:masterfrom
Conversation
Update k8s.io/klog/v2 to v2.140.0 and opt into the new behavior where -stderrthreshold is respected even when -logtostderr=true. This allows users to set -stderrthreshold=WARNING or -stderrthreshold=ERROR to reduce stderr noise, which helps log aggregation systems (DataDog, CloudWatch) avoid misclassifying INFO messages as errors. Signed-off-by: Pierluigi Lenoci <pierluigi.lenoci@gmail.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: pierluigilenoci The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
cc @towca @x13n — would you be able to review this when you get a chance? All CI checks are green. This opts into the klog fix for kubernetes/klog#212 so that |
|
Gentle ping — could you take a look when you get a chance? Happy to address any feedback. Thank you! |
|
Friendly follow-up — this PR has been open for about two and a half weeks with all CI checks green (tests, verify, E2E build all passing). @towca @x13n @BigDarkClown would any of you have a few minutes to review this cluster-autoscaler klog stderrthreshold fix? Happy to address any feedback. Thank you! |
|
@pierluigilenoci: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Summary
k8s.io/klog/v2to v2.140.0 which includes the fix for kubernetes/klog#212-legacy_stderr_threshold_behavior=false-stderrthreshold=INFOto preserve backward-compatible behavior-stderrthresholdtoWARNINGorERRORto reduce stderr noiseThis addresses complaints about log aggregation systems (DataDog, CloudWatch) misclassifying INFO messages as errors because all logs go to stderr.
Related: #3033, #2333, #8302
Ref: kubernetes/klog#212, kubernetes/klog#432
Signed-off-by: Pierluigi Lenoci pierluigi.lenoci@gmail.com