scheduler

command module
v1.19.0 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2023 License: Apache-2.0 Imports: 3 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

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

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: 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

Protobuf

{
  "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
      }
    ]
  }
}

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