feat(jupyter): Add Jupyter (#3616)
* Initial work for Jupyter notebook * Fixed some things I forgot to change from base * Added readme and changelog * Update charts/incubator/jupyter/values.yaml * Update charts/incubator/jupyter/values.yaml * remove autogenerated content * lint * fix persistence and service * Add some config options and try to fix permissions I added some of the config options supported by the container. I also tried to fix permissions by setting UID and GID, but this doesn't seem to have worked * Changed container to run as root I changed the pod security so that it would run as root in order for it to deploy with proper folder permissions. From my understanding while the pod is running as root the actual jupyter process is running as user 568 since I set the uid and gid to 568. * update IDs * some improvements * typo * update image repo * update questions * this is not needed, as users can select auto perms on persistance section * Update charts/incubator/jupyter/questions.yaml Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> * Update charts/incubator/jupyter/Chart.yaml Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Co-authored-by: Kjeld Schouten-Lebbing <kjeld@schouten-lebbing.nl> Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Co-authored-by: Stavros kois <s.kois@outlook.com>
This commit is contained in:
co-authored by
Kjeld Schouten-Lebbing
Stavros Kois
Stavros kois
parent
73050862f3
commit
665a3999a0
@@ -0,0 +1,30 @@
|
||||
# Patterns to ignore when building packages.
|
||||
# This supports shell glob matching, relative path matching, and
|
||||
# negation (prefixed with !). Only one pattern per line.
|
||||
.DS_Store
|
||||
# Common VCS dirs
|
||||
.git/
|
||||
.gitignore
|
||||
.bzr/
|
||||
.bzrignore
|
||||
.hg/
|
||||
.hgignore
|
||||
.svn/
|
||||
# Common backup files
|
||||
*.swp
|
||||
*.bak
|
||||
*.tmp
|
||||
*~
|
||||
# Various IDEs
|
||||
.project
|
||||
.idea/
|
||||
*.tmproj
|
||||
.vscode/
|
||||
# OWNERS file for Kubernetes
|
||||
OWNERS
|
||||
# helm-docs templates
|
||||
*.gotmpl
|
||||
# docs folder
|
||||
/docs
|
||||
# icon
|
||||
icon.png
|
||||
@@ -0,0 +1,29 @@
|
||||
apiVersion: v2
|
||||
appVersion: "latest"
|
||||
dependencies:
|
||||
- name: common
|
||||
repository: https://library-charts.truecharts.org
|
||||
version: 10.5.7
|
||||
deprecated: false
|
||||
description: "Jupyter a web based IDE"
|
||||
home: https://truecharts.org/docs/charts/incubator/jupyter
|
||||
icon: https://truecharts.org/img/hotlink-ok/chart-icons/jupyter.png
|
||||
keywords:
|
||||
- Jupyter
|
||||
- Notebook
|
||||
- Lab
|
||||
kubeVersion: ">=1.16.0-0"
|
||||
maintainers:
|
||||
- email: info@truecharts.org
|
||||
name: TrueCharts
|
||||
url: https://truecharts.org
|
||||
name: jupyter
|
||||
sources:
|
||||
- https://github.com/truecharts/charts/tree/master/charts/incubator/juypter
|
||||
- https://github.com/jupyter/docker-stacks
|
||||
type: application
|
||||
version: 0.0.3
|
||||
annotations:
|
||||
truecharts.org/catagories: |
|
||||
- Cloud
|
||||
truecharts.org/SCALE-support: "true"
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 26 KiB |
@@ -0,0 +1,170 @@
|
||||
# Include{groups}
|
||||
portals:
|
||||
open:
|
||||
# Include{portalLink}
|
||||
questions:
|
||||
# Include{global}
|
||||
- variable: imageSelector
|
||||
group: Container Image
|
||||
label: Select Image
|
||||
schema:
|
||||
type: string
|
||||
default: image
|
||||
enum:
|
||||
- value: image
|
||||
description: Base Notebook
|
||||
- value: imageMinimal
|
||||
description: Minimal Notebook
|
||||
- value: imageR
|
||||
description: R Notebook
|
||||
- value: imageScipy
|
||||
description: Scipy Notebook
|
||||
- value: imageTensorflow
|
||||
description: Tensorflow Notebook
|
||||
- value: imageDataScience
|
||||
description: Data Science Notebook
|
||||
- value: imagePySpark
|
||||
description: Pyspark Notebook
|
||||
- value: imageAllSpark
|
||||
description: All Spark Notebook
|
||||
# Include{controller}
|
||||
# Include{controllerDeployment}
|
||||
# Include{replicas}
|
||||
# Include{replica1}
|
||||
# Include{strategy}
|
||||
# Include{recreate}
|
||||
# Include{controllerExpert}
|
||||
# Include{controllerExpertExtraArgs}
|
||||
- variable: jupyter
|
||||
group: Container Configuration
|
||||
label: Jupyter Configuration
|
||||
schema:
|
||||
additional_attrs: true
|
||||
type: dict
|
||||
attrs:
|
||||
- variable: jupyter_cmd
|
||||
label: Jupyter Start Command
|
||||
description: Choose the start up command for Jupyter
|
||||
schema:
|
||||
type: string
|
||||
default: lab
|
||||
enum:
|
||||
- value: lab
|
||||
description: Lab
|
||||
- value: notebook
|
||||
description: Notebook
|
||||
- value: nbclassic
|
||||
description: Notebook Classic
|
||||
- value: server
|
||||
description: Server
|
||||
- variable: restartable
|
||||
label: Restartable
|
||||
description: Choose whether restarting Jupyter will kill the container or not
|
||||
schema:
|
||||
type: boolean
|
||||
default: true
|
||||
# Include{containerConfig}
|
||||
# Include{serviceRoot}
|
||||
- variable: main
|
||||
label: Main Service
|
||||
description: The Primary service on which the healthcheck runs, often the webUI
|
||||
schema:
|
||||
additional_attrs: true
|
||||
type: dict
|
||||
attrs:
|
||||
# Include{serviceSelectorSimple}
|
||||
# Include{serviceSelectorExtras}
|
||||
- variable: main
|
||||
label: Main Service Port Configuration
|
||||
schema:
|
||||
additional_attrs: true
|
||||
type: dict
|
||||
attrs:
|
||||
- variable: port
|
||||
label: Port
|
||||
description: This port exposes the container port on the service
|
||||
schema:
|
||||
type: int
|
||||
default: 10300
|
||||
required: true
|
||||
# Include{advancedPortHTTP}
|
||||
- variable: targetPort
|
||||
label: Target Port
|
||||
description: The internal(!) port on the container the Application runs on
|
||||
schema:
|
||||
type: int
|
||||
default: 8888
|
||||
# Include{serviceExpertRoot}
|
||||
default: false
|
||||
# Include{serviceExpert}
|
||||
# Include{serviceList}
|
||||
# Include{persistenceRoot}
|
||||
- variable: data
|
||||
label: data Storage
|
||||
description: Container Data Path
|
||||
schema:
|
||||
additional_attrs: true
|
||||
type: dict
|
||||
attrs:
|
||||
# Include{persistenceBasic}
|
||||
# Include{persistenceAdvanced}
|
||||
# Include{persistenceList}
|
||||
# Include{ingressRoot}
|
||||
- variable: main
|
||||
label: Main Ingress
|
||||
schema:
|
||||
additional_attrs: true
|
||||
type: dict
|
||||
attrs:
|
||||
# Include{ingressDefault}
|
||||
# Include{ingressTLS}
|
||||
# Include{ingressTraefik}
|
||||
# Include{ingressExpert}
|
||||
# Include{ingressList}
|
||||
# Include{security}
|
||||
# Include{securityContextAdvancedRoot}
|
||||
- variable: privileged
|
||||
label: Privileged mode
|
||||
schema:
|
||||
type: boolean
|
||||
default: false
|
||||
- variable: readOnlyRootFilesystem
|
||||
label: ReadOnly Root Filesystem
|
||||
schema:
|
||||
type: boolean
|
||||
default: false
|
||||
- variable: allowPrivilegeEscalation
|
||||
label: Allow Privilege Escalation
|
||||
schema:
|
||||
type: boolean
|
||||
default: false
|
||||
- variable: runAsNonRoot
|
||||
label: runAsNonRoot
|
||||
schema:
|
||||
type: boolean
|
||||
default: false
|
||||
# Include{securityContextAdvanced}
|
||||
# Include{podSecurityContextRoot}
|
||||
- variable: runAsUser
|
||||
label: runAsUser
|
||||
description: The UserID of the user running the application
|
||||
schema:
|
||||
type: int
|
||||
default: 0
|
||||
- variable: runAsGroup
|
||||
label: runAsGroup
|
||||
description: The groupID this App of the user running the application
|
||||
schema:
|
||||
type: int
|
||||
default: 0
|
||||
- variable: fsGroup
|
||||
label: fsGroup
|
||||
description: The group that should own ALL storage.
|
||||
schema:
|
||||
type: int
|
||||
default: 568
|
||||
# Include{podSecurityContextAdvanced}
|
||||
# Include{resources}
|
||||
# Include{advanced}
|
||||
# Include{addons}
|
||||
# Include{documentation}
|
||||
@@ -0,0 +1,2 @@
|
||||
{{/* Render the templates */}}
|
||||
{{ include "tc.common.loader.all" . }}
|
||||
@@ -0,0 +1,68 @@
|
||||
image:
|
||||
repository: tccr.io/truecharts/jupyter-base
|
||||
pullPolicy: IfNotPresent
|
||||
tag: v2022-09@sha256:5790c30b0fddec69fc42f41cb71c26cea4cc0e5e02c4a5f30fe23d5a42f05793
|
||||
imageMinimal:
|
||||
repository: tccr.io/truecharts/jupyter-minimal
|
||||
pullPolicy: IfNotPresent
|
||||
tag: v2022-09@sha256:08d2741d6995c6c78332292f76409cfa47f31a5a02c24c5271ebf6c1052deb20
|
||||
imageR:
|
||||
repository: tccr.io/truecharts/jupyter-r
|
||||
pullPolicy: IfNotPresent
|
||||
tag: v2022-09@sha256:86bbe2fc225742e9a50a0755eacea2aa152f6ea2092e2a1501080a6a26276883
|
||||
imageScipy:
|
||||
repository: tccr.io/truecharts/jupyter-scipy
|
||||
pullPolicy: IfNotPresent
|
||||
tag: v2022-09@sha256:ff4cec114bfdf76e69b4f09d255c55bf7127e1e7e9f57a1cef23ea11f151f0fc
|
||||
imageTensorflow:
|
||||
repository: tccr.io/truecharts/jupyter-tensorflow
|
||||
pullPolicy: IfNotPresent
|
||||
tag: v2022-09@sha256:0ed38305cade1f9e328985d42d604ca186a8d01e54b6249a7a63c0cc44ff872c
|
||||
imageDataScience:
|
||||
repository: tccr.io/truecharts/jupyter-datascience
|
||||
pullPolicy: IfNotPresent
|
||||
tag: v2022-09@sha256:79c7e225a20c12535748e37244e25c2cbf32add9b7d22714c0f463513d158b7f
|
||||
imagePySpark:
|
||||
repository: tccr.io/truecharts/jupyter/pyspark
|
||||
pullPolicy: IfNotPresent
|
||||
tag: v2022-09@sha256:c7252503a9a0b75ad72cfc4fc3091d28383c71e1a8707b7f6f74dc1fd2179404
|
||||
imageAllSpark:
|
||||
repository: tccr.io/truecharts/jupyter-all-spark
|
||||
pullPolicy: IfNotPresent
|
||||
tag: v2022-09@sha256:557256ac5d530773f41ee1493cbce77292b3a0cfa40531a1113951fc090cc826
|
||||
|
||||
securityContext:
|
||||
readOnlyRootFilesystem: false
|
||||
runAsNonRoot: false
|
||||
|
||||
podSecurityContext:
|
||||
runAsUser: 0
|
||||
runAsGroup: 0
|
||||
|
||||
jupyter:
|
||||
jupyter_cmd: lab
|
||||
restartable: true
|
||||
|
||||
env:
|
||||
NB_UID: "{{ .Values.security.PUID }}"
|
||||
NB_GID: "{{ .Values.podSecurityContext.fsGroup }}"
|
||||
NB_UMASK: "{{ .Values.security.UMASK }}"
|
||||
# User Defined
|
||||
DOCKER_STACKS_JUPYTER_CMD: "{{ .Values.jupyter.jupyter_cmd }}"
|
||||
RESTARTABLE: '{{ ternary "yes" "no" .Values.jupyter.restartable }}'
|
||||
|
||||
service:
|
||||
main:
|
||||
ports:
|
||||
main:
|
||||
port: 10300
|
||||
protocol: HTTP
|
||||
targetPort: 8888
|
||||
|
||||
persistence:
|
||||
data:
|
||||
enabled: true
|
||||
mountPath: /home/jovyan/work
|
||||
|
||||
portal:
|
||||
enabled: true
|
||||
Reference in New Issue
Block a user