cachethq / cachet

🚦 The open-source status page system.
https://cachethq.io
MIT License
13.79k stars 1.55k forks source link

Unable to scale beyond single node, random logouts, and incorrect selection of X-Forwarded-For IP #4268

Closed Matthew-Beckett closed 3 years ago

Matthew-Beckett commented 3 years ago

I am encountering an issue with Cachet running Kubernetes.

The session store is populated with the IP of my upstream Nginx server, not of the requesting client, this is causing random logouts, failed submission of changes, and ultimately a deployment in which I cannot go HA with.

My deployment has L4 load balancer in front of my cluster and I am using cachet-docker as provided, when inspecting the session table, I can see that the IP populated for that session is that of the upstream Nginx Ingress Controller which send the request in my cluster, not that of the requesting client passed through via the load balancer to my Ingress Controller.

My externalTrafficPolicy for my LoadBalancer Service is Local as documented.

welcome[bot] commented 3 years ago

:wave: Thank you for opening your first issue. I'm just an automated bot that's here to help you get the information you need quicker, so please ignore this message if it doesn't apply to your issue. If you're looking for support, you should try the Slack group by registering your email address at https://cachethq-slack.herokuapp.com. Alternatively, email support@alt-three.com for our Professional support service (please note, this a paid service.) If you're issue is with documentation, you can suggest edits by clicking the Suggest Edits link on any page, or open an issue at https://github.com/CachetHQ/Docs

pavog commented 3 years ago

Hi, to me this doesn't sound like a problem from the application part of Cachet, but rather a problem with the Docker image or the underlying Laravel framework. Unfortunately I can't help you with that, but you might find some useful information on:

Matthew-Beckett commented 3 years ago

This issue is not present in https://github.com/fiveai/Cachet/tree/v2.5.0, recommend utilising this fork for users experiencing the same behavior.