Skip to content

cluster-autoscaler: honor stderrthreshold when logtostderr is enabled#9408

Open
pierluigilenoci wants to merge 1 commit intokubernetes:masterfrom
pierluigilenoci:fix/honor-stderrthreshold
Open

cluster-autoscaler: honor stderrthreshold when logtostderr is enabled#9408
pierluigilenoci wants to merge 1 commit intokubernetes:masterfrom
pierluigilenoci:fix/honor-stderrthreshold

Conversation

@pierluigilenoci
Copy link
Copy Markdown
Contributor

@pierluigilenoci pierluigilenoci commented Mar 24, 2026

Summary

  • Update k8s.io/klog/v2 to v2.140.0 which includes the fix for kubernetes/klog#212
  • Opt into the new klog behavior by setting -legacy_stderr_threshold_behavior=false
  • Set -stderrthreshold=INFO to preserve backward-compatible behavior
  • Users can now override -stderrthreshold to WARNING or ERROR to reduce stderr noise

This 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

cluster-autoscaler: Honor -stderrthreshold flag when -logtostderr=true by opting into klog v2.140.0 fix

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>
@k8s-ci-robot k8s-ci-robot added do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. area/cluster-autoscaler do-not-merge/needs-area labels Mar 24, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: pierluigilenoci
Once this PR has been reviewed and has the lgtm label, please assign towca for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed do-not-merge/needs-area do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Mar 24, 2026
@pierluigilenoci
Copy link
Copy Markdown
Contributor Author

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 -stderrthreshold is honored even when -logtostderr=true in cluster-autoscaler.

@pierluigilenoci
Copy link
Copy Markdown
Contributor Author

Gentle ping — could you take a look when you get a chance? Happy to address any feedback. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/cluster-autoscaler cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants