scheduler is the scheduler of pipego written in Go.
- Go >= 1.18.0
version=latest make build
./bin/scheduler --config-file="$PWD"/config/config.yml --listen-url=:28082
version=latest make docker
docker run -v "$PWD"/config:/tmp ghcr.io/pipego/scheduler:latest --config-file=/tmp/config.yml --listen-url=:28082
pipego scheduler
Usage:
scheduler [flags]
Flags:
-c, --config-file string config file (.yml)
-h, --help help for scheduler
-l, --listen-url string listen url (host:port)
-v, --version version for scheduler
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: MetalFlow
path: ./fetch-metalflow
enabled:
- name: LocalHost
path: ./fetch-localhost
filter:
enabled:
- name: NodeName
path: ./filter-nodename
priority: 1
- name: NodeAffinity
path: ./filter-nodeaffinity
priority: 2
- name: NodeResourcesFit
path: ./filter-noderesourcesfit
priority: 3
- name: NodeUnschedulable
path: ./filter-nodeunschedulable
priority: 4
score:
enabled:
- name: NodeResourcesFit
path: ./score-noderesourcesfit
weight: 2
- name: NodeResourcesBalancedAllocation
path: ./score-noderesourcesbalancedallocation
weight: 1
logger:
callerSkip: 2
fileCompress: false
fileName: scheduler.log
logLevel: debug
maxAge: 1
maxBackups: 60
maxSize: 100
{
"apiVersion": "v1",
"kind": "scheduler",
"metadata": {
"name": "scheduler"
},
"spec": {
"task": {
"name": "task1",
"nodeName": "node1",
"nodeSelectors": [
"ssd"
],
"requestedResource": {
"milliCPU": 256,
"memory": 512,
"storage": 1024
},
"toleratesUnschedulable": true
},
"nodes": [
{
"name": "node1",
"host": "127.0.0.1",
"label": "ssd",
"allocatableResource": {
"milliCPU": 1024,
"memory": 2048,
"storage": 4096
},
"requestedResource": {
"milliCPU": 512,
"memory": 1024,
"storage": 2048
},
"unschedulable": true
}
]
}
}
Project License can be found here.