-
Notifications
You must be signed in to change notification settings - Fork 39.3k
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
migrate scheduler/taint_manager.go structured logging #98259
Conversation
@tanjing2020: This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the The Instructions 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/test-infra repository. |
Hi @tanjing2020. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions 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/test-infra repository. |
221a6e6
to
992b2c2
Compare
@@ -349,7 +349,7 @@ func (tc *NoExecuteTaintManager) processPodOnNode( | |||
} | |||
allTolerated, usedTolerations := v1helper.GetMatchingTolerations(taints, tolerations) | |||
if !allTolerated { | |||
klog.V(2).Infof("Not all taints are tolerated after update for Pod %v on %v", podNamespacedName.String(), nodeName) | |||
klog.V(2).InfoS("Not all taints are tolerated after update for Pod on node", "pod", podNamespacedName.String(), "node", nodeName) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/Pod/pod
@@ -358,7 +358,7 @@ func (tc *NoExecuteTaintManager) processPodOnNode( | |||
minTolerationTime := getMinTolerationTime(usedTolerations) | |||
// getMinTolerationTime returns negative value to denote infinite toleration. | |||
if minTolerationTime < 0 { | |||
klog.V(4).Infof("Current tolerations for %v tolerate forever, cancelling any scheduled deletion.", podNamespacedName.String()) | |||
klog.V(4).InfoS("Current tolerations for pod tolerate forever, cancelling any scheduled deletion.", "pod", podNamespacedName.String()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can drop the ending dot.
@@ -450,15 +450,15 @@ func (tc *NoExecuteTaintManager) handleNodeUpdate(nodeUpdate nodeUpdateItem) { | |||
// tc.PodUpdated which will use tc.taintedNodes to potentially delete delayed pods. | |||
pods, err := tc.getPodsAssignedToNode(node.Name) | |||
if err != nil { | |||
klog.Errorf(err.Error()) | |||
klog.ErrorS(err, "Failed to get Pods assigned to node", "node", node.Name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/Pods/pods
@tanjing2020 is the PR ready for review? |
992b2c2
to
e144c4e
Compare
/ok-to-test |
/cc @gmarek |
/lgtm Thanks for the contribution :) |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ingvagabund, k82cn, tanjing2020 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/test pull-kubernetes-bazel-test |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
Ref:
https://github.com/kubernetes/enhancements/tree/master/keps/sig-instrumentation/1602-structured-logging
https://github.com/kubernetes/community/blob/master/contributors/devel/sig-instrumentation/migration-to-structured-logging.md
Which issue(s) this PR fixes:
Verify log output (taint_manager.go):
Special notes for your reviewer:
Does this PR introduce a user-facing change?:
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: