diff --git a/dask_config.yaml b/dask_config.yaml index 88ec6ad..f8ee720 100644 --- a/dask_config.yaml +++ b/dask_config.yaml @@ -74,8 +74,8 @@ kubernetes: - scheduler - --port - "8786" - - -bokeh-prefix - - daskboard + # - -bokeh-prefix + # - daskboard - --bokeh-port - "8787" resources: diff --git a/kube/nginx_proxy.yaml b/kube/nginx_proxy.yaml index d51c2bb..6f9b8f5 100644 --- a/kube/nginx_proxy.yaml +++ b/kube/nginx_proxy.yaml @@ -16,16 +16,16 @@ data: listen 8080; server_name localhost; location ^~ /daskboard/ { - proxy_pass http://:8787; - proxy_set_header Host $http_host; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Real-IP $remote_addr; - proxy_http_version 1.1; - proxy_redirect off; - proxy_buffering off; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection $connection_upgrade; - proxy_read_timeout 86400; + proxy_pass http://dask-ivukotic-fb1cf4c5-5:8787; + # proxy_set_header Host $http_host; + # proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + # proxy_set_header X-Real-IP $remote_addr; + # proxy_http_version 1.1; + # proxy_redirect off; + # proxy_buffering off; + # proxy_set_header Upgrade $http_upgrade; + # # proxy_set_header Connection $connection_upgrade; + # proxy_read_timeout 86400; } } } diff --git a/private_jupyter_notebook_config.py b/private_jupyter_notebook_config.py index d8d61b0..f9f8f9e 100644 --- a/private_jupyter_notebook_config.py +++ b/private_jupyter_notebook_config.py @@ -6,3 +6,13 @@ # Set shell to bash as AnalysisBase assumes it # force login shell to pickup ~/.bash_profile c.NotebookApp.terminado_settings = {"shell_command": ["/bin/bash", "-l"]} + + +def host_allowlist(handler, host): + handler.log.info("Request to proxy to host " + host) + return True + # return host.startswith("192.170") or host.startswith("2605:9a00:10:200a") or host.startswith("dask-") + + +# for dask dashboards to be visible +c.ServerProxy.host_allowlist = host_allowlist