notebooks/components/notebook-controller
Gabriel Wen 70bd7acdf5 Merge branch 'master' into fix-notebook-controller 2019-06-03 14:33:05 -07:00
..
cmd/manager Golang notebook controller (kubeflow/kubeflow#2336) 2019-02-05 16:43:39 -08:00
config Notebook controller fixes (kubeflow/kubeflow#2463) 2019-02-15 00:09:02 -08:00
hack port leftover diff from kfapp-ksapp branch after kfctl merge (kubeflow/kubeflow#2410) 2019-02-10 10:50:08 -08:00
pkg Merge branch 'master' into fix-notebook-controller 2019-06-03 14:33:05 -07:00
.gitignore Add build with GCB support to notebook controller (kubeflow/kubeflow#2486) 2019-02-15 11:52:54 -08:00
Dockerfile Golang notebook controller (kubeflow/kubeflow#2336) 2019-02-05 16:43:39 -08:00
Makefile Update python code styles based on what's provided in .style.yapf (kubeflow/kubeflow#2447) 2019-02-19 22:44:30 -08:00
OWNERS pf gcb (kubeflow/kubeflow#2603) 2019-03-04 17:08:23 -08:00
PROJECT Golang notebook controller (kubeflow/kubeflow#2336) 2019-02-05 16:43:39 -08:00
README.md Golang notebook controller (kubeflow/kubeflow#2336) 2019-02-05 16:43:39 -08:00
gcb_build.jsonnet Add build with GCB support to notebook controller (kubeflow/kubeflow#2486) 2019-02-15 11:52:54 -08:00
go.mod Golang notebook controller (kubeflow/kubeflow#2336) 2019-02-05 16:43:39 -08:00
go.sum Golang notebook controller (kubeflow/kubeflow#2336) 2019-02-05 16:43:39 -08:00

README.md

Notebook Controller

The controller allows users to create a custom resource "Notebook" (jupyter notebook). We originally wrote the controller using jsonnet and metacontroller, but are migrating to golang and Kubebuilder here. See discussion.

Spec

The user needs to specify the PodSpec for the jupyter notebook. For example:

apiVersion: kubeflow.org/v1alpha1
kind: Notebook
metadata:
  name: my-notebook
  namespace: test
spec:
  template:
    spec:  # Your PodSpec here
      containers:
      - image: gcr.io/kubeflow-images-public/tensorflow-1.10.1-notebook-cpu:v0.3.0
        args: ["start.sh", "lab", "--LabApp.token=''", "--LabApp.allow_remote_access='True'",
               "--LabApp.allow_root='True'", "--LabApp.ip='*'",
               "--LabApp.base_url=/test/my-notebook/",
               "--port=8888", "--no-browser"]
        name: notebook
      ...

The required fields are containers[0].image and (containers[0].command and/or containers[0].args). That is, the user should specify what and how to run.

All other fields will be filled in with default value if not specified.

Implementation detail

This part is WIP as we are still developing.

Under the hood, the controller creates a StatefulSet to run the notebook instance, and a Service for it.

TODO

  • e2e test (we have one testing the jsonnet-metacontroller one, we should make it run on this one)
  • status field should reflect the error if there is any. See #2269.
  • Istio integration (controller will generate istio resources to secure each user's notebook)
  • CRD validation
  • ttlSecondsAfterFinished: This is in the original jsonnet controller spec, but not being used yet. I think we want to cleanup the notebook after idle?