-
Notifications
You must be signed in to change notification settings - Fork 40.9k
chore(kubelet): migrate eviction to contextual logging #131504
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
base: master
Are you sure you want to change the base?
chore(kubelet): migrate eviction to contextual logging #131504
Conversation
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-sigs/prow repository. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: zhifei92 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/cc @bart0sh |
Let's fix the CI first. |
func (_m *MockNotifierFactory) NewCgroupNotifier(path string, attribute string, threshold int64) (CgroupNotifier, error) { | ||
ret := _m.Called(path, attribute, threshold) | ||
// NewCgroupNotifier provides a mock function with given fields: logger, path, attribute, threshold | ||
func (_m *MockNotifierFactory) NewCgroupNotifier(logger logr.Logger, path string, attribute string, threshold int64) (CgroupNotifier, error) { |
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.
logr
is an internal klog dependency. Please, use klog.Logger
instead.
@zhifei92 Please rebase and fix CI failures, thanks! |
62b899f
to
c8837fa
Compare
9d99ab9
to
070bde4
Compare
fix failed unit test fix unittest for windows format code
25cdfaa
to
fd1786f
Compare
Done. |
/retest-required |
} else { | ||
go notifier.Start() | ||
go notifier.Start(logger) |
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.
Would it make sense to pass context here?
@@ -279,6 +280,7 @@ type podToMake struct { | |||
} | |||
|
|||
func TestMemoryPressure_VerifyPodStatus(t *testing.T) { | |||
_, tCtx := ktesting.NewTestContext(t) |
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.
_, tCtx := ktesting.NewTestContext(t) | |
tCtx := ktesting.Init(t) |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
migrate
eviction
to contextual loggingWhich issue(s) this PR fixes:
Fixes #
part of #130069
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: