Skip to content

Latest commit

 

History

History
62 lines (44 loc) · 1.72 KB

topolvm-scheduler.md

File metadata and controls

62 lines (44 loc) · 1.72 KB

topolvm-scheduler

topolvm-scheduler is a Kubernetes scheduler extender for TopoLVM.

It filters and prioritizes Nodes based on the amount of free space in their volume groups.

Scheduler policy

topolvm-scheduler need to be configured in scheduler policy as follows:

{
    ...
    "extenders": [{
        "urlPrefix": "http://...",
        "filterVerb": "predicate",
        "prioritizeVerb": "prioritize",
        "managedResources":
        [{
          "name": "topolvm.cybozu.com/capacity",
          "ignoredByScheduler": true
        }],
        "nodeCacheCapable": false
    }]
}

As it shown, only pods that request topolvm.cybozu.com/capacity resource are managed by topolvm-scheduler.

Verbs

The extender provides two verbs:

  • predicate to filter nodes
  • prioritize to score nodes

predicate

This verb filters out nodes whose volume groups have not enough free space.

Volume group capacity is identified from the value of topolvm.cybozu.com/capacity annotation.

prioritize

This verb scores nodes. The score of a node is calculated by this formula:

min(10, max(0, log2(capacity >> 30 / divisor)))

divisor can be changed with divisor command-line flag.

Command-line flags

Name Type Default Description
listen string :8000 HTTP listening address
divisor float64 1 A variable for node scoring