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

Cluster-autoscaler: cloud provider interface #1312

Merged
merged 1 commit into from
Jul 5, 2016

Conversation

mwielgus
Copy link
Contributor

@mwielgus mwielgus commented Jul 4, 2016

https://github.com/kubernetes/kubernetes/tree/master/pkg/cloudprovider doesn't define a concept of NodePool/Group/Mig and doesn't have add/delete node in the main interface (although some implementation have it). However we may reuse some fragments of K8s implementation. We could also expand the kubernetes interface although we are not sure how/if the similar capabilities exist in other cloud providers and how to implement them. Once we have some implementations in contrib we may think about moving them to K8s.

Ref: #1311
cc: @piosz @jszczepkowski @fgrzadkowski

NodeGroupForNode(*kube_api.Node) (*NodeGroup, error)
}

// NodeGroup contains configuration info and functionns to control a set
Copy link
Contributor

Choose a reason for hiding this comment

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

typo functions

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.

@mwielgus mwielgus force-pushed the cloud-provider-int branch 2 times, most recently from 9f246ae to ee09410 Compare July 4, 2016 14:43
@mwielgus
Copy link
Contributor Author

mwielgus commented Jul 4, 2016

cc: @pbitty @iterion

// IncreaseSize increases the size of the node group. To delete a node you need
// to explicitely name it and use CloudProvider. This function should wait until
// the node appears in the Kubernetes cluster.
IncreaseSize(newNodeCount int) error
Copy link

Choose a reason for hiding this comment

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

Do we want the desired total count, or just the delta?

I think we should only need to tell the NodeGroup how many instances to add, and not have to be concerned with its total size. Thoughts?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Positive delta. Cluster Autoscaler will not delete nodes without naming them explicitly.

Copy link

Choose a reason for hiding this comment

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

Makes sense. I think the docs should explain that newNodeCount is the positive delta.

When I first read newNodeCount I wasn't sure if it meant the delta or the "new total".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Renamed.

// if occurred.
SampleNode() (*kube_api.Node, error)

// IncreaseSize increases the size of the node group. To delete a node you need
Copy link
Contributor

Choose a reason for hiding this comment

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

To delete a node you need to explicitely name it and use CloudProvider.

Is this by mistake?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep, fixed.

@fgrzadkowski
Copy link
Contributor

@mwielgus As discussed offline, in the PR description please explain the motivation for adding this new interface instead of using an existing cloud provider interface that exists in kubernetes.

@piosz
Copy link
Contributor

piosz commented Jul 5, 2016

LGTM

@piosz piosz added the lgtm Indicates that a PR is ready to be merged. label Jul 5, 2016
@mwielgus
Copy link
Contributor Author

mwielgus commented Jul 5, 2016

https://github.com/kubernetes/kubernetes/tree/master/pkg/cloudprovider doesn't define a concept of NodePool/Group/Mig and doesn't have add/delete node in the main interface (although some implementation have it). However we may reuse some fragments of K8s implementation. We could also expand the kubernetes interface although we are not sure how/if the similar capabilities exist in other cloud providers and how to implement them. Once we have some implementations in contrib we may think about moving them to K8s.

@mwielgus mwielgus merged commit 3c428b9 into kubernetes-retired:master Jul 5, 2016
mwielgus added a commit to kubernetes/autoscaler that referenced this pull request Apr 18, 2017
…d-provider-int

Cluster-autoscaler: cloud provider interface
mwielgus added a commit to kubernetes/autoscaler that referenced this pull request Apr 18, 2017
…d-provider-int

Cluster-autoscaler: cloud provider interface
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/autoscaler lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants