Skip to content
Merged
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
2 changes: 1 addition & 1 deletion charts/jupyter-pyspark/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 2.3.23
version: 2.3.24
dependencies:
- name: library-chart
version: 1.7.14
Expand Down
1 change: 1 addition & 0 deletions charts/jupyter-pyspark/templates/secret-assistant.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{ include "library-chart.secretAssistantJupyter" . }}
30 changes: 30 additions & 0 deletions charts/jupyter-pyspark/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ spec:
volumes:
- name: config-files
emptyDir: {}
- name: jupyter-local
emptyDir: {}
- name: home
{{- if (.Values.persistence).enabled }}
persistentVolumeClaim:
Expand Down Expand Up @@ -118,6 +120,11 @@ spec:
secret:
secretName: {{ include "library-chart.secretNameCacerts" . }}
{{- end }}
{{- if (.Values.userPreferences.aiAssistant).enabled }}
- name: secret-assistant
secret:
secretName: {{ include "library-chart.secretNameAssistantJupyter" . }}
{{- end }}
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
Expand All @@ -136,6 +143,10 @@ spec:
- -c
- |
echo 'initContainer make-configmaps-writable is started';
{{ if (.Values.userPreferences.aiAssistant).enabled }}
mkdir /dest/jupyter-ai
cp /src/jupyter-ai/config.json /dest/jupyter-ai/config.json
{{- end }}
{{- if .Values.s3.enabled }}
mkdir /dest/coresite;
cp /src/coresite/core-site.xml /dest/coresite/core-site.xml;
Expand Down Expand Up @@ -166,6 +177,10 @@ spec:
awk 'BEGIN {c=0;} /BEGIN CERT/{c++} { print > "/dest/cacerts/cert." c ".crt"}' < /tmp/ca.pem;
{{- end }}
volumeMounts:
{{- if (.Values.userPreferences.aiAssistant).enabled }}
- name: secret-assistant
mountPath: /src/jupyter-ai
{{- end }}
- name: config-files
mountPath: /dest
{{- if and .Values.certificates .Values.certificates.cacerts }}
Expand Down Expand Up @@ -249,6 +264,14 @@ spec:
{{- end }}
- name: UV_CACHE_DIR
value: /home/{{ .Values.environment.user }}/work/.cache/uv
{{- if (.Values.userPreferences.aiAssistant).enabled }}
- name: OPENAI_API_KEY
value: {{ .Values.userPreferences.aiAssistant.apiKey }}
- name: OPENAI_BASE_URL
value: {{ .Values.userPreferences.aiAssistant.apiBase }}
- name: ENABLE_JUPYTER_AI_EXTENSION
value: "{{ .Values.userPreferences.aiAssistant.enabled }}"
{{- end }}
envFrom:
- secretRef:
name: {{ include "library-chart.secretNameToken" . }}
Expand Down Expand Up @@ -312,6 +335,13 @@ spec:
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumeMounts:
- name: jupyter-local
mountPath: /home/{{ .Values.environment.user }}/.local/share/jupyter
{{ if (.Values.userPreferences.aiAssistant).enabled }}
- mountPath: /home/{{ .Values.environment.user }}/.local/share/jupyter/jupyter_ai
subPath: jupyter-ai
name: config-files
{{- end }}
- mountPath: /home/{{ .Values.environment.user }}/work
subPath: work
name: home
Expand Down
80 changes: 79 additions & 1 deletion charts/jupyter-pyspark/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -831,7 +831,7 @@
"hidden": true
}
},
"tlsSecretName":{
"tlsSecretName": {
"type": "string",
"default": "",
"x-onyxia": {
Expand Down Expand Up @@ -904,6 +904,84 @@
"hidden": true,
"overwriteDefaultWith": "user.lang"
}
},
"aiAssistant": {
"title": "AI Assistant",
"type": "object",
"description": "Configure Jupyter-ai, an extension to use custom AI code assistants",
"x-onyxia": {
"overwriteSchemaWith": "aiAssistant-jupyter.json"
},
"properties": {
"enabled": {
"type": "boolean",
"default": false,
"hidden": true,
"x-onyxia": {
"overwriteDefaultWith": "user.profile.aiAssistant.enabled"
}
},
"model": {
"type": "string",
"default": "",
"hidden": {
"value": false,
"path": "enabled",
"isPathRelative": true
},
"x-onyxia": {
"overwriteDefaultWith": "user.profile.aiAssistant.model"
}
},
"modelProvider": {
"type": "string",
"default": "",
"hidden": {
"value": false,
"path": "enabled",
"isPathRelative": true
},
"x-onyxia": {
"overwriteDefaultWith": "user.profile.aiAssistant.modelProvider"
}
},
"embeddingsProvider": {
"type": "string",
"default": "",
"hidden": {
"value": false,
"path": "enabled",
"isPathRelative": true
},
"x-onyxia": {
"overwriteDefaultWith": "user.profile.aiAssistant.embeddingsProvider"
}
},
"apiBase": {
"type": "string",
"default": "",
"hidden": {
"value": false,
"path": "enabled",
"isPathRelative": true
},
"x-onyxia": {
"overwriteDefaultWith": "user.profile.aiAssistant.apiBase"
}
},
"apiKey": {
"type": "string",
"default": "",
"hidden": {
"value": false,
"path": "enabled",
"isPathRelative": true
},
"x-onyxia": {
"overwriteDefaultWith": "user.profile.aiAssistant.apiKey"
}
}
}
}
}
},
Expand Down
7 changes: 7 additions & 0 deletions charts/jupyter-pyspark/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,13 @@ startupProbe:
userPreferences:
darkMode: false
language: "en"
aiAssistant:
enabled: false
modelProvider: ""
embeddingsProvider: ""
apiBase: ""
apiKey: ""
secretName: "" # Generated based on the service's name if empty or not set

openshiftSCC:
enabled: false
Expand Down
Loading