Skip to content

Commit be5b7f6

Browse files
author
Mike Terhar
authored
Load balancer TLS termination (#144)
1 parent 2d39469 commit be5b7f6

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

templates/coderd.yaml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -247,20 +247,22 @@ spec:
247247
selector:
248248
coder.deployment: {{ include "coder.serviceName" . }}
249249
ports:
250-
- name: tcp-{{ include "coder.serviceName" . }}
251-
port: 80
252-
targetPort: 8080
253-
protocol: TCP
254-
{{ if .Values.coderd.serviceNodePorts.http }}
255-
nodePort: {{ .Values.coderd.serviceNodePorts.http }}
256-
{{ end }}
257250
- name: tcp-{{ include "coder.serviceName" . }}-https
258251
port: 443
252+
{{- if .Values.coderd.httpsToHttp }}¬
259253
targetPort: 8443
260254
protocol: TCP
261255
{{ if .Values.coderd.serviceNodePorts.https }}
262256
nodePort: {{ .Values.coderd.serviceNodePorts.https }}
263257
{{ end }}
258+
- name: tcp-{{ include "coder.serviceName" . }}
259+
port: 80
260+
{{- end }}
261+
targetPort: 8080
262+
protocol: TCP
263+
{{ if .Values.coderd.serviceNodePorts.http }}
264+
nodePort: {{ .Values.coderd.serviceNodePorts.http }}
265+
{{ end }}
264266
{{- else }}
265267
---
266268
apiVersion: v1

values.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ coderd:
3636
# coderd.serviceAnnotations -- Extra annotations to apply to the coderd service.
3737
serviceAnnotations: {}
3838

39+
# coderd.httpsToHttp -- eliminates the external http port and routes traffic from
40+
# the external https port to the internal http port. Useful for when the load balancer
41+
# performs TLS termination (like Amazon's ACM)
42+
httpsToHttp: false
43+
3944
# coderd.trustProxyIP -- Whether Coder should trust X-Real-IP and/or
4045
# X-Forwarded-For headers from your reverse proxy. This should only be turned
4146
# on if you're using a reverse proxy that sets both of these headers. This is

0 commit comments

Comments
 (0)