mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 18:35:44 +03:00
node pools: add node_pool field to job spec (#17379)
This changeset only adds the `node_pool` field to the jobspec, and ensures that it gets picked up correctly as a change. Without the rest of the implementation landed yet, the field will be ignored.
This commit is contained in:
@@ -152,6 +152,7 @@ The table below shows this endpoint's support for
|
||||
"Job": {
|
||||
"Datacenters": ["dc1"],
|
||||
"ID": "cache",
|
||||
"NodePool": "prod",
|
||||
"TaskGroups": [
|
||||
{
|
||||
"Name": "cache",
|
||||
@@ -288,6 +289,7 @@ $ curl \
|
||||
"ModifyIndex": 0,
|
||||
"Name": "my-job",
|
||||
"Namespace": "default",
|
||||
"NodePool": "prod",
|
||||
"ParameterizedJob": null,
|
||||
"ParentID": "",
|
||||
"Payload": null,
|
||||
@@ -357,6 +359,7 @@ $ curl \
|
||||
"Priority": 50,
|
||||
"AllAtOnce": false,
|
||||
"Datacenters": ["dc1"],
|
||||
"NodePool": "prod",
|
||||
"Constraints": [
|
||||
{
|
||||
"LTarget": "${attr.kernel.name}",
|
||||
@@ -675,6 +678,7 @@ $ curl \
|
||||
"Name": "example",
|
||||
"Namespace": "default",
|
||||
"NomadTokenID": "",
|
||||
"NodePool": "prod",
|
||||
"ParameterizedJob": null,
|
||||
"ParentID": "",
|
||||
"Payload": null,
|
||||
@@ -888,6 +892,7 @@ $ curl \
|
||||
"Multiregion": null,
|
||||
"Name": "example",
|
||||
"Namespace": "default",
|
||||
"NodePool": "prod",
|
||||
"NomadTokenID": "",
|
||||
"ParameterizedJob": null,
|
||||
"ParentID": "",
|
||||
@@ -1057,6 +1062,7 @@ $ curl \
|
||||
"Multiregion": null,
|
||||
"Name": "example",
|
||||
"Namespace": "default",
|
||||
"NodePool": "prod",
|
||||
"NomadTokenID": "",
|
||||
"ParameterizedJob": null,
|
||||
"ParentID": "",
|
||||
|
||||
@@ -62,6 +62,7 @@ $ nomad job run -output example.nomad.hcl
|
||||
"Datacenters": [
|
||||
"dc1"
|
||||
],
|
||||
"NodePool": "prod",
|
||||
"Constraints": null,
|
||||
"Affinities": null,
|
||||
"TaskGroups": [
|
||||
@@ -256,6 +257,8 @@ The `Job` object supports the following keys:
|
||||
- `Datacenters` - A list of datacenters in the region which are eligible
|
||||
for task placement. This must be provided, and does not have a default.
|
||||
|
||||
- `NodePool` - The node pool in which the job can be placed. Defaults to `"default"`.
|
||||
|
||||
- `TaskGroups` - A list to define additional task groups. See the task group
|
||||
reference for more details.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user