Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Traefik/reverse proxy support? #133

Open
korridor opened this issue May 5, 2024 · 0 comments
Open

Traefik/reverse proxy support? #133

korridor opened this issue May 5, 2024 · 0 comments

Comments

@korridor
Copy link

korridor commented May 5, 2024

I use Traefik as a reverse proxy for my Kubernetes cluster. I configured the Chatwoot service to be type ClusterIP and I created a traefik IngressRoute for the service which worked fine, but the /cable websocket endpoint didn't work. After a bit of research, I added the following middlwares to make it work:

apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
  name: chatwoot-websocket
spec:
  headers:
    customRequestHeaders:
      Connection: keep-alive, Upgrade
      Upgrade: WebSocket
---
apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
  name: chatwoot-forward-headers
spec:
  headers:
    customRequestHeaders:
      X-Forwarded-Proto: https

Now the websocket connection works fine, but I currently have only one web pod. For now this is fine for me since I don't have a ton of users for chatwoot, but I was wondering how I can make this work with multiple web pods. As far as I understand the setup this would break the websocket connection since Traefik is distributing the requests randomly between the existing pods to distribute the load. My kubernetes cluster has multiple nodes and is behind a managed load balancer that is created by the Traefik service with type LoadBalancer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant