Skip to content

Restructure controller (edl) pacakge #7493

@wangkuiyi

Description

@wangkuiyi

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions