Update jupyter configuration for network connection
This commit is contained in:
@@ -10,3 +10,10 @@ data:
|
||||
#!/bin/bash
|
||||
apt-get update -y
|
||||
python -m pip install --no-cache-dir --upgrade pip
|
||||
jupyter_server_config.py: |
|
||||
# Idle kernel culling
|
||||
# idleCullTimeout=0: culling disabled; positive value: seconds before shutdown
|
||||
c.MappingKernelManager.cull_idle_timeout = {{ int .Values.jupyterConfig.idleCullTimeout }}
|
||||
c.MappingKernelManager.cull_interval = {{ int .Values.jupyterConfig.idleCullInterval }}
|
||||
# Do not cull kernels that have an active connection (browser tab open)
|
||||
c.MappingKernelManager.cull_connected = False
|
||||
|
||||
@@ -19,6 +19,15 @@ spec:
|
||||
securityContext:
|
||||
runAsUser: 1000
|
||||
fsGroup: 100
|
||||
{{- if .Values.tcpKeepalive.enabled }}
|
||||
sysctls:
|
||||
- name: net.ipv4.tcp_keepalive_time
|
||||
value: {{ .Values.tcpKeepalive.time | quote }}
|
||||
- name: net.ipv4.tcp_keepalive_intvl
|
||||
value: {{ .Values.tcpKeepalive.intvl | quote }}
|
||||
- name: net.ipv4.tcp_keepalive_probes
|
||||
value: {{ .Values.tcpKeepalive.probes | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- toYaml .Values.imagePullSecrets | nindent 8 }}
|
||||
@@ -63,6 +72,10 @@ spec:
|
||||
- name: startup-script
|
||||
mountPath: /usr/local/bin/start-notebook.d/startup-script.sh
|
||||
subPath: startup-script.sh
|
||||
- name: startup-script
|
||||
mountPath: /etc/jupyter/jupyter_server_config.py
|
||||
subPath: jupyter_server_config.py
|
||||
readOnly: true
|
||||
{{- if .Values.homeVolume.enabled }}
|
||||
- name: home-volume
|
||||
mountPath: {{ include "jupyterlab.homeDir" . }}
|
||||
|
||||
@@ -5,6 +5,10 @@ metadata:
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
{{- include "jupyterlab.labels" . | nindent 4 }}
|
||||
{{- with .Values.service.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
type: ClusterIP
|
||||
selector:
|
||||
|
||||
Reference in New Issue
Block a user