From 89148557a725df5052ef498df6190d10cf985ac8 Mon Sep 17 00:00:00 2001 From: Justin Kotalik Date: Mon, 28 Dec 2020 12:11:49 -0800 Subject: [PATCH] Fixing documentation for preserving prefixes for ingress. (#870) --- docs/reference/schema.md | 8 ++++++-- src/schema/tye-schema.json | 10 +++++----- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/docs/reference/schema.md b/docs/reference/schema.md index c089da69..8b5e508f 100644 --- a/docs/reference/schema.md +++ b/docs/reference/schema.md @@ -566,7 +566,11 @@ The path `/mypath` or `/mypath/` will match: #### `host` (`string`) -The host to match. +The host to match. + +#### `preservePath` (`boolean`) + +Whether to preserve the matched path prefix when routing to a specific service. By default, path-prefixes are trimmed (`preservePath` is false). For example, if a path consisted of `/serviceA/foo` and an ingress rule including a match on `/serviceA`, the `/serviceA` portion would be trimmed when routing to the backend service, resulting in the path `/foo`. By setting `preservePath` to true, the `/serviceA` portion would be kept when routing to the backend service. ## Liveness and Readiness @@ -685,4 +689,4 @@ If both `port` and `protocol` are provided, Tye selects the first biding with th #### `headers` (`(name, value)[]`) -Array of headers that are sent as part of the HTTP request that probes the replicas of the service. \ No newline at end of file +Array of headers that are sent as part of the HTTP request that probes the replicas of the service. diff --git a/src/schema/tye-schema.json b/src/schema/tye-schema.json index f971871a..688bb2a7 100644 --- a/src/schema/tye-schema.json +++ b/src/schema/tye-schema.json @@ -447,10 +447,6 @@ "protocol": { "description": "The protocol used by the binding", "type": "string" - }, - "preservePath": { - "description": "Whether to keep the path that was originally present or not.", - "type": "boolean" } } }, @@ -468,6 +464,10 @@ "host": { "description": "The hostname to match.", "type": "string" + }, + "preservePath": { + "description": "Whether to keep the path that was originally present or not after a prefix match.", + "type": "boolean" } }, "required": [ @@ -538,4 +538,4 @@ ] } } -} \ No newline at end of file +}