Skip to content

Commit

Permalink
wip need to make sure examples make sense
Browse files Browse the repository at this point in the history
  • Loading branch information
shoenig committed Mar 26, 2020
1 parent 9787136 commit f739083
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 17 deletions.
1 change: 0 additions & 1 deletion website/data/docs-navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ export default [
'migrate',
'network',
'parameterized',
'path',
'periodic',
'proxy',
'reschedule',
Expand Down
20 changes: 4 additions & 16 deletions website/pages/docs/job-specification/expose.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ job "expose-example" {

## `expose` Examples

The following example is an expose configuration that is configured to automatically
expose compatible service checks, as well as a custom path for a `/metrics` endpoint.
The following example is an expose configuration that is configured to


```hcl
service {
Expand All @@ -88,24 +88,12 @@ service {
path = "/metrics"
protocol = "http"
local_path_port = 9001
listener_port = "expose"
listener_port = "healthchecks"
}
}
}
}
}
check {
address_mode = "driver"
name = "api-expose-check"
tls_skip_verify = true
type = "http"
port = "expose"
interval = "3s"
timeout = "2s"
method = "GET"
path = "/health/api"
}
}
```

Expand Down Expand Up @@ -139,5 +127,5 @@ proxy {
}
```

[path]: /docs/job-specification/TBD 'Nomad expose path Specification'
[path]: /docs/job-specification/expose#path-parameters 'Nomad Expose Path Parameters'
[port]: /docs/job-specification/network#port-parameters 'Nomad Port Parameters'
6 changes: 6 additions & 0 deletions website/pages/docs/job-specification/service.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,11 @@ scripts.
add the IP of the service and the port, so this is just the relative URL to
the health check endpoint. This is required for http-based health checks.

- `expose` `(bool: false)` - Specifies whether an [Expose Path](/docs/job-specification/expose#path-parameters)
should be automatically generated for this check. Only compatible with
Connect-enabled task-group services using the default Connect proxy. Check
must be of [`type`][type] `http` or `grpc`.

- `port` `(string: <varies>)` - Specifies the label of the port on which the
check will be performed. Note this is the _label_ of the port and not the port
number unless `address_mode = driver`. The port label must match one defined
Expand Down Expand Up @@ -684,6 +689,7 @@ advertise and check directly since Nomad isn't managing any port assignments.
[qemu]: /docs/drivers/qemu 'Nomad qemu Driver'
[restart_stanza]: /docs/job-specification/restart 'restart stanza'
[connect]: /docs/job-specification/connect 'Nomad Consul Connect Integration'
[type]: /docs/job-specification/service#inlinecode-type-9
[shutdowndelay]: /docs/job-specification/task#inlinecode-shutdown_delay
[killsignal]: /docs/job-specification/task#inlinecode-kill_signal
[killtimeout]: /docs/job-specification/task#inlinecode-kill_timeout

0 comments on commit f739083

Please sign in to comment.