-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Cluster-autoscaler: add NodeReadyPredicate and allow unready nodes in CA #2314
Conversation
| } | ||
|
|
||
| p2 := BuildTestPod("p2", 800, 0) | ||
| p1.Spec.NodeName = "n1" |
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.
nit: move 2 lines up
| }) | ||
|
|
||
| provider := testprovider.NewTestCloudProvider(nil, func(nodeGroup string, node string) error { | ||
| deletedNodes <- node |
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.
Where those channels get verified?
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.
they are unused, removed.
| } | ||
|
|
||
| func TestScaleDownNoMove(t *testing.T) { | ||
| deletedPods := make(chan string, 10) |
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.
Where those pipes are verified?
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.
they are unused, removed.
e67c15e to
f72b526
Compare
|
[APPROVALNOTIFIER] Needs approval from an approver in each of these OWNERS Files: We suggest the following people: |
| return true, nil, fmt.Errorf("Wrong node: %v", getAction.GetName()) | ||
| }) | ||
| fakeClient.Fake.AddReactor("delete", "pods", func(action core.Action) (bool, runtime.Object, error) { | ||
| panic(fmt.Errorf("no delete is expected")) |
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.
nit: wouldn't t.FailNow() be more appropriate?
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.
Done.
| } | ||
|
|
||
| // TODO: remove once all of the unready node handling elements are in place. | ||
| if err := CheckGroupsAndNodes(readyNodes, autoscalingContext.CloudProvider); err != nil { |
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.
Isn't method CheckGroupsAndNodes unused? If yes, can you remove it?
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.
Done.
| if condition.Type == apiv1.NodeReady { | ||
| if condition.Status == apiv1.ConditionTrue { | ||
| return true, condition.LastTransitionTime.Time, nil | ||
| canNodeBeReady, readyFound := true, false |
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.
Please merge GetReadinessState and IsNodeReadyAndSchedulable into one method as they are very similar.
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.
Done.
f72b526 to
271929d
Compare
|
LGTM |
…le-unready Cluster-autoscaler: add NodeReadyPredicate and allow unready nodes in CA
…le-unready Cluster-autoscaler: add NodeReadyPredicate and allow unready nodes in CA
Ref: #2228
cc: @jszczepkowski @fgrzadkowski