Skip to content

Commit

Permalink
Adds the Jupyter web app manifest (kubeflow#8)
Browse files Browse the repository at this point in the history
* adds ambassador and argo components to manifests

* removes ksonnet labels

* removed unused stubs for overlays

* adds jupyter web app

* set image for jupyter-web-app

* formatted multiline string in jupyter svc

* nit
  • Loading branch information
swiftdiaries authored and k8s-ci-robot committed Mar 18, 2019
1 parent 7823858 commit ccdb844
Show file tree
Hide file tree
Showing 8 changed files with 252 additions and 1 deletion.
12 changes: 12 additions & 0 deletions jupyter-web-app/base/cluster-role-binding.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: jupyter-web-app-binding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: jupyter-web-app-cluster-role
subjects:
- kind: ServiceAccount
name: jupyter-web-app
namespace: kubeflow
32 changes: 32 additions & 0 deletions jupyter-web-app/base/cluster-role.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: jupyter-web-app-cluster-role
rules:
- apiGroups:
- ""
resources:
- namespaces
verbs:
- get
- list
- create
- delete
- apiGroups:
- kubeflow.org
resources:
- notebooks
verbs:
- get
- list
- create
- delete
- apiGroups:
- ""
resources:
- persistentvolumeclaims
verbs:
- create
- delete
- get
- list
123 changes: 123 additions & 0 deletions jupyter-web-app/base/config-map.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
apiVersion: v1
data:
spawner_ui_config.yaml: |
# Configuration file for the default JupyterHub Spawner UI
# Each key corresponds to a JupyterHub Spawner UI option
# If a key is missing, the respective Spawner UI option will be left untouched
#
# Each Spawner UI option is configured by two keys: `value` and `readOnly`
# - The `value` key contains the default value
# - The `readOnly` key determines if the option will be available to users
#
# If the 'readOnly' key is present and set to 'true', the respective option
# will be disabled for users and only set by the admin
# If the 'readOnly' key is missing (defaults to 'false'), the respective option
# will be available for users
#
# Please note that some values (e.g. {username}) may be templated
# and expanded according to KubeSpawner's rules
#
# For more information regarding JupyterHub KubeSpawner and its configuration:
# https://jupyterhub-kubespawner.readthedocs.io/en/latest/spawner.html
spawnerFormDefaults:
image:
# The container Image for the user's Jupyter Notebook
# If readonly, this value must be a member of the list below
value: gcr.io/kubeflow-images-public/tensorflow-1.10.1-notebook-cpu:v0.4.0
# The list of available standard container Images
options:
- gcr.io/kubeflow-images-public/tensorflow-1.4.1-notebook-cpu:v0.4.0
- gcr.io/kubeflow-images-public/tensorflow-1.4.1-notebook-gpu:v0.4.0
- gcr.io/kubeflow-images-public/tensorflow-1.5.1-notebook-cpu:v0.4.0
- gcr.io/kubeflow-images-public/tensorflow-1.5.1-notebook-gpu:v0.4.0
- gcr.io/kubeflow-images-public/tensorflow-1.6.0-notebook-cpu:v0.4.0
- gcr.io/kubeflow-images-public/tensorflow-1.6.0-notebook-gpu:v0.4.0
- gcr.io/kubeflow-images-public/tensorflow-1.7.0-notebook-cpu:v0.4.0
- gcr.io/kubeflow-images-public/tensorflow-1.7.0-notebook-gpu:v0.4.0
- gcr.io/kubeflow-images-public/tensorflow-1.8.0-notebook-cpu:v0.4.0
- gcr.io/kubeflow-images-public/tensorflow-1.8.0-notebook-gpu:v0.4.0
- gcr.io/kubeflow-images-public/tensorflow-1.9.0-notebook-cpu:v0.4.0
- gcr.io/kubeflow-images-public/tensorflow-1.9.0-notebook-gpu:v0.4.0
- gcr.io/kubeflow-images-public/tensorflow-1.10.1-notebook-cpu:v0.4.0
- gcr.io/kubeflow-images-public/tensorflow-1.10.1-notebook-gpu:v0.4.0
- gcr.io/kubeflow-images-public/tensorflow-1.11.0-notebook-cpu:v0.4.0
- gcr.io/kubeflow-images-public/tensorflow-1.11.0-notebook-gpu:v0.4.0
- gcr.io/kubeflow-images-public/tensorflow-1.12.0-notebook-cpu:v0.4.0
- gcr.io/kubeflow-images-public/tensorflow-1.12.0-notebook-gpu:v0.4.0
# By default, custom container Images are allowed
# Uncomment the following line to only enable standard container Images
readOnly: false
cpu:
# CPU for user's Notebook
value: '0.5'
# readOnly: true
memory:
# Memory for user's Notebook
value: 1.0Gi
workspaceVolume:
# Workspace Volume to be attached to user's Notebook
# Each Workspace Volume is declared with the following attributes:
# Type, Name, Size, MountPath and Access Mode
value:
type:
# The Type of the Workspace Volume
# Supported values: 'New', 'Existing'
value: New
name:
# The Name of the Workspace Volume
# Note that this is a templated value
# value: {username}-workspace
value: {username}-workspace
size:
# The Size of the Workspace Volume (in Gi)
value: '10'
mountPath:
# The Path that the Workspace Volume will be mounted
readOnly: true
value: /home/jovyan
accessModes:
# The Access Mode of the Workspace Volume
# Supported values: 'ReadWriteOnce', 'ReadWriteMany', 'ReadOnlyMany'
value: ReadWriteOnce
dataVolumes:
# List of additional Data Volumes to be attached to the user's Notebook
value: []
# Each Data Volume is declared with the following attributes:
# Type, Name, Size, MountPath and Access Mode
#
# For example, a list with 2 Data Volumes:
#value:
# - value:
# type:
# value: New
# name:
# value: {username}-vol-1
# size:
# value: '10'
# mountPath:
# value: /home/jovyan/{username}-vol-1
# accessModes:
# value: ReadWriteOnce
# - value:
# type:
# value: New
# name:
# value: {username}-vol-2
# size:
# value: '5'
# mountPath:
# value: /home/jovyan/{username}-vol-2
# accessModes:
# value: ReadWriteOnce
#
# Uncomment the following line to make the Data Volumes list readonly
#readOnly: true
extraResources:
# Extra Resource Limits for user's Notebook
# Note that braces are escaped
value: "{{}}"
kind: ConfigMap
metadata:
name: jupyter-web-app-config
namespace: kubeflow
32 changes: 32 additions & 0 deletions jupyter-web-app/base/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: jupyter-web-app
name: jupyter-web-app
namespace: kubeflow
spec:
replicas: 1
selector:
matchLabels:
app: jupyter-web-app
template:
metadata:
labels:
app: jupyter-web-app
spec:
containers:
- image: gcr.io/kubeflow-images-public/jupyter-web-app:v20190215-v0.4.0-rc.1-138-g1f61e52d
imagePullPolicy: IfNotPresent
name: jupyter-web-app
ports:
- containerPort: 5000
volumeMounts:
- mountPath: /etc/config
name: config-volume
workingDir: /app/default
serviceAccountName: jupyter-web-app
volumes:
- configMap:
name: jupyter-web-app-config
name: config-volume
18 changes: 18 additions & 0 deletions jupyter-web-app/base/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
namePrefix: jupyter-web-app-

resources:
- cluster-role.yaml
- service-account.yaml
- cluster-role-binding.yaml
- config-map.yaml
- service.yaml
- deployment.yaml

commonLabels:
kustomize.component: jupyter-web-app

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
images:
- name: gcr.io/kubeflow-images-public/jupyter-web-app
newTag: v20190215-v0.4.0-rc.1-138-g1f61e52d
7 changes: 7 additions & 0 deletions jupyter-web-app/base/service-account.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: v1
kind: ServiceAccount
metadata:
labels:
app: jupyter-web-app
name: jupyter-web-app
namespace: kubeflow
26 changes: 26 additions & 0 deletions jupyter-web-app/base/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
apiVersion: v1
kind: Service
metadata:
annotations:
getambassador.io/config: |-
---
apiVersion: ambassador/v0
kind: Mapping
name: webapp_mapping
prefix: /jupyter/
service: jupyter-web-app.kubeflow
add_request_headers:
x-forwarded-prefix: /jupyter
labels:
run: jupyter-web-app
name: jupyter-web-app
namespace: kubeflow
spec:
ports:
- name: http
port: 80
protocol: TCP
targetPort: 5000
selector:
app: jupyter-web-app
type: ClusterIP
3 changes: 2 additions & 1 deletion kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
bases:
- ambassador/base
- argo/base
- github.com/swiftdiaries/kubeflow//components/profile-controller/config?ref=profiles-controller
- jupyter-web-app/base
#- github.com/swiftdiaries/kubeflow//components/profile-controller/config/default?ref=profiles-controller
commonLabels:
app: kubeflow
namespace: kubeflow
Expand Down

0 comments on commit ccdb844

Please sign in to comment.