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

wss and mqtts ports are not properly configured in helm chart #366

Open
ethcero opened this issue Oct 10, 2023 · 0 comments
Open

wss and mqtts ports are not properly configured in helm chart #366

ethcero opened this issue Oct 10, 2023 · 0 comments

Comments

@ethcero
Copy link

ethcero commented Oct 10, 2023

In the Statefulset spec, the wss port is a template from .Values.services.wss.port so that, if you plan to use a different port than 8443 in the k8s Service, the configuration gets broken.

For example, if you set .Values.services.wss.port to 7777, The K8s Service will listen in 7777, DOCKER_VERNEMQ_LISTENER__WSS__DEFAULT will be $(MY_POD_IP):7777 but k8s service will be targeting wss port that actually is 8443

These are the offended lines.

  - name: DOCKER_VERNEMQ_LISTENER__WSS__DEFAULT
    value: "$(MY_POD_IP):{{ .Values.service.wss.port }}"

https://github.com/vernemq/docker-vernemq/blob/master/helm/vernemq/templates/statefulset.yaml#L80C1-L87C23

But in the Pod container ports, it is hardcoded

  - containerPort: 8443
    name: wss

https://github.com/vernemq/docker-vernemq/blob/master/helm/vernemq/templates/statefulset.yaml#L57C1-L58C24

The same problem happens for mqtts config.

The fix that works for me is hardcoding the port in the environment variable.

  - name: DOCKER_VERNEMQ_LISTENER__WSS__DEFAULT
    value: "$(MY_POD_IP):8443"
- name: DOCKER_VERNEMQ_LISTENER__SSL__DEFAULT
   value: "$(MY_POD_IP):8883"
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