Skip to content

Commit

Permalink
Merge pull request #233 from PSanetra/support-wss
Browse files Browse the repository at this point in the history
Support secure websocket listener
  • Loading branch information
ioolkos authored Sep 11, 2020
2 parents bff73b4 + ae3c48e commit 2beffd6
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 1 deletion.
3 changes: 3 additions & 0 deletions helm/vernemq/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ Parameter | Description | Default
`service.ws.enabled` | whether to expose WebSocket port | `false`
`service.ws.nodePort` | the WebSocket port exposed by the node when `service.type` is `NodePort` | `8080`
`service.ws.port` | the WebSocket port exposed by the service | `8080`
`service.wss.enabled` | whether to expose secure WebSocket port | `false`
`service.wss.nodePort` | the secure WebSocket port exposed by the node when `service.type` is `NodePort` | `8443`
`service.wss.port` | the secure WebSocket port exposed by the service | `8443`
`statefulset.annotations` | additional annotations to the StatefulSet | `{}`
`statefulset.labels` | additional labels on the StatefulSet | `{}`
`statefulset.podAnnotations` | additional pod annotations | `{}`
Expand Down
8 changes: 8 additions & 0 deletions helm/vernemq/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,14 @@ spec:
nodePort: {{ .Values.service.ws.nodePort }}
{{- end }}
{{- end }}
{{- if .Values.service.wss.enabled }}
- port: {{ .Values.service.wss.port }}
targetPort: wss
name: wss
{{- if eq .Values.service.type "NodePort" }}
nodePort: {{ .Values.service.wss.nodePort }}
{{- end }}
{{- end }}
selector:
app.kubernetes.io/name: {{ include "vernemq.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
4 changes: 3 additions & 1 deletion helm/vernemq/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ spec:
name: vmq
- containerPort: 8080
name: ws
- containerPort: 8443
name: wss
- containerPort: 8888
name: prometheus
{{- range tuple 9100 9101 9102 9103 9104 9105 9106 9107 9108 9109 }}
Expand Down Expand Up @@ -189,4 +191,4 @@ spec:
{{- end }}
{{- else }}
- name: data
{{- end }}
{{- end }}
5 changes: 5 additions & 0 deletions helm/vernemq/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ service:
port: 8080
# This is the port used by nodes to expose the service
nodePort: 8080
wss:
enabled: false
port: 8443
# This is the port used by nodes to expose the service
nodePort: 8443
annotations: {}
labels: {}

Expand Down

0 comments on commit 2beffd6

Please sign in to comment.