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"
In the Statefulset spec, the
wssport is a template from.Values.services.wss.portso 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.portto 7777, The K8s Service will listen in 7777, DOCKER_VERNEMQ_LISTENER__WSS__DEFAULT will be$(MY_POD_IP):7777but k8s service will be targetingwssport that actually is 8443These are the offended lines.
https://github.com/vernemq/docker-vernemq/blob/master/helm/vernemq/templates/statefulset.yaml#L80C1-L87C23
But in the Pod container ports, it is hardcoded
https://github.com/vernemq/docker-vernemq/blob/master/helm/vernemq/templates/statefulset.yaml#L57C1-L58C24
The same problem happens for
mqttsconfig.The fix that works for me is hardcoding the port in the environment variable.