Skip to content
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

Restructure controller (edl) pacakge #7493

Closed
wangkuiyi opened this issue Jan 12, 2018 · 0 comments
Closed

Restructure controller (edl) pacakge #7493

wangkuiyi opened this issue Jan 12, 2018 · 0 comments

Comments

@wangkuiyi
Copy link
Collaborator

wangkuiyi commented Jan 12, 2018

We need to rename some functions in the controller (to be renamed edl) package. The motivation comes from the current main function:

https://github.com/PaddlePaddle/cloud/blob/dcebcdf820d4a7aa13e815e75d3a17f705794ec1/go/cmd/autoscaler/autoscaler.go#L51-L59

	cluster := controller.NewCluster(clientset)

	as := controller.New(cluster,
		controller.WithMaxLoadDesired(*maxLoadDesired))

	controller, err := controller.NewController(client, clientset, as)
	if err != nil {
		panic(err)
	}

should be

ctl, err = edl.New(client, clientset, *maxLoadDesired)

as

  1. we rename controller.NewController into edl.New,
  2. rename controller.New into edl.newAutoscaler, which should be called by edl.New,
  3. rename controller.NewCluster into edl.newCluster, which should be called by edl.New too.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant