Skip to content

Commit c9c74d9

Browse files
committed
feat(helm): use standard http/https port for server service
1 parent 2bf5a21 commit c9c74d9

File tree

3 files changed

+24
-3
lines changed

3 files changed

+24
-3
lines changed

helm/ggbridge/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,9 @@ A Helm chart for installing ggbridge
194194
| server.istio.gateways | list | `[]` | Specify the existing gateway resources for Virtual Service |
195195
| server.service.annotations | object | `{}` | Specify server serivce annottions |
196196
| server.service.ports.ws.containerPort | int | `9000` | Set the server websocket container port |
197-
| server.service.ports.ws.port | int | `9000` | Set the server websocket service port |
197+
| server.service.ports.ws.port | int | `80` | Set the server websocket service port |
198+
| server.service.ports.wss.containerPort | int | `9000` | Set the server websocket container port |
199+
| server.service.ports.wss.port | int | `443` | Set the server secured websocket service port |
198200
| server.service.type | string | `"ClusterIP"` | Kubernetes Service type |
199201
| serviceAccount.annotations | object | `{}` | Annotations to add to the service account |
200202
| serviceAccount.create | bool | `true` | Specifies whether a service account should be created |

helm/ggbridge/templates/server/service.yaml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,17 @@ metadata:
1717
spec:
1818
type: {{ .Values.server.service.type }}
1919
ports:
20-
- port: {{ .Values.server.service.ports.ws.port }}
20+
{{- if and $.Values.tls.enabled (eq (include "ggbridge.server.trafficRouting.enabled" $) "false") }}
21+
- port: {{ $.Values.server.service.ports.wss.port }}
22+
targetPort: ws
23+
protocol: TCP
24+
name: wss
25+
{{- else }}
26+
- port: {{ $.Values.server.service.ports.ws.port }}
2127
targetPort: ws
2228
protocol: TCP
2329
name: ws
30+
{{- end }}
2431
selector:
2532
{{- include "ggbridge.selectorLabels" . | nindent 4 }}
2633
{{- include "ggbridge.server.selectorLabels" . | nindent 4 }}
@@ -45,10 +52,17 @@ metadata:
4552
spec:
4653
type: {{ $.Values.server.service.type }}
4754
ports:
55+
{{- if and $.Values.tls.enabled (eq (include "ggbridge.server.trafficRouting.enabled" $) "false") }}
56+
- port: {{ $.Values.server.service.ports.wss.port }}
57+
targetPort: ws
58+
protocol: TCP
59+
name: wss
60+
{{- else }}
4861
- port: {{ $.Values.server.service.ports.ws.port }}
4962
targetPort: ws
5063
protocol: TCP
5164
name: ws
65+
{{- end }}
5266
selector:
5367
{{- include "ggbridge.selectorLabels" $ | nindent 4 }}
5468
{{- include "ggbridge.server.selectorLabels" $ | nindent 4 }}

helm/ggbridge/values.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,12 @@ server:
311311
ports:
312312
ws:
313313
# -- Set the server websocket service port
314-
port: 9000
314+
port: 80
315+
# -- Set the server websocket container port
316+
containerPort: 9000
317+
wss:
318+
# -- Set the server secured websocket service port
319+
port: 443
315320
# -- Set the server websocket container port
316321
containerPort: 9000
317322

0 commit comments

Comments
 (0)