kubernetes-sigs / kube-scheduler-simulator

The simulator for the Kubernetes scheduler
Apache License 2.0
799 stars 138 forks source link

fix: reduce the places where users have to register for using custom plugins #332

Closed sanposhiho closed 8 months ago

sanposhiho commented 10 months ago

What type of PR is this?

/area simulator /kind bug

What this PR does / why we need it:

Before this PR, users had to register their custom plugin names in registeredOutOfTreeMultiPointName. This is undocumented and led to this kind of issue: https://github.com/kubernetes-sigs/kube-scheduler-simulator/issues/311.

This PR eliminates the need to register registeredOutOfTreeMultiPointName in the first place, rather than documenting the existence of registeredOutOfTreeMultiPointName.

Which issue(s) this PR fixes:

Fixes #311

Special notes for your reviewer:

/label tide/merge-method-squash

sanposhiho commented 8 months ago

/retest /assign @utam0k

utam0k commented 8 months ago

/lgtm

utam0k commented 8 months ago

It seems the linter job failed. Can you check it?

make[1]: Entering directory '/home/prow/go/src/sigs.k8s.io/kube-scheduler-simulator/simulator'
golangci-lint run --timeout 90m ./...
scheduler/config/plugin.go:10: File is not `gofumpt`-ed (gofumpt)
var (
    outOfTreeRegistries = runtime.Registry{
        // TODO(user): add your plugins registries here.
    }
)
make[1]: *** [Makefile:8: lint] Error 1
sanposhiho commented 8 months ago

@utam0k Please revisit here when have chance.

sanposhiho commented 8 months ago

Rebased.

sanposhiho commented 8 months ago

/priority next-release

k8s-ci-robot commented 8 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sanposhiho, utam0k

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/kubernetes-sigs/kube-scheduler-simulator/blob/master/OWNERS)~~ [sanposhiho] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
utam0k commented 8 months ago

/lgtm