Skip to content

Commit

Permalink
revert-makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
Gekko0114 committed Oct 28, 2023
1 parent c94d7e2 commit 2275d37
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ guest/.tinygo-target.json: scheduler/go.mod
build-wat: $(wildcard scheduler/test/testdata/*/*.wat)
@for f in $^; do \
wasm=$$(echo $$f | sed -e 's/\.wat/\.wasm/'); \
wat2wasm $$f -o $$wasm --debug-names $$f; \
wat2wasm -o $$wasm --debug-names $$f; \
done

.PHONY: testdata
Expand Down
1 change: 0 additions & 1 deletion guest/api/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ type FilterPlugin interface {
Filter(state CycleState, pod proto.Pod, nodeInfo NodeInfo) *Status
}

// TODO: fix
// PostFilterPlugin is a WebAssembly implementation of framework.PostFilterPlugin.
type PostFilterPlugin interface {
Plugin
Expand Down
7 changes: 3 additions & 4 deletions guest/postfilter/postfilter.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,20 @@ import (
internalpostfilter "sigs.k8s.io/kube-scheduler-wasm-extension/guest/internal/postfilter"
)

// TODO fix explanation
// SetPlugin should be called in `main` to assign an api.PostFilterPlugin
// instance.
//
// For example:
//
// func main() {
// plugin := filterPlugin{}
// prefilter.SetPlugin(plugin)
// postfilter.SetPlugin(plugin)
// filter.SetPlugin(plugin)
// }
//
// type filterPlugin struct{}
//
// func (filterPlugin) PreFilter(state api.CycleState, pod proto.Pod, nodeList proto.NodeList) {
// func (filterPlugin) PostFilter(state api.CycleState, pod proto.Pod, filteredNodeStatusMap internalpostfilter.NodeToStatusMap) (int32, status *api.Status) {
// // Write state you need on Filter
// }
//
Expand All @@ -46,7 +45,7 @@ import (
// return Filter, nil
// }
//
// Note: This may be set without filter.SetPlugin, if the pre-filter plugin has
// Note: This may be set without filter.SetPlugin, if the post-filter plugin has
// the only filtering logic, or only used to configure api.CycleState.
func SetPlugin(postfilterPlugin api.PostFilterPlugin) {
internalpostfilter.SetPlugin(postfilterPlugin)
Expand Down
2 changes: 1 addition & 1 deletion guest/prefilter/prefilter.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import (
//
// type filterPlugin struct{}
//
// func (filterPlugin) PreFilter(state api.CycleState, pod proto.Pod, nodeList proto.NodeList) {
// func (filterPlugin) PreFilter(state api.CycleState, pod proto.Pod) (nodeNames []string, status *Status) {
// // Write state you need on Filter
// }
//
Expand Down

0 comments on commit 2275d37

Please sign in to comment.