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

Helm Chart: MQTT ingress proxies HTTP to MQTT port #13309

Open
Altair-Bueno opened this issue Jun 20, 2024 · 2 comments
Open

Helm Chart: MQTT ingress proxies HTTP to MQTT port #13309

Altair-Bueno opened this issue Jun 20, 2024 · 2 comments
Labels

Comments

@Altair-Bueno
Copy link

What happened?

Setting ingress.mqtt forwards to MQTT port

What did you expect to happen?

ingress.mqtt should create an ingress that points to service.ws. After all, ingress is designed for HTTP/WS, not TCP

How can we reproduce it (as minimally and precisely as possible)?

# values.yaml
ingress:
  mqtt:
    enabled: true

Anything else we need to know?

This is the culprit:

number: {{ $.Values.service.mqtt }}

EMQX version

Chart 5.5.0

OS version

No response

Log files

No response

@zmstone
Copy link
Member

zmstone commented Jun 23, 2024

You are correct in noting that Kubernetes Ingress is primarily designed for HTTP and HTTPS traffic, utilizing protocols like HTTP, HTTPS, and WebSockets (WS). Since Ingress operates at the application layer (Layer 7), it is well-suited for handling HTTP-based protocols which allow for routing based on URL paths.

For MQTT, which typically operates over TCP (not HTTP), using a standard Ingress controller wouldn't be suitable as it does not handle TCP services. However, some specialized Ingress controllers, like NGINX or HAProxy, can be configured to handle non-HTTP traffic including TCP and UDP, thus enabling the routing capabilities for MQTT traffic as well.

@Altair-Bueno
Copy link
Author

Still, thats non standard behavior. There is a reason why work is being done on the Gateway api.

Nonetheless your comment rises the following question: why the chart doesn't provide an ingress.ws value, which would be standard behavior? It could be preset with the path pointing to /mqtt, that way you could set both dashboard and ws to the same host without messing routing.

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

No branches or pull requests

2 participants