Skip to content

Commit

Permalink
Support offloading SSL to the proxy service
Browse files Browse the repository at this point in the history
Rather than always having different target ports for the HTTP and
HTTPS frontends, setting proxy.https.type to offload will tell
the service to route ports 443 and 80 both to port 80 on the
backend.

For this to work, annotations need to be added to
proxy.service.annotations to attach certificates to the load
balancer.

Fixes #675
  • Loading branch information
pcfens committed Jul 25, 2018
1 parent d23b844 commit 29c7393
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions jupyterhub/templates/proxy/service.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{{- $HTTPS := (and .Values.proxy.https.hosts .Values.proxy.https.enabled) }}
{{- $autoHTTPS := (and $HTTPS (eq .Values.proxy.https.type "letsencrypt")) }}
{{- $offloadHTTPS := (and $HTTPS (eq .Values.proxy.https.type "offload")) }}
{{- $manualHTTPS := (and $HTTPS (eq .Values.proxy.https.type "manual")) -}}
apiVersion: v1
kind: Service
Expand Down Expand Up @@ -58,6 +59,8 @@ spec:
protocol: TCP
{{- if $manualHTTPS }}
targetPort: 8443
{{- else if $offloadHTTPS }}
targetPort: 8000
{{- else }}
targetPort: 443
{{- end }}
Expand Down

0 comments on commit 29c7393

Please sign in to comment.