Skip to content
This repository was archived by the owner on Apr 17, 2019. It is now read-only.

Conversation

@mwielgus
Copy link
Contributor

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jan 17, 2017
@k8s-reviewable
Copy link

This change is Reviewable

}

p2 := BuildTestPod("p2", 800, 0)
p1.Spec.NodeName = "n1"
Copy link
Contributor

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
Copy link
Contributor

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?

Copy link
Contributor Author

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)
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

they are unused, removed.

@k8s-github-robot
Copy link

[APPROVALNOTIFIER] Needs approval from an approver in each of these OWNERS Files:

We suggest the following people:
cc @fgrzadkowski
You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

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"))
Copy link
Contributor

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?

Copy link
Contributor Author

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 {
Copy link
Contributor

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?

Copy link
Contributor Author

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
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@jszczepkowski
Copy link
Contributor

LGTM

@mwielgus mwielgus added the lgtm Indicates that a PR is ready to be merged. label Jan 18, 2017
@mwielgus mwielgus merged commit e2b3c37 into kubernetes-retired:master Jan 18, 2017
mwielgus added a commit to kubernetes/autoscaler that referenced this pull request Apr 18, 2017
…le-unready

Cluster-autoscaler: add NodeReadyPredicate and allow unready nodes in CA
mwielgus added a commit to kubernetes/autoscaler that referenced this pull request Apr 18, 2017
…le-unready

Cluster-autoscaler: add NodeReadyPredicate and allow unready nodes in CA
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area/autoscaler area/autoscaling cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants