Skip to content

Commit cc26e8b

Browse files
committed
Allow to disable proxy pod and service creation
1 parent a7b7227 commit cc26e8b

File tree

4 files changed

+19
-6
lines changed

4 files changed

+19
-6
lines changed

jupyterhub/templates/NOTES.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
kubectl --namespace={{ .Release.Namespace }} logs --previous <name of pod>
4141
{{- println }}
4242

43+
{{- if .Values.proxy.enabled }}
4344
{{- if eq .Values.proxy.service.type "LoadBalancer" }}
4445
- Verify an external IP is provided for the k8s Service {{ $proxy_service }}.
4546

@@ -84,6 +85,11 @@
8485

8586
Try insecure HTTP access: http://localhost:8080
8687
{{- end }}
88+
{{- end }}
89+
You disabled proxy pod and service creation. This means that your proxy should be set up manually.
90+
91+
Please follow documentation of
92+
current proxy class (see c.Jupyterhub.proxy_class setting), e.g. KubeIngressProxy
8793
{{- end }}
8894
{{- println }}
8995

jupyterhub/templates/proxy/deployment.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
{{- $enabled := .Values.proxy.enabled -}}
2+
{{- if $enabled }}
13
{{- $manualHTTPS := and .Values.proxy.https.enabled (eq .Values.proxy.https.type "manual") -}}
24
{{- $manualHTTPSwithsecret := and .Values.proxy.https.enabled (eq .Values.proxy.https.type "secret") -}}
35
apiVersion: apps/v1
@@ -176,3 +178,4 @@ spec:
176178
{{- with .Values.proxy.chp.extraPodSpec }}
177179
{{- . | toYaml | nindent 6 }}
178180
{{- end }}
181+
{{- end }}

jupyterhub/templates/proxy/service.yaml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
{{- $enabled := .Values.proxy.https.enabled -}}
2-
{{- $autoHTTPS := and $enabled (and (eq .Values.proxy.https.type "letsencrypt") .Values.proxy.https.hosts) -}}
3-
{{- $manualHTTPS := and $enabled (eq .Values.proxy.https.type "manual") -}}
4-
{{- $manualHTTPSwithsecret := and $enabled (eq .Values.proxy.https.type "secret") -}}
5-
{{- $offloadHTTPS := and $enabled (eq .Values.proxy.https.type "offload") -}}
1+
{{- $enabled := .Values.proxy.enabled -}}
2+
{{- if $enabled }}
3+
{{- $httpsEnabled := .Values.proxy.https.enabled -}}
4+
{{- $autoHTTPS := and $httpsEnabled (and (eq .Values.proxy.https.type "letsencrypt") .Values.proxy.https.hosts) -}}
5+
{{- $manualHTTPS := and $httpsEnabled (eq .Values.proxy.https.type "manual") -}}
6+
{{- $manualHTTPSwithsecret := and $httpsEnabled (eq .Values.proxy.https.type "secret") -}}
7+
{{- $offloadHTTPS := and $httpsEnabled (eq .Values.proxy.https.type "offload") -}}
68
{{- $valid := or $autoHTTPS (or $manualHTTPS (or $manualHTTPSwithsecret $offloadHTTPS)) -}}
7-
{{- $HTTPS := and $enabled $valid -}}
9+
{{- $HTTPS := and $httpsEnabled $valid -}}
810
apiVersion: v1
911
kind: Service
1012
metadata:
@@ -78,3 +80,4 @@ spec:
7880
{{- . | toYaml | nindent 4 }}
7981
{{- end }}
8082
{{- end }}
83+
{{- end }}

jupyterhub/values.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ rbac:
145145
# proxy relates to the proxy pod, the proxy-public service, and the autohttps
146146
# pod and proxy-http service.
147147
proxy:
148+
enabled: true
148149
secretToken:
149150
annotations: {}
150151
deploymentStrategy:

0 commit comments

Comments
 (0)