Skip to content

Commit 5d5cc86

Browse files
pecameronbrice
authored and
brice
committed
[dedicated-3.7] Use an annotation to provide a route cookie
Route annotation: router.openshift.io/router.cookie.name can be used to set a cookie name for the route. Added ROUTER_COOKIE_NAME for setting cookie name for all routes. The cookie must pass regex filter "[a-zA-Z0-9_-]+" https://trello.com/c/dZpU26W9 (3) Allow routes to set the cookie names for session stickiness origin PR 16454 openshift/origin#16454 (cherry picked from commit 4971e9d)
1 parent 70b2564 commit 5d5cc86

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

architecture/networking/routes.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -594,6 +594,9 @@ For all the items outlined in this section, you can set annotations on the
594594
|Variable | Description | Environment Variable Used as Default
595595
|`*haproxy.router.openshift.io/balance*`| Sets the xref:load-balancing[load-balancing algorithm]. Available options are `source`, `roundrobin`, and `leastconn`. | `ROUTER_TCP_BALANCE_SCHEME` for passthrough routes. Otherwise, use `ROUTER_LOAD_BALANCE_ALGORITHM`.
596596
|`*haproxy.router.openshift.io/disable_cookies*`| Disables the use of cookies to track related connections. If set to `true` or `TRUE`, the balance algorithm is used to choose which back-end serves connections for each incoming HTTP request. |
597+
|`*haproxy.router.openshift.io/cookie_name*`| Specifies an optional cookie to be used for
598+
this route. The name must consist of any combination of upper and lower case letters, digits, "_",
599+
and "-". The default is the hashed internal key name for the route. |
597600
|`*haproxy.router.openshift.io/rate-limit-connections*`| Setting `true` or `TRUE` to enables rate limiting functionality. |
598601
|`*haproxy.router.openshift.io/rate-limit-connections.concurrent-tcp*`| Limits the number of concurrent TCP connections shared by an IP address. |
599602
|`*haproxy.router.openshift.io/rate-limit-connections.rate-http*`| Limits the rate at which an IP address can make HTTP requests. |

architecture/topics/router_environment_variables.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ endif::[]
3232
|`ROUTER_ALLOWED_DOMAINS` | | A comma-separated list of domains that the host name in a route can only be part of. Any subdomain in the domain can be used. Option `ROUTER_DENIED_DOMAINS` overrides any values given in this option. If set, everything outside of the allowed domains will be rejected.
3333
|`ROUTER_BACKEND_CHECK_INTERVAL` | 5000ms | Length of time between subsequent "liveness" checks on backends. xref:time-units[(TimeUnits)]
3434
|`ROUTER_CLIENT_FIN_TIMEOUT` | 1s | Controls the TCP FIN timeout period for the client connecting to the route. If the FIN sent to close the connection is not answered within the given time, HAProxy will close the connection anyway. This is harmless if set to a low value and uses fewer resources on the router. xref:time-units[(TimeUnits)]
35+
|`ROUTER_COOKIE_NAME` | | Specifies cookie name to override the internally generated default name. The name must consist of any combination of upper and lower case letters, digits, "_",
36+
and "-". The default is the hashed internal key name for the route.
3537
|`ROUTER_COMPRESSION_MIME` | "text/html text/plain text/css" | A space separated list of mime types to compress.
3638
|`ROUTER_DEFAULT_CLIENT_TIMEOUT`| 30s | Length of time within which a client has to acknowledge or send data. xref:time-units[(TimeUnits)]
3739
|`ROUTER_DEFAULT_CONNECT_TIMEOUT`| 5s | The maximum connect time. xref:time-units[(TimeUnits)]

0 commit comments

Comments
 (0)