Type Alias: ServiceSpec ​
ServiceSpec:
object
User modifiable configuration for a service.
Type declaration ​
Name | Type | Description |
---|---|---|
EndpointSpec ? | EndpointSpec | - |
Labels ? | object | User-defined key/value metadata. |
Mode ? | object | Scheduling mode for the service. |
Mode.Global ? | unknown | - |
Mode.GlobalJob ? | unknown | The mode used for services which run a task to the completed state on each valid node. |
Mode.Replicated ? | object | - |
Mode.Replicated.Replicas ? | number | - |
Mode.ReplicatedJob ? | object | The mode used for services with a finite number of tasks that run to a completed state. |
Mode.ReplicatedJob.MaxConcurrent ? | number | The maximum number of replicas to run simultaneously. |
Mode.ReplicatedJob.TotalCompletions ? | number | The total number of replicas desired to reach the Completed state. If unset, will default to the value of MaxConcurrent |
Name ? | string | Name of the service. |
Networks ? | NetworkAttachmentConfig [] | 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. |
RollbackConfig ? | object | Specification for the rollback strategy of the service. |
RollbackConfig.Delay ? | number | Amount of time between rollback iterations, in nanoseconds. |
RollbackConfig.FailureAction ? | "continue" | "pause" | Action to take if an rolled back task fails to run, or stops running during the rollback. |
RollbackConfig.MaxFailureRatio ? | number | The fraction of tasks that may fail during a rollback before the failure action is invoked, specified as a floating point number between 0 and 1. |
RollbackConfig.Monitor ? | number | Amount of time to monitor each rolled back task for failures, in nanoseconds. |
RollbackConfig.Order ? | "stop-first" | "start-first" | The order of operations when rolling back a task. Either the old task is shut down before the new task is started, or the new task is started before the old task is shut down. |
RollbackConfig.Parallelism ? | number | Maximum number of tasks to be rolled back in one iteration (0 means unlimited parallelism). |
TaskTemplate ? | TaskSpec | - |
UpdateConfig ? | object | Specification for the update strategy of the service. |
UpdateConfig.Delay ? | number | Amount of time between updates, in nanoseconds. |
UpdateConfig.FailureAction ? | "continue" | "pause" | "rollback" | Action to take if an updated task fails to run, or stops running during the update. |
UpdateConfig.MaxFailureRatio ? | number | The fraction of tasks that may fail during an update before the failure action is invoked, specified as a floating point number between 0 and 1. |
UpdateConfig.Monitor ? | number | Amount of time to monitor each updated task for failures, in nanoseconds. |
UpdateConfig.Order ? | "stop-first" | "start-first" | The order of operations when rolling out an updated task. Either the old task is shut down before the new task is started, or the new task is started before the old task is shut down. |
UpdateConfig.Parallelism ? | number | Maximum number of tasks to be updated in one iteration (0 means unlimited parallelism). |