Closed codefromthecrypt closed 9 months ago
ok almost done.
I completed PreScore and ported the node number example from the scheduler simulator and also unit tested it. I cleared the test code out of the examples directory so that the only thing there is more realistic.
Tomorrow, I will look for any missing tests and polish for review.
going with this first to keep PreScore change simple https://github.com/kubernetes-sigs/kube-scheduler-wasm-extension/pull/60
ok once this is in, I'll implement configuration to make our NodeNumberPlugin more realistic.
What's needed after this is a config ABI similar to http-wasm. I'll add links on that for someone to follow-up on:
https://http-wasm.io/http-handler-abi/#get_config https://github.com/http-wasm/http-wasm-guest-tinygo/blob/27f49b76b63759ad5694e32545dba595cd5fe9db/handler/host.go#L22-L25 https://github.com/http-wasm/http-wasm-guest-tinygo/blob/27f49b76b63759ad5694e32545dba595cd5fe9db/handler/internal/imports/imports.go#L10-L11 https://github.com/http-wasm/http-wasm-host-go/blob/990427a52ee421643c21142d462304c91415932b/handler/middleware.go#L251-L258 https://github.com/http-wasm/http-wasm-host-go/blob/990427a52ee421643c21142d462304c91415932b/handler/options.go#L25-L30
This would be used to complete the NodeNumberPlugin and would work if the config can be read inside the wasm guest, assigned by the host.
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: codefromthecrypt, sanposhiho
The full list of commands accepted by this bot can be found here.
The pull request process is described here
What type of PR is this?
/kind feature
What this PR does / why we need it:
This implement PreScore and changes NodeNumberPlugin to use it.
Which issue(s) this PR fixes:
N/A
Special notes for your reviewer:
Almost done: I need to do a review pass tomorrow.
Does this PR introduce a user-facing change?
NONE
What are the benchmark results of this change?
Performance is slightly slower because we always call prefilter. So, when we move logic to prescore, there's an additional host call roundtrip.