-
Notifications
You must be signed in to change notification settings - Fork 669
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
feature(eviction): add event when EvictPod failed #1536
base: master
Are you sure you want to change the base?
Conversation
/retest |
return true, &v1.PodList{Items: test.pods}, nil | ||
t.Run(test.description, func(t *testing.T) { | ||
fakeClient := fake.NewClientset(test.pods...) | ||
fakeClient.PrependReactor("create", "pods/eviction", func(action core.Action) (handled bool, ret runtime.Object, err 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.
The original fakeClient.Fake.AddReactor("list", "pods", func(action core.Action) (bool, runtime.Object, error)
is not used in the test
fakeClient := &fake.Clientset{} | ||
fakeClient.Fake.AddReactor("list", "pods", func(action core.Action) (bool, runtime.Object, error) { | ||
return true, &v1.PodList{Items: test.pods}, nil | ||
t.Run(test.description, func(t *testing.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.
+1 for t.Run
maxPodsToEvictPerNamespace *uint | ||
expectedNodeEvictions uint | ||
expectedTotalEvictions uint | ||
expectedError 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.
s/expectedError/err as expected is used for comparison with actual. s/expectedError/actualErr will work as well.
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.
replace err -> actualErr
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 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 |
/kind feature
When it comes to eviction, what we really care about are the errors that occur during evictions. So I tend to include events when an eviction fails. Besides metrics and application logs, events are also a valuable source of information. Typically, operations personnel respond to events to manage the cluster effectively.