Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

route: add health check support #49

Merged
merged 1 commit into from
Mar 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 84 additions & 0 deletions docs/data-sources/route.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Route data source
- `description` (String) Description of the route.
- `enable_google_cloud_serverless_authentication` (Boolean) Enable Google Cloud serverless authentication.
- `from` (String) From URL.
- `health_checks` (Attributes Set) Health checks for the route. (see [below for nested schema](#nestedatt--health_checks))
- `host_path_regex_rewrite_pattern` (String) Host path regex rewrite pattern.
- `host_path_regex_rewrite_substitution` (String) Host path regex rewrite substitution.
- `host_rewrite` (String) Host rewrite.
Expand Down Expand Up @@ -80,6 +81,89 @@ Optional:
- `infer_from_ppl` (Boolean)


<a id="nestedatt--health_checks"></a>
### Nested Schema for `health_checks`

Read-Only:

- `grpc_health_check` (Attributes) gRPC health check settings. (see [below for nested schema](#nestedatt--health_checks--grpc_health_check))
- `healthy_threshold` (Number) Number of successes before marking healthy.
- `http_health_check` (Attributes) HTTP health check settings. (see [below for nested schema](#nestedatt--health_checks--http_health_check))
- `initial_jitter` (String) An optional jitter amount for the first health check.
- `interval` (String) The interval between health checks.
- `interval_jitter` (String) An optional jitter amount for every interval.
- `interval_jitter_percent` (Number) An optional jitter percentage.
- `tcp_health_check` (Attributes) TCP health check settings. (see [below for nested schema](#nestedatt--health_checks--tcp_health_check))
- `timeout` (String) The time to wait for a health check response.
- `unhealthy_threshold` (Number) Number of failures before marking unhealthy.

<a id="nestedatt--health_checks--grpc_health_check"></a>
### Nested Schema for `health_checks.grpc_health_check`

Read-Only:

- `authority` (String) Authority header value.
- `service_name` (String) Service name to check.


<a id="nestedatt--health_checks--http_health_check"></a>
### Nested Schema for `health_checks.http_health_check`

Read-Only:

- `codec_client_type` (String) Application protocol for health checks.
- `expected_statuses` (Attributes Set) Expected status code ranges. (see [below for nested schema](#nestedatt--health_checks--http_health_check--expected_statuses))
- `host` (String) The host header value.
- `path` (String) The request path.
- `retriable_statuses` (Attributes Set) Retriable status code ranges. (see [below for nested schema](#nestedatt--health_checks--http_health_check--retriable_statuses))

<a id="nestedatt--health_checks--http_health_check--expected_statuses"></a>
### Nested Schema for `health_checks.http_health_check.expected_statuses`

Read-Only:

- `end` (Number) End of status code range.
- `start` (Number) Start of status code range.


<a id="nestedatt--health_checks--http_health_check--retriable_statuses"></a>
### Nested Schema for `health_checks.http_health_check.retriable_statuses`

Read-Only:

- `end` (Number) End of status code range.
- `start` (Number) Start of status code range.



<a id="nestedatt--health_checks--tcp_health_check"></a>
### Nested Schema for `health_checks.tcp_health_check`

Read-Only:

- `receive` (Attributes Set) Expected response payloads. (see [below for nested schema](#nestedatt--health_checks--tcp_health_check--receive))
- `send` (Attributes) Payload to send. (see [below for nested schema](#nestedatt--health_checks--tcp_health_check--send))

<a id="nestedatt--health_checks--tcp_health_check--receive"></a>
### Nested Schema for `health_checks.tcp_health_check.receive`

Read-Only:

- `binary_b64` (String) Base64 encoded binary payload.
- `text` (String) Hex encoded payload.


<a id="nestedatt--health_checks--tcp_health_check--send"></a>
### Nested Schema for `health_checks.tcp_health_check.send`

Read-Only:

- `binary_b64` (String) Base64 encoded binary payload.
- `text` (String) Hex encoded payload.




<a id="nestedatt--rewrite_response_headers"></a>
### Nested Schema for `rewrite_response_headers`

Expand Down
84 changes: 84 additions & 0 deletions docs/data-sources/routes.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ Read-Only:
- `description` (String) Description of the route.
- `enable_google_cloud_serverless_authentication` (Boolean) Enable Google Cloud serverless authentication.
- `from` (String) From URL.
- `health_checks` (Attributes Set) Health checks for the route. (see [below for nested schema](#nestedatt--routes--health_checks))
- `host_path_regex_rewrite_pattern` (String) Host path regex rewrite pattern.
- `host_path_regex_rewrite_substitution` (String) Host path regex rewrite substitution.
- `host_rewrite` (String) Host rewrite.
Expand Down Expand Up @@ -93,6 +94,89 @@ Optional:
- `infer_from_ppl` (Boolean)


<a id="nestedatt--routes--health_checks"></a>
### Nested Schema for `routes.health_checks`

Read-Only:

- `grpc_health_check` (Attributes) gRPC health check settings. (see [below for nested schema](#nestedatt--routes--health_checks--grpc_health_check))
- `healthy_threshold` (Number) Number of successes before marking healthy.
- `http_health_check` (Attributes) HTTP health check settings. (see [below for nested schema](#nestedatt--routes--health_checks--http_health_check))
- `initial_jitter` (String) An optional jitter amount for the first health check.
- `interval` (String) The interval between health checks.
- `interval_jitter` (String) An optional jitter amount for every interval.
- `interval_jitter_percent` (Number) An optional jitter percentage.
- `tcp_health_check` (Attributes) TCP health check settings. (see [below for nested schema](#nestedatt--routes--health_checks--tcp_health_check))
- `timeout` (String) The time to wait for a health check response.
- `unhealthy_threshold` (Number) Number of failures before marking unhealthy.

<a id="nestedatt--routes--health_checks--grpc_health_check"></a>
### Nested Schema for `routes.health_checks.grpc_health_check`

Read-Only:

- `authority` (String) Authority header value.
- `service_name` (String) Service name to check.


<a id="nestedatt--routes--health_checks--http_health_check"></a>
### Nested Schema for `routes.health_checks.http_health_check`

Read-Only:

- `codec_client_type` (String) Application protocol for health checks.
- `expected_statuses` (Attributes Set) Expected status code ranges. (see [below for nested schema](#nestedatt--routes--health_checks--http_health_check--expected_statuses))
- `host` (String) The host header value.
- `path` (String) The request path.
- `retriable_statuses` (Attributes Set) Retriable status code ranges. (see [below for nested schema](#nestedatt--routes--health_checks--http_health_check--retriable_statuses))

<a id="nestedatt--routes--health_checks--http_health_check--expected_statuses"></a>
### Nested Schema for `routes.health_checks.http_health_check.expected_statuses`

Read-Only:

- `end` (Number) End of status code range.
- `start` (Number) Start of status code range.


<a id="nestedatt--routes--health_checks--http_health_check--retriable_statuses"></a>
### Nested Schema for `routes.health_checks.http_health_check.retriable_statuses`

Read-Only:

- `end` (Number) End of status code range.
- `start` (Number) Start of status code range.



<a id="nestedatt--routes--health_checks--tcp_health_check"></a>
### Nested Schema for `routes.health_checks.tcp_health_check`

Read-Only:

- `receive` (Attributes Set) Expected response payloads. (see [below for nested schema](#nestedatt--routes--health_checks--tcp_health_check--receive))
- `send` (Attributes) Payload to send. (see [below for nested schema](#nestedatt--routes--health_checks--tcp_health_check--send))

<a id="nestedatt--routes--health_checks--tcp_health_check--receive"></a>
### Nested Schema for `routes.health_checks.tcp_health_check.receive`

Read-Only:

- `binary_b64` (String) Base64 encoded binary payload.
- `text` (String) Hex encoded payload.


<a id="nestedatt--routes--health_checks--tcp_health_check--send"></a>
### Nested Schema for `routes.health_checks.tcp_health_check.send`

Read-Only:

- `binary_b64` (String) Base64 encoded binary payload.
- `text` (String) Hex encoded payload.




<a id="nestedatt--routes--rewrite_response_headers"></a>
### Nested Schema for `routes.rewrite_response_headers`

Expand Down
84 changes: 84 additions & 0 deletions docs/resources/route.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Route for Pomerium.
- `bearer_token_format` (String) Bearer token format.
- `description` (String) Description of the route.
- `enable_google_cloud_serverless_authentication` (Boolean) Enable Google Cloud serverless authentication.
- `health_checks` (Attributes Set) Health checks for the route. (see [below for nested schema](#nestedatt--health_checks))
- `host_path_regex_rewrite_pattern` (String) Rewrites the Host header according to a regular expression matching the path.
- `host_path_regex_rewrite_substitution` (String) Rewrites the Host header according to a regular expression matching the substitution.
- `host_rewrite` (String) Rewrites the Host header to a new literal value.
Expand Down Expand Up @@ -77,6 +78,89 @@ Route for Pomerium.

- `id` (String) Unique identifier for the route.

<a id="nestedatt--health_checks"></a>
### Nested Schema for `health_checks`

Optional:

- `grpc_health_check` (Attributes) gRPC health check settings. (see [below for nested schema](#nestedatt--health_checks--grpc_health_check))
- `healthy_threshold` (Number) The number of healthy health checks required before a host is marked healthy.
- `http_health_check` (Attributes) HTTP health check settings. (see [below for nested schema](#nestedatt--health_checks--http_health_check))
- `initial_jitter` (String) An optional jitter amount in milliseconds. If specified, Envoy will start health checking after for a random time in ms between 0 and initial_jitter.
- `interval` (String) The interval between health checks.
- `interval_jitter` (String) An optional jitter amount in milliseconds. If specified, during every interval Envoy will add interval_jitter to the wait time.
- `interval_jitter_percent` (Number) An optional jitter amount as a percentage of interval_ms. If specified, during every interval Envoy will add interval_ms * interval_jitter_percent / 100 to the wait time.
- `tcp_health_check` (Attributes) TCP health check settings. (see [below for nested schema](#nestedatt--health_checks--tcp_health_check))
- `timeout` (String) The time to wait for a health check response. If the timeout is reached the health check attempt will be considered a failure.
- `unhealthy_threshold` (Number) The number of unhealthy health checks required before a host is marked unhealthy.

<a id="nestedatt--health_checks--grpc_health_check"></a>
### Nested Schema for `health_checks.grpc_health_check`

Optional:

- `authority` (String) The value of the :authority header in the gRPC health check request.
- `service_name` (String) An optional service name parameter which will be sent to gRPC service.


<a id="nestedatt--health_checks--http_health_check"></a>
### Nested Schema for `health_checks.http_health_check`

Optional:

- `codec_client_type` (String) Use specified application protocol for health checks.
- `expected_statuses` (Attributes Set) Specifies a list of HTTP response statuses considered healthy. (see [below for nested schema](#nestedatt--health_checks--http_health_check--expected_statuses))
- `host` (String) The value of the host header in the HTTP health check request.
- `path` (String) Specifies the HTTP path that will be requested during health checking.
- `retriable_statuses` (Attributes Set) Specifies a list of HTTP response statuses considered retriable. (see [below for nested schema](#nestedatt--health_checks--http_health_check--retriable_statuses))

<a id="nestedatt--health_checks--http_health_check--expected_statuses"></a>
### Nested Schema for `health_checks.http_health_check.expected_statuses`

Required:

- `end` (Number) End of status code range.
- `start` (Number) Start of status code range.


<a id="nestedatt--health_checks--http_health_check--retriable_statuses"></a>
### Nested Schema for `health_checks.http_health_check.retriable_statuses`

Required:

- `end` (Number) End of status code range.
- `start` (Number) Start of status code range.



<a id="nestedatt--health_checks--tcp_health_check"></a>
### Nested Schema for `health_checks.tcp_health_check`

Optional:

- `receive` (Attributes Set) When checking the response, 'fuzzy' matching is performed such that each payload block must be found, and in the order specified, but not necessarily contiguous. (see [below for nested schema](#nestedatt--health_checks--tcp_health_check--receive))
- `send` (Attributes) Empty payloads imply a connect-only health check. (see [below for nested schema](#nestedatt--health_checks--tcp_health_check--send))

<a id="nestedatt--health_checks--tcp_health_check--receive"></a>
### Nested Schema for `health_checks.tcp_health_check.receive`

Optional:

- `binary_b64` (String) Base64 encoded binary payload.
- `text` (String) Hex encoded payload. E.g., '000000FF'.


<a id="nestedatt--health_checks--tcp_health_check--send"></a>
### Nested Schema for `health_checks.tcp_health_check.send`

Optional:

- `binary_b64` (String) Base64 encoded binary payload.
- `text` (String) Hex encoded payload. E.g., '000000FF'.




<a id="nestedatt--jwt_groups_filter"></a>
### Nested Schema for `jwt_groups_filter`

Expand Down
Loading