Skip to content

Commit

Permalink
use new bigdata-operator as notebook session backend
Browse files Browse the repository at this point in the history
  • Loading branch information
ImpSy committed Apr 29, 2024
1 parent d53807c commit d5f02f3
Show file tree
Hide file tree
Showing 8 changed files with 59 additions and 54 deletions.
4 changes: 2 additions & 2 deletions charts/bigdata-notebook-service/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ apiVersion: v2
name: bigdata-notebook-service
description: A Helm chart for the Spot Big Data Notebook Service
type: application
version: 0.2.9
appVersion: 0.82.1
version: 0.3.0
appVersion: 0.82.3
home: https://github.com/spotinst/charts
icon: https://docs.spot.io/_media/images/spot_mark.png
maintainers:
Expand Down
68 changes: 25 additions & 43 deletions charts/bigdata-notebook-service/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,43 +28,24 @@ spec:
serviceAccountName: {{ include "bigdata-notebook-service.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
volumes:
- name: session-storage
persistentVolumeClaim:
claimName: {{ .Values.sessionStoragePvcName }}
{{- if .Values.telemetry.enabled }}
- name: telementry-global-config
configMap:
name: bigdata-common-telemetry-fluentbit-cm
- name: telementry-custom-config
configMap:
name: {{ include "bigdata-notebook-service.fullname" . }}-telemetry-cm
- name: varlog
hostPath:
path: /var/log/
- name: varlibdockercontainers
hostPath:
path: /var/lib/docker/containers
- name: telemetry-aws-credentials
secret:
secretName: spot-bigdata-telemetry-creds
volumes:
- name: telementry-global-config
configMap:
name: bigdata-common-telemetry-fluentbit-cm
- name: telementry-custom-config
configMap:
name: {{ include "bigdata-notebook-service.fullname" . }}-telemetry-cm
- name: varlog
hostPath:
path: /var/log/
- name: varlibdockercontainers
hostPath:
path: /var/lib/docker/containers
- name: telemetry-aws-credentials
secret:
secretName: spot-bigdata-telemetry-creds
{{- end }}
# This initContainers section should not be needed if the
# securityContext.fsGroup entry above wasn't ignored, but unfortunately
# it is ignored for NFS volumes:
# https://github.com/kubernetes/examples/issues/260
initContainers:
- name: nfs-fixer
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
securityContext:
runAsUser: 0
volumeMounts:
- name: session-storage
mountPath: "/mnt"
command:
- sh
- -c
- (chmod 0775 /mnt; chgrp 1000 /mnt)
containers:
- name: bigdata-notebook-service
ports:
Expand All @@ -73,9 +54,6 @@ spec:
protocol: TCP
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
volumeMounts:
- name: session-storage
mountPath: "/mnt"
livenessProbe:
exec:
command:
Expand All @@ -94,7 +72,7 @@ spec:
- name: EG_NAMESPACE
value: {{ .Release.Namespace }}
- name: EG_LIST_KERNELS
value: {{ .Values.eglistKernels }}
value: {{ .Values.egListKernels | quote }}
- name: EG_CULL_IDLE_TIMEOUT
value: {{ .Values.kernel.cullIdleTimeout | quote }}
- name: EG_LOG_LEVEL
Expand All @@ -113,12 +91,16 @@ spec:
value: "{{ sub .Values.kernel.portMax .Values.kernel.portMin }}"
- name: EG_KERNEL_SESSION_PERSISTENCE
value: "True"
- name: EG_AVAILABILITY_MODE
value: "replication"
- name: EG_KERNEL_SESSION_MANAGER
value: enterprise_gateway.services.sessions.kernelsessionmanager.WebhookKernelSessionManager
- name: EG_WEBHOOK_URL
value: "http://{{ .Values.sessionStorageServiceName }}.{{ .Release.Namespace }}.svc.cluster.local/kernelSession"
- name: EG_RESPONSE_ADDR_ANY
value: "True"
- name: EG_RESPONSE_PORT
value: {{ .Values.kernel.egResponsePort | quote }}
- name: EG_PERSISTENCE_ROOT
value: "/mnt"
- name: SPOTINST_CLUSTER_ID
valueFrom:
configMapKeyRef:
Expand All @@ -143,7 +125,7 @@ spec:
optional: true
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- if .Values.telemetry.enabled }}
{{- if .Values.telemetry.enabled }}
- name: fluentbit
image: "{{ .Values.telemetry.fluentbit.image.repository }}:{{ .Values.telemetry.fluentbit.image.tag }}"
ports:
Expand Down Expand Up @@ -205,7 +187,7 @@ spec:
mountPath: /var/lib/docker/containers
- name: telemetry-aws-credentials
mountPath: /root/.aws
{{- end }}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down
14 changes: 8 additions & 6 deletions charts/bigdata-notebook-service/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ replicaCount: 1
image:
repository: 066597193667.dkr.ecr.us-east-1.amazonaws.com/private/bigdata-notebook-service
pullPolicy: IfNotPresent
tag: 4d9d29b6
tag: 01f57ad7

imagePullSecrets:
- name: spot-bigdata-image-pull
Expand All @@ -33,10 +33,11 @@ ingress:

egBaseUrl: "/"
egLogLevel: "DEBUG"
egListKernels: "true"
egListKernels: "True"

# Has to be in sync with bigdata-operator chart
sessionStorageServiceName: bigdata-operator-api

# Has to be in sync with bigdata-notebook-service-storage chart
sessionStoragePvcName: bigdata-notebook-service-storage

spotBaseUrl: "https://api.spotinst.io"

Expand All @@ -56,12 +57,13 @@ podLabels:

podSecurityContext:
fsGroup: 1000
runAsNonRoot: true

securityContext: {}

livenessProbe:
initialDelaySeconds: 30
periodSeconds: 10
initialDelaySeconds: 10
periodSeconds: 30
timeoutSeconds: 5

resources:
Expand Down
4 changes: 2 additions & 2 deletions charts/bigdata-operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ apiVersion: v2
name: bigdata-operator
description: Spot Ocean BigData Operator
type: application
version: 0.4.13
appVersion: 0.4.10
version: 0.4.14
appVersion: 0.4.11
home: https://github.com/spotinst/charts
icon: https://docs.spot.io/_media/images/spot_mark.png
sources:
Expand Down
17 changes: 17 additions & 0 deletions charts/bigdata-operator/templates/api-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
apiVersion: v1
kind: Service
metadata:
name: {{ include "bigdata-operator.fullname" . }}-api
labels:
{{- include "bigdata-operator.labels" . | nindent 4 }}
spec:
ports:
- name: api
port: 80
protocol: TCP
targetPort: api
selector:
{{- include "bigdata-operator.selectorLabels" . | nindent 4 }}
sessionAffinity: None
type: ClusterIP
3 changes: 3 additions & 0 deletions charts/bigdata-operator/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ spec:
- name: metrics
containerPort: 8080
protocol: TCP
- name: api
containerPort: 18080
protocol: TCP
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ spec:
{{- include "bigdata-operator.selectorLabels" . | nindent 4 }}
sessionAffinity: None
type: ClusterIP

2 changes: 1 addition & 1 deletion charts/bigdata-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ image:
repository: public.ecr.aws/f4k1p1n4/bigdata-operator
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: 0.4.10-0c4f6b5d
tag: 0.4.11-429c6a8f

imagePullSecrets: []

Expand Down

0 comments on commit d5f02f3

Please sign in to comment.