nomad-autoscaler-plugin-strategy-cron

command module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2021 License: MIT Imports: 3 Imported by: 0

README

Nomad Autoscaler Cron Strategy

A cron-like strategy plugin, where task groups are scaled based on a predefined scheduled.

job "webapp" {
  ...
  group "demo" {
    ...
    scaling {
      ...
      policy {
        check "business hours" {
          source = "prometheus"

          strategy "cron" {
            count = 2
            period_business = "* * 9-17 * * mon-fri * -> 5"
            period_weekend = "* * * * * sat,sun * -> 1"
          }
        }
      }
    }
  }
}

In the example above, every weekday between 9 and 16:59, the number of instances is increased to 5 to handle the large traffic during operating hours. On the weekend, the number drops to 1. The rest of the time, the value is taken from the default count = 2

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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