Schema
Type:
object
EndpointSpec
Schema:
EndpointSpec
Labels
Type:
object
All schema constraints and annotations
{
"additionalProperties": {
"type": "string"
},
"description": "User-defined key/value metadata.",
"type": "object"
}Mode
Type:
object
Global
Type:
object
All schema constraints and annotations
{
"type": "object"
}GlobalJob
Type:
object
All schema constraints and annotations
{
"description": "The mode used for services which run a task to the completed state\non each valid node.\n",
"type": "object"
}Replicated
Type:
object
Replicas
Type:
integer
All schema constraints and annotations
{
"format": "int64",
"type": "integer"
}All schema constraints and annotations
{
"properties": {
"Replicas": {
"format": "int64",
"type": "integer"
}
},
"type": "object"
}ReplicatedJob
Type:
object
MaxConcurrent
Type:
integer
All schema constraints and annotations
{
"default": 1,
"description": "The maximum number of replicas to run simultaneously.\n",
"format": "int64",
"type": "integer"
}TotalCompletions
Type:
integer
MaxConcurrentAll schema constraints and annotations
{
"description": "The total number of replicas desired to reach the Completed\nstate. If unset, will default to the value of `MaxConcurrent`\n",
"format": "int64",
"type": "integer"
}All schema constraints and annotations
{
"description": "The mode used for services with a finite number of tasks that run\nto a completed state.\n",
"properties": {
"MaxConcurrent": {
"default": 1,
"description": "The maximum number of replicas to run simultaneously.\n",
"format": "int64",
"type": "integer"
},
"TotalCompletions": {
"description": "The total number of replicas desired to reach the Completed\nstate. If unset, will default to the value of `MaxConcurrent`\n",
"format": "int64",
"type": "integer"
}
},
"type": "object"
}All schema constraints and annotations
{
"description": "Scheduling mode for the service.",
"properties": {
"Global": {
"type": "object"
},
"GlobalJob": {
"description": "The mode used for services which run a task to the completed state\non each valid node.\n",
"type": "object"
},
"Replicated": {
"properties": {
"Replicas": {
"format": "int64",
"type": "integer"
}
},
"type": "object"
},
"ReplicatedJob": {
"description": "The mode used for services with a finite number of tasks that run\nto a completed state.\n",
"properties": {
"MaxConcurrent": {
"default": 1,
"description": "The maximum number of replicas to run simultaneously.\n",
"format": "int64",
"type": "integer"
},
"TotalCompletions": {
"description": "The total number of replicas desired to reach the Completed\nstate. If unset, will default to the value of `MaxConcurrent`\n",
"format": "int64",
"type": "integer"
}
},
"type": "object"
}
},
"type": "object"
}Name
Type:
string
All schema constraints and annotations
{
"description": "Name of the service.",
"type": "string"
}Networks
Type:
array
Specifies which networks the service should attach to.
Deprecated: This field is deprecated since v1.44. The Networks field in TaskSpec should be used instead.
Array item
Schema:
NetworkAttachmentConfig
All schema constraints and annotations
{
"description": "Specifies which networks the service should attach to.\n\nDeprecated: This field is deprecated since v1.44. The Networks field in TaskSpec should be used instead.\n",
"items": {
"$ref": "#/components/schemas/NetworkAttachmentConfig"
},
"type": "array"
}RollbackConfig
Type:
object
Delay
Type:
integer
All schema constraints and annotations
{
"description": "Amount of time between rollback iterations, in nanoseconds.\n",
"format": "int64",
"type": "integer"
}FailureAction
Type:
string
All schema constraints and annotations
{
"description": "Action to take if an rolled back task fails to run, or stops\nrunning during the rollback.\n",
"enum": [
"continue",
"pause"
],
"type": "string"
}MaxFailureRatio
Type:
number
All schema constraints and annotations
{
"default": 0,
"description": "The fraction of tasks that may fail during a rollback before the\nfailure action is invoked, specified as a floating point number\nbetween 0 and 1.\n",
"type": "number"
}Monitor
Type:
integer
All schema constraints and annotations
{
"description": "Amount of time to monitor each rolled back task for failures, in\nnanoseconds.\n",
"format": "int64",
"type": "integer"
}Order
Type:
string
All schema constraints and annotations
{
"description": "The order of operations when rolling back a task. Either the old\ntask is shut down before the new task is started, or the new task\nis started before the old task is shut down.\n",
"enum": [
"stop-first",
"start-first"
],
"type": "string"
}Parallelism
Type:
integer
All schema constraints and annotations
{
"description": "Maximum number of tasks to be rolled back in one iteration (0 means\nunlimited parallelism).\n",
"format": "int64",
"type": "integer"
}All schema constraints and annotations
{
"description": "Specification for the rollback strategy of the service.",
"properties": {
"Delay": {
"description": "Amount of time between rollback iterations, in nanoseconds.\n",
"format": "int64",
"type": "integer"
},
"FailureAction": {
"description": "Action to take if an rolled back task fails to run, or stops\nrunning during the rollback.\n",
"enum": [
"continue",
"pause"
],
"type": "string"
},
"MaxFailureRatio": {
"default": 0,
"description": "The fraction of tasks that may fail during a rollback before the\nfailure action is invoked, specified as a floating point number\nbetween 0 and 1.\n",
"type": "number"
},
"Monitor": {
"description": "Amount of time to monitor each rolled back task for failures, in\nnanoseconds.\n",
"format": "int64",
"type": "integer"
},
"Order": {
"description": "The order of operations when rolling back a task. Either the old\ntask is shut down before the new task is started, or the new task\nis started before the old task is shut down.\n",
"enum": [
"stop-first",
"start-first"
],
"type": "string"
},
"Parallelism": {
"description": "Maximum number of tasks to be rolled back in one iteration (0 means\nunlimited parallelism).\n",
"format": "int64",
"type": "integer"
}
},
"type": "object"
}TaskTemplate
Schema:
TaskSpec
UpdateConfig
Type:
object
Delay
Type:
integer
All schema constraints and annotations
{
"description": "Amount of time between updates, in nanoseconds.",
"format": "int64",
"type": "integer"
}FailureAction
Type:
string
All schema constraints and annotations
{
"description": "Action to take if an updated task fails to run, or stops running\nduring the update.\n",
"enum": [
"continue",
"pause",
"rollback"
],
"type": "string"
}MaxFailureRatio
Type:
number
All schema constraints and annotations
{
"default": 0,
"description": "The fraction of tasks that may fail during an update before the\nfailure action is invoked, specified as a floating point number\nbetween 0 and 1.\n",
"type": "number"
}Monitor
Type:
integer
All schema constraints and annotations
{
"description": "Amount of time to monitor each updated task for failures, in\nnanoseconds.\n",
"format": "int64",
"type": "integer"
}Order
Type:
string
All schema constraints and annotations
{
"description": "The order of operations when rolling out an updated task. Either\nthe old task is shut down before the new task is started, or the\nnew task is started before the old task is shut down.\n",
"enum": [
"stop-first",
"start-first"
],
"type": "string"
}Parallelism
Type:
integer
All schema constraints and annotations
{
"description": "Maximum number of tasks to be updated in one iteration (0 means\nunlimited parallelism).\n",
"format": "int64",
"type": "integer"
}All schema constraints and annotations
{
"description": "Specification for the update strategy of the service.",
"properties": {
"Delay": {
"description": "Amount of time between updates, in nanoseconds.",
"format": "int64",
"type": "integer"
},
"FailureAction": {
"description": "Action to take if an updated task fails to run, or stops running\nduring the update.\n",
"enum": [
"continue",
"pause",
"rollback"
],
"type": "string"
},
"MaxFailureRatio": {
"default": 0,
"description": "The fraction of tasks that may fail during an update before the\nfailure action is invoked, specified as a floating point number\nbetween 0 and 1.\n",
"type": "number"
},
"Monitor": {
"description": "Amount of time to monitor each updated task for failures, in\nnanoseconds.\n",
"format": "int64",
"type": "integer"
},
"Order": {
"description": "The order of operations when rolling out an updated task. Either\nthe old task is shut down before the new task is started, or the\nnew task is started before the old task is shut down.\n",
"enum": [
"stop-first",
"start-first"
],
"type": "string"
},
"Parallelism": {
"description": "Maximum number of tasks to be updated in one iteration (0 means\nunlimited parallelism).\n",
"format": "int64",
"type": "integer"
}
},
"type": "object"
}All schema constraints and annotations
{
"description": "User modifiable configuration for a service.",
"properties": {
"EndpointSpec": {
"$ref": "#/components/schemas/EndpointSpec"
},
"Labels": {
"additionalProperties": {
"type": "string"
},
"description": "User-defined key/value metadata.",
"type": "object"
},
"Mode": {
"description": "Scheduling mode for the service.",
"properties": {
"Global": {
"type": "object"
},
"GlobalJob": {
"description": "The mode used for services which run a task to the completed state\non each valid node.\n",
"type": "object"
},
"Replicated": {
"properties": {
"Replicas": {
"format": "int64",
"type": "integer"
}
},
"type": "object"
},
"ReplicatedJob": {
"description": "The mode used for services with a finite number of tasks that run\nto a completed state.\n",
"properties": {
"MaxConcurrent": {
"default": 1,
"description": "The maximum number of replicas to run simultaneously.\n",
"format": "int64",
"type": "integer"
},
"TotalCompletions": {
"description": "The total number of replicas desired to reach the Completed\nstate. If unset, will default to the value of `MaxConcurrent`\n",
"format": "int64",
"type": "integer"
}
},
"type": "object"
}
},
"type": "object"
},
"Name": {
"description": "Name of the service.",
"type": "string"
},
"Networks": {
"description": "Specifies which networks the service should attach to.\n\nDeprecated: This field is deprecated since v1.44. The Networks field in TaskSpec should be used instead.\n",
"items": {
"$ref": "#/components/schemas/NetworkAttachmentConfig"
},
"type": "array"
},
"RollbackConfig": {
"description": "Specification for the rollback strategy of the service.",
"properties": {
"Delay": {
"description": "Amount of time between rollback iterations, in nanoseconds.\n",
"format": "int64",
"type": "integer"
},
"FailureAction": {
"description": "Action to take if an rolled back task fails to run, or stops\nrunning during the rollback.\n",
"enum": [
"continue",
"pause"
],
"type": "string"
},
"MaxFailureRatio": {
"default": 0,
"description": "The fraction of tasks that may fail during a rollback before the\nfailure action is invoked, specified as a floating point number\nbetween 0 and 1.\n",
"type": "number"
},
"Monitor": {
"description": "Amount of time to monitor each rolled back task for failures, in\nnanoseconds.\n",
"format": "int64",
"type": "integer"
},
"Order": {
"description": "The order of operations when rolling back a task. Either the old\ntask is shut down before the new task is started, or the new task\nis started before the old task is shut down.\n",
"enum": [
"stop-first",
"start-first"
],
"type": "string"
},
"Parallelism": {
"description": "Maximum number of tasks to be rolled back in one iteration (0 means\nunlimited parallelism).\n",
"format": "int64",
"type": "integer"
}
},
"type": "object"
},
"TaskTemplate": {
"$ref": "#/components/schemas/TaskSpec"
},
"UpdateConfig": {
"description": "Specification for the update strategy of the service.",
"properties": {
"Delay": {
"description": "Amount of time between updates, in nanoseconds.",
"format": "int64",
"type": "integer"
},
"FailureAction": {
"description": "Action to take if an updated task fails to run, or stops running\nduring the update.\n",
"enum": [
"continue",
"pause",
"rollback"
],
"type": "string"
},
"MaxFailureRatio": {
"default": 0,
"description": "The fraction of tasks that may fail during an update before the\nfailure action is invoked, specified as a floating point number\nbetween 0 and 1.\n",
"type": "number"
},
"Monitor": {
"description": "Amount of time to monitor each updated task for failures, in\nnanoseconds.\n",
"format": "int64",
"type": "integer"
},
"Order": {
"description": "The order of operations when rolling out an updated task. Either\nthe old task is shut down before the new task is started, or the\nnew task is started before the old task is shut down.\n",
"enum": [
"stop-first",
"start-first"
],
"type": "string"
},
"Parallelism": {
"description": "Maximum number of tasks to be updated in one iteration (0 means\nunlimited parallelism).\n",
"format": "int64",
"type": "integer"
}
},
"type": "object"
}
},
"type": "object"
}