diff --git a/website/data/docs-navigation.js b/website/data/docs-navigation.js index 52bdbd4d8658..abdc0d7598b2 100644 --- a/website/data/docs-navigation.js +++ b/website/data/docs-navigation.js @@ -142,7 +142,6 @@ export default [ 'migrate', 'network', 'parameterized', - 'path', 'periodic', 'proxy', 'reschedule', diff --git a/website/pages/docs/job-specification/expose.mdx b/website/pages/docs/job-specification/expose.mdx index f77f600cbfd5..8115d26599dc 100644 --- a/website/pages/docs/job-specification/expose.mdx +++ b/website/pages/docs/job-specification/expose.mdx @@ -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 { @@ -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" - } } ``` @@ -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' diff --git a/website/pages/docs/job-specification/service.mdx b/website/pages/docs/job-specification/service.mdx index f73e3d93df76..583404e22ac2 100644 --- a/website/pages/docs/job-specification/service.mdx +++ b/website/pages/docs/job-specification/service.mdx @@ -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: )` - 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 @@ -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