How to configure sticky routes based on x-forwarded-for header in OpenShift 4?
Issue
- There is a use case where the http route needs to be stateful (sticky) to make sure the visitor always returns to the same pod (as long the pod exists). Is there any way to make the HAProxy to use
balance: sourcebut look at the ip address in thex-forwarded-forheader instead of the source ip seen by HAProxy?
Environment
- Red Hat OpenShift Container Platform (RHOCP)
- 4
- Sticky sessions
- HAProxy
x-forwarded-for
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.