added documentation for scaling stanza
This commit is contained in:
parent
8e449fa49e
commit
83c60e55ab
|
@ -146,6 +146,7 @@ export default [
|
|||
'reschedule',
|
||||
'resources',
|
||||
'restart',
|
||||
'scaling',
|
||||
'service',
|
||||
'sidecar_service',
|
||||
'sidecar_task',
|
||||
|
|
|
@ -1727,7 +1727,7 @@ $ curl \
|
|||
}
|
||||
```
|
||||
|
||||
## Read Job Scale Status <sup>beta 0.11</sup>
|
||||
## Read Job Scale Status <sup>0.11 Beta</sup>
|
||||
|
||||
This endpoint reads scale information about a job.
|
||||
|
||||
|
@ -1775,7 +1775,7 @@ $ curl \
|
|||
}
|
||||
}
|
||||
```
|
||||
## Scale Task Group <sup>beta 0.11</sup>
|
||||
## Scale Task Group <sup>0.11 Beta</sup>
|
||||
|
||||
This endpoint performs a scaling action against a job.
|
||||
Currently, this endpoint supports scaling the count for a task group.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
layout: api
|
||||
page_title: Scaling Policies - HTTP API
|
||||
sidebar_title: Scaling Policies <sup>Beta</sup>
|
||||
sidebar_title: Scaling Policies <sup>0.11 Beta</sup>
|
||||
description: The /scaling/policy endpoints are used to list and view scaling policies.
|
||||
---
|
||||
|
||||
|
@ -9,7 +9,7 @@ description: The /scaling/policy endpoints are used to list and view scaling pol
|
|||
|
||||
The `/scaling/policies` and `/scaling/policy/` endpoints are used to list and view scaling policies.
|
||||
|
||||
## List Scaling Policies
|
||||
## List Scaling Policies <sup>0.11 Beta</sup>
|
||||
|
||||
This endpoint returns the scaling policies from all jobs.
|
||||
|
||||
|
@ -50,7 +50,7 @@ $ curl \
|
|||
]
|
||||
```
|
||||
|
||||
## Read Policy
|
||||
## Read Scaling Policy <sup>0.11 Beta</sup>
|
||||
|
||||
This endpoint reads a specific scaling policy.
|
||||
|
||||
|
|
54
website/pages/docs/job-specification/scaling.mdx
Normal file
54
website/pages/docs/job-specification/scaling.mdx
Normal file
|
@ -0,0 +1,54 @@
|
|||
---
|
||||
layout: docs
|
||||
page_title: scaling Stanza - Job Specification
|
||||
sidebar_title: scaling <sup>0.11 Beta</sup>
|
||||
description: The "scaling" stanza allows specifying scaling policy for a task group
|
||||
---
|
||||
|
||||
# `scaling` Stanza
|
||||
|
||||
<Placement groups={['job', 'group']} />
|
||||
|
||||
The `scaling` stanza allows configuring scaling options for a task group, for the purpose
|
||||
of supporting external autoscalers like the [Nomad Autoscaler](https://github.com/hashicorp/nomad-autoscaler).
|
||||
|
||||
```hcl
|
||||
job "example" {
|
||||
datacenters = ["dc1"]
|
||||
group "cache" {
|
||||
task "redis" {
|
||||
driver = "docker"
|
||||
config {
|
||||
image = "redis:3.2"
|
||||
}
|
||||
}
|
||||
scaling {
|
||||
enabled = true
|
||||
min = 0
|
||||
max = 10
|
||||
policy {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## `scaling` Parameters
|
||||
|
||||
- `min` - <code>(int: nil)</code> - The minimum acceptible count for the task group.
|
||||
This should be honored by the external autoscaler. It will also be honored by Nomad
|
||||
during job updates and scaling operations. Defaults to the specified task group [count][].
|
||||
|
||||
- `max` - <code>(int: <required>)</code> - The maximum acceptible count for the task group.
|
||||
This should be honored by the external autoscaler. It will also be honored by Nomad
|
||||
during job updates and scaling operations.
|
||||
|
||||
- `enabled` - <code>(bool: false)</code> - Whether the scaling policy is enabled.
|
||||
This is intended to allow temporarily disabling an autoscaling policy, and should be
|
||||
honored by the external autoscaler.
|
||||
|
||||
- `policy` - <code>(map<string|...>: nil)</code> - The autoscaling policy. This is
|
||||
opaque to Nomad, consumed and parsed only by the external autoscaler. Therefore,
|
||||
its contents are specific to the autoscaler; see autoscaler documentation.
|
||||
|
||||
[count]: /docs/job-specification/group/#inlinecode-count-10 'Nomad Task Group specification'
|
Loading…
Reference in a new issue