scheduler

command module
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 14, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

README

scheduler

Build Status codecov Go Report Card License Tag

Introduction

scheduler is the scheduler of pipego written in Go.

Prerequisites

  • Go >= 1.18.0

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

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
external
grpctest
Package grpctest implements testing helpers.
Package grpctest implements testing helpers.
leakcheck
Package leakcheck contains functions to check leaked goroutines.
Package leakcheck contains functions to check leaked goroutines.
mock
Package mock_proto is a generated GoMock package.
Package mock_proto is a generated GoMock package.
test

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL