Skip to content

Commit fed16df

Browse files
authored
Support config https for jupyterhub (#2862)
* support config https for jupyterhub * update
1 parent c64434a commit fed16df

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

docker/jupyterhub/jupyterhub_config.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
# See the License for the specific language governing permissions and
1212
# limitations under the License.
1313

14+
# pylint: disable-all
15+
# flake8: noqa
16+
1417
# Configuration file for jupyterhub.
1518
# shutdown the server after no activity for an hour
1619
import os
@@ -26,6 +29,12 @@
2629
c.JupyterHub.ip = '0.0.0.0'
2730
c.JupyterHub.hub_ip = '0.0.0.0'
2831

32+
ssl_key_path = os.getenv("SQLFLOW_JUPYTER_SSL_KEY")
33+
ssl_cert_path = os.getenv("SQLFLOW_JUPYTER_SSL_CERT")
34+
if ssl_key_path != "" and ssl_cert_path != "":
35+
c.JupyterHub.ssl_key = ssl_key_path
36+
c.JupyterHub.ssl_cert = ssl_cert_path
37+
2938
# Don't try to cleanup servers on exit - since in general for k8s, we want
3039
# the hub to be able to restart without losing user containers
3140
c.JupyterHub.cleanup_servers = False

0 commit comments

Comments
 (0)