scheduler
Introduction
scheduler is the scheduler of pipego written in Go.
Prerequisites
Run
version=latest make build
./bin/scheduler --config-file="$PWD"/config/config.yml --listen-url=:28082
Docker
version=latest make docker
docker run -v "$PWD"/config:/tmp ghcr.io/pipego/scheduler:latest --config-file=/tmp/config.yml --listen-url=:28082
Usage
usage: scheduler --config-file=CONFIG-FILE --listen-url=LISTEN-URL [<flags>]
pipego scheduler
Flags:
--help Show context-sensitive help (also try --help-long and --help-man).
--version Show application version.
--config-file=CONFIG-FILE Config file (.yml)
--listen-url=LISTEN-URL Listen URL (host:port)
Settings
scheduler parameters can be set in the directory config.
An example of configuration in config.yml:
apiVersion: v1
kind: scheduler
metadata:
name: scheduler
spec:
fetch:
disabled:
- name: LocalHost
path: ./plugin/fetch-localhost
- name: MetalFlow
path: ./plugin/fetch-metalflow
filter:
enabled:
- name: NodeName
path: ./plugin/filter-nodename
weight: 4
- name: NodeAffinity
path: ./plugin/filter-nodeaffinity
weight: 3
- name: NodeResourcesFit
path: ./plugin/filter-noderesourcesfit
weight: 2
- name: NodeUnschedulable
path: ./plugin/filter-nodeunschedulable
weight: 1
score:
enabled:
- name: NodeResourcesFit
path: ./plugin/score-noderesourcesfit
weight: 2
- name: NodeResourcesBalancedAllocation
path: ./plugin/score-noderesourcesbalancedallocation
weight: 1
Protobuf
{
"apiVersion": "v1",
"kind": "scheduler",
"metadata": {
"name": "scheduler"
},
"spec": {
"task": {
"name": "task1",
"nodeName": "node1",
"nodeSelector": {
"diskType": [
"ssd"
]
},
"requestedResource": {
"milliCPU": 256,
"memory": 512,
"storage": 1024
},
"toleratesUnschedulable": true
},
"nodes": [
{
"name": "node1",
"host": "127.0.0.1",
"label": {
"diskType": "ssd"
},
"allocatableResource": {
"milliCPU": 1024,
"memory": 2048,
"storage": 4096
},
"requestedResource": {
"milliCPU": 512,
"memory": 1024,
"storage": 2048
},
"unschedulable": true
}
]
}
}
plugins
License
Project License can be found here.
Reference