From 8a78ba0f349a4b73916eb261b7eb02dc1909b402 Mon Sep 17 00:00:00 2001 From: Daein Park Date: Mon, 8 Apr 2019 15:09:59 +0900 Subject: [PATCH] Correct annotation for overriding cookie name, and wrong explanation Correct a annotation for specifying custom cookie name of Route - Fix: https://bugzilla.redhat.com/show_bug.cgi?id=1697216 --- dev_guide/routes.adoc | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/dev_guide/routes.adoc b/dev_guide/routes.adoc index b22e841aedd0..ad95e74359b2 100644 --- a/dev_guide/routes.adoc +++ b/dev_guide/routes.adoc @@ -288,22 +288,20 @@ router which endpoint is handling the session, ensuring that client requests use the cookie so that they are routed to the same pod. You can set a cookie name to overwrite the default, auto-generated one for the -route. This allows the application receiving route traffic to know the cookie -name. By deleting the cookie it can force the next request to re-choose an +route. By deleting the cookie it can force the next request to re-choose an endpoint. So, if a server was overloaded it tries to remove the requests from the client and redistribute them. . Annotate the route with the desired cookie name: + ---- -$ oc annotate route router.openshift.io/="-" +$ oc annotate route router.openshift.io/cookie_name="" ---- + -For example, to annotate the cookie name of `my_cookie` to the `my_route` with -the annotation of `my_cookie_anno`: +For example, to specify `my_cookie` as your new cookie name: + ---- -$ oc annotate route my_route router.openshift.io/my_cookie="-my_cookie_anno" +$ oc annotate route my_route router.openshift.io/cookie_name="my_cookie" ---- . Save the cookie, and access the route: