Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP - charts for kernel provisioners bigdata-notebook-workspace #249

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 7 additions & 15 deletions charts/bigdata-notebook-workspace/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,8 @@ spec:
ports:
- containerPort: {{ .Values.containerPort.port }}
name: {{ .Values.containerPort.name }}
command:
- start-notebook.py
args:
{{- range $key, $value := .Values.server }}
- --ServerApp.{{ $key | snakecase }}={{$value}}
{{- end}}
- --GatewayWebSocketConnection.kernel_ws_protocol=''
- --GatewayClient.gateway_token_renewer_class=jupyter_server.gateway.spottokenrenewer.SpotTokenRenewer
- containerPort: 8877
name: http-response
env:
{{- if .Values.pvc.create }}
- name: "CHOWN_HOME"
Expand All @@ -67,19 +61,17 @@ spec:
value: "-R"
{{- end }}
{{- if .Values.gatewayClient.enabled }}
- name: "JUPYTER_GATEWAY_URL"
value: {{ .Values.gatewayClient.url }}
- name: "JUPYTER_GATEWAY_AUTH_TOKEN"
- name: "SPOTINST_AUTH_TOKEN"
valueFrom:
secretKeyRef:
name: {{ .Release.Name }}
key: {{ .Values.gatewayClient.secretKeyToken }}
- name: "JUPYTER_GATEWAY_REQUEST_TIMEOUT"
value: {{ .Values.gatewayClient.requestTimeout | quote }}
- name: "JUPYTER_GATEWAY_HEADERS"
value: {{ .Values.gatewayClient.headers | quote }}
{{- end }}
{{- if .Values.pvc.create }}
- name: GP_OFAS_WKSP_ID
value: {{ .Release.Name }}
- name: GP_OFAS_CLUSTER_ID
value: "osc-cec441dc"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hard-coded for mathilde cluster

volumeMounts:
- name: {{ .Values.volume.name }}
mountPath: {{ .Values.volume.mountPath }}
Expand Down
40 changes: 40 additions & 0 deletions charts/bigdata-notebook-workspace/templates/role.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: {{ include "bigdata-notebook-workspace.fullname" . }}
namespace: {{ .Release.Namespace }}
rules:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is actually needed

- apiGroups:
- ""
resources:
- 'configmaps'
verbs:
- get
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ include "bigdata-notebook-workspace.fullname" . }}-pod-watcher
rules:
- apiGroups:
- ""
resources:
- 'pods'
- 'services'
verbs:
- get
- list
- watch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ include "bigdata-notebook-workspace.fullname" . }}-killer
rules:
- apiGroups:
- sparkoperator.k8s.io
resources:
- '*'
verbs:
- 'list'
- 'patch'
40 changes: 40 additions & 0 deletions charts/bigdata-notebook-workspace/templates/role_binding.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: {{ include "bigdata-notebook-workspace.fullname" . }}
namespace: {{ .Release.Namespace }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: {{ include "bigdata-notebook-workspace.fullname" . }}
subjects:
- kind: ServiceAccount
name: {{ include "bigdata-notebook-workspace.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ include "bigdata-notebook-workspace.fullname" . }}-pod-watcher
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: {{ include "bigdata-notebook-workspace.fullname" . }}-pod-watcher
subjects:
- kind: ServiceAccount
name: {{ include "bigdata-notebook-workspace.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ include "bigdata-notebook-workspace.fullname" . }}-killer
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: {{ include "bigdata-notebook-workspace.fullname" . }}-killer
subjects:
- kind: ServiceAccount
name: {{ include "bigdata-notebook-workspace.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
5 changes: 5 additions & 0 deletions charts/bigdata-notebook-workspace/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,10 @@ spec:
targetPort: {{ .Values.containerPort.name }}
protocol: TCP
name: {{ .Values.containerPort.name }}
# The port on which Gateway Provisioners will receive kernel connection info responses.
- name: http-response
port: 8877
targetPort: 8877
protocol: TCP
selector:
{{- include "bigdata-notebook-workspace.selectorLabels" . | nindent 4 }}
12 changes: 12 additions & 0 deletions charts/bigdata-notebook-workspace/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{{- if .Values.serviceAccount.create -}}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "bigdata-notebook-workspace.serviceAccountName" . }}
labels:
{{- include "bigdata-notebook-workspace.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
12 changes: 6 additions & 6 deletions charts/bigdata-notebook-workspace/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ server:
allowOrigin: '*'

image:
repository: public.ecr.aws/ocean-spark/bigdata-notebook
pullPolicy: IfNotPresent
repository: 598800841386.dkr.ecr.us-east-2.amazonaws.com/dev/test-images
pullPolicy: Always
# Overrides the image tag whose default is the chart appVersion.
tag: lab-4.1.8-ofas-31799c9
tag: bigdata-notebook-workspace-bigdata-notebook-workspace-gateway-provisioner
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hard-coded python image that I have locally built and pushed


imagePullSecrets:
- name: spot-bigdata-image-pull
- name: spot-bigdata-image-pull-dev

nameOverride: ""
fullnameOverride: ""
Expand All @@ -44,9 +44,9 @@ sharedLabels: {}
sharedAnnotations: {}

serviceAccount:
create: false
create: true
annotations: {}
name: ""
name: bigdata-notebook-workspace

pvc:
create: true
Expand Down
Loading