Merge pull request #6295 from hashicorp/docs-service-tweaks
docs: mention task field for checks
This commit is contained in:
commit
09f0efca1e
|
@ -1,8 +1,8 @@
|
|||
## 0.10.0 (Unreleased)
|
||||
|
||||
FEATURES:
|
||||
* **Consul Connect**: Nomad can register Consul Connect services and manage
|
||||
running an Envoy proxy sidecar to provide secured service-to-service
|
||||
* **Consul Connect**: Nomad may now register Consul Connect services and
|
||||
manages an Envoy proxy sidecar to provide secured service-to-service
|
||||
communication.
|
||||
* **Network Namespaces**: Task Groups may now define a shared network
|
||||
namespace. Each allocation will receive its own network namespace and
|
||||
|
|
|
@ -18,11 +18,10 @@ description: |-
|
|||
</tr>
|
||||
</table>
|
||||
|
||||
The `service` stanza instructs Nomad to register the task as a service using the
|
||||
service discovery integration. This section of the documentation will discuss the
|
||||
configuration, but please also read the
|
||||
[Nomad service discovery documentation][service-discovery] for more detailed
|
||||
information about the integration.
|
||||
The `service` stanza instructs Nomad to register a service with Consul. This
|
||||
section of the documentation will discuss the configuration, but please also
|
||||
read the [Nomad service discovery documentation][service-discovery] for more
|
||||
detailed information about the integration.
|
||||
|
||||
```hcl
|
||||
job "docs" {
|
||||
|
@ -64,12 +63,9 @@ job "docs" {
|
|||
}
|
||||
```
|
||||
|
||||
This section of the documentation only covers the job file options for
|
||||
configuring service discovery. For more information on the setup and
|
||||
configuration to integrate Nomad with service discovery, please see the
|
||||
[Nomad service discovery documentation][service-discovery]. There are steps you
|
||||
must take to configure Nomad. Simply adding this configuration to your job file
|
||||
does not automatically enable service discovery.
|
||||
This section of the documentation only cover the job file fields and stanzas
|
||||
for service discovery. For more details on using Nomad with Consul please see
|
||||
the [Consul integration documentation][service-discovery].
|
||||
|
||||
## `service` Parameters
|
||||
|
||||
|
@ -213,6 +209,11 @@ scripts.
|
|||
- `protocol` `(string: "http")` - Specifies the protocol for the http-based
|
||||
health checks. Valid options are `http` and `https`.
|
||||
|
||||
- `task` `(string: <required>)` - Specifices the task associated with this
|
||||
check. Scripts are executed within the task's environment, and
|
||||
`check_restart` stanzas will apply to the specified task. For `checks` on group
|
||||
level `services` only.
|
||||
|
||||
- `timeout` `(string: <required>)` - Specifies how long Consul will wait for a
|
||||
health check query to succeed. This is specified using a label suffix like
|
||||
"30s" or "1h". This must be greater than or equal to "1s"
|
||||
|
@ -614,7 +615,6 @@ job "example" {
|
|||
The `service` and `check` stanzas can both specify the port number to
|
||||
advertise and check directly since Nomad isn't managing any port assignments.
|
||||
|
||||
|
||||
- - -
|
||||
|
||||
<sup><small>1</small></sup><small> Script checks are not supported for the
|
||||
|
|
|
@ -262,6 +262,7 @@ dashes (`-`) are converted to underscores (`_`) in environment variables so
|
|||
- Only the Docker, exec, and raw exec drivers support network namespaces and
|
||||
Connect.
|
||||
- Variable interpolation for group services and checks are not yet supported.
|
||||
- Consul Connect and network namespaces are only supported on Linux.
|
||||
|
||||
|
||||
[count-dashboard]: /assets/images/count-dashboard.png
|
||||
|
|
Loading…
Reference in New Issue