diff --git a/charts/vscode-pyspark/Chart.yaml b/charts/vscode-pyspark/Chart.yaml index f1f6cab2..d5fec8c5 100644 --- a/charts/vscode-pyspark/Chart.yaml +++ b/charts/vscode-pyspark/Chart.yaml @@ -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.2.9 +version: 2.2.10 dependencies: - name: library-chart version: 1.6.13 diff --git a/charts/vscode-pyspark/templates/secret-assistant.yaml b/charts/vscode-pyspark/templates/secret-assistant.yaml new file mode 100644 index 00000000..0ea395d3 --- /dev/null +++ b/charts/vscode-pyspark/templates/secret-assistant.yaml @@ -0,0 +1 @@ +{{ include "library-chart.secretAssistant" . }} diff --git a/charts/vscode-pyspark/templates/statefulset.yaml b/charts/vscode-pyspark/templates/statefulset.yaml index f27b2873..be31cca3 100644 --- a/charts/vscode-pyspark/templates/statefulset.yaml +++ b/charts/vscode-pyspark/templates/statefulset.yaml @@ -111,6 +111,11 @@ spec: secret: secretName: {{ include "library-chart.secretNameCacerts" . }} {{- end }} + {{- if (.Values.userPreferences.aiAssistant).enabled }} + - name: secret-assistant + secret: + secretName: {{ include "library-chart.secretNameAssistant" . }} + {{- end }} {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} @@ -127,6 +132,10 @@ spec: - -c - | echo 'initContainer make-secrets-writable is started'; + {{ if (.Values.userPreferences.aiAssistant).enabled }} + mkdir /dest/continue + cp /src/continue/config.yaml /dest/continue/config.yaml + {{- end }} {{- if .Values.s3.enabled }} mkdir /dest/coresite; cp /src/coresite/core-site.xml /dest/coresite/core-site.xml; @@ -157,6 +166,11 @@ spec: awk 'BEGIN {c=0;} /BEGIN CERT/{c++} { print > "/dest/cacerts/cert." c ".crt"}' < /tmp/ca.pem; {{- end }} volumeMounts: + {{ if (.Values.userPreferences.aiAssistant).enabled }} + - mountPath: /home/{{ .Values.environment.user }}/.continue + subPath: continue + name: config-files + {{- end }} - name: config-files mountPath: /dest {{- if (.Values.certificates).cacerts }} diff --git a/charts/vscode-pyspark/values.schema.json b/charts/vscode-pyspark/values.schema.json index 1097fdb2..75064df1 100644 --- a/charts/vscode-pyspark/values.schema.json +++ b/charts/vscode-pyspark/values.schema.json @@ -960,6 +960,63 @@ "hidden": true, "overwriteDefaultWith": "user.lang" } + }, + "aiAssistant":{ + "type": "object", + "description": "Configure Continue, an extension to use custom AI code assistants", + "x-onyxia": { + "overwriteSchemaWith": "aiAssistant.json" + }, + "properties": { + "enabled": { + "type": "boolean", + "default": false, + "hidden": true, + "x-onyxia": { + "overwriteDefaultWith": "user.profile.aiAssistant.enabled" + } + }, + "model": { + "type": "string", + "default":"", + "hidden": true, + "x-onyxia": { + "overwriteDefaultWith": "user.profile.aiAssistant.model" + } + }, + "provider": { + "type": "string", + "default": "", + "hidden": true, + "x-onyxia": { + "overwriteDefaultWith": "user.profile.aiAssistant.provider" + } + }, + "apiBase":{ + "type": "string", + "default": "", + "hidden": true, + "x-onyxia": { + "overwriteDefaultWith": "user.profile.aiAssistant.apiBase" + } + }, + "apiKey":{ + "type": "string", + "default": "", + "hidden": true, + "x-onyxia": { + "overwriteDefaultWith": "user.profile.aiAssistant.apiKey" + } + }, + "useLegacyCompletionsEndpoint":{ + "type": "boolean", + "default": true, + "hidden": true, + "x-onyxia": { + "overwriteDefaultWith": "user.profile.aiAssistant.useLegacyCompletionsEndpoint" + } + } + } } } }, diff --git a/charts/vscode-pyspark/values.yaml b/charts/vscode-pyspark/values.yaml index 0ec7e1b4..389efd0c 100644 --- a/charts/vscode-pyspark/values.yaml +++ b/charts/vscode-pyspark/values.yaml @@ -258,6 +258,14 @@ startupProbe: userPreferences: darkMode: false language: "en" + aiAssistant: + enabled: false + model: "" + provider: "" + apiBase: "" + apiKey: "" + secretName: "" # Generated based on the service's name if empty or not set + useLegacyCompletionsEndpoint: false certificates: {} # pathToCaBundle: /usr/local/share/ca-certificates/ diff --git a/charts/vscode-python/Chart.yaml b/charts/vscode-python/Chart.yaml index b621622a..56963c35 100644 --- a/charts/vscode-python/Chart.yaml +++ b/charts/vscode-python/Chart.yaml @@ -22,7 +22,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.2.9 +version: 2.2.10 dependencies: - name: library-chart version: 1.6.13 diff --git a/charts/vscode-python/templates/secret-assistant.yaml b/charts/vscode-python/templates/secret-assistant.yaml new file mode 100644 index 00000000..0ea395d3 --- /dev/null +++ b/charts/vscode-python/templates/secret-assistant.yaml @@ -0,0 +1 @@ +{{ include "library-chart.secretAssistant" . }} diff --git a/charts/vscode-python/templates/statefulset.yaml b/charts/vscode-python/templates/statefulset.yaml index 55352eee..7441a91a 100644 --- a/charts/vscode-python/templates/statefulset.yaml +++ b/charts/vscode-python/templates/statefulset.yaml @@ -87,6 +87,11 @@ spec: secret: secretName: {{ include "library-chart.secretNameCacerts" . }} {{- end }} + {{- if (.Values.userPreferences.aiAssistant).enabled }} + - name: secret-assistant + secret: + secretName: {{ include "library-chart.secretNameAssistant" . }} + {{- end }} {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} @@ -103,6 +108,10 @@ spec: - -c - | echo 'initContainer make-secrets-writable is started'; + {{ if (.Values.userPreferences.aiAssistant).enabled }} + mkdir /dest/continue + cp /src/continue/config.yaml /dest/continue/config.yaml + {{- end }} {{- if .Values.discovery.hive }} mkdir /dest/hive; cp /src/hive/hive-site.xml /dest/hive/hive-site.xml; @@ -121,6 +130,11 @@ spec: awk 'BEGIN {c=0;} /BEGIN CERT/{c++} { print > "/dest/cacerts/cert." c ".crt"}' < /tmp/ca.pem; {{- end }} volumeMounts: + {{ if (.Values.userPreferences.aiAssistant).enabled }} + - mountPath: /home/{{ .Values.environment.user }}/.continue + subPath: continue + name: config-files + {{- end }} - name: config-files mountPath: /dest {{- if and .Values.certificates .Values.certificates.cacerts }} diff --git a/charts/vscode-python/values.schema.json b/charts/vscode-python/values.schema.json index e55d6b0c..69a16faf 100644 --- a/charts/vscode-python/values.schema.json +++ b/charts/vscode-python/values.schema.json @@ -907,6 +907,63 @@ "hidden": true, "overwriteDefaultWith": "user.lang" } + }, + "aiAssistant":{ + "type": "object", + "description": "Configure Continue, an extension to use custom AI code assistants", + "x-onyxia": { + "overwriteSchemaWith": "aiAssistant.json" + }, + "properties": { + "enabled": { + "type": "boolean", + "default": false, + "hidden": true, + "x-onyxia": { + "overwriteDefaultWith": "user.profile.aiAssistant.enabled" + } + }, + "model": { + "type": "string", + "default":"", + "hidden": true, + "x-onyxia": { + "overwriteDefaultWith": "user.profile.aiAssistant.model" + } + }, + "provider": { + "type": "string", + "default": "", + "hidden": true, + "x-onyxia": { + "overwriteDefaultWith": "user.profile.aiAssistant.provider" + } + }, + "apiBase":{ + "type": "string", + "default": "", + "hidden": true, + "x-onyxia": { + "overwriteDefaultWith": "user.profile.aiAssistant.apiBase" + } + }, + "apiKey":{ + "type": "string", + "default": "", + "hidden": true, + "x-onyxia": { + "overwriteDefaultWith": "user.profile.aiAssistant.apiKey" + } + }, + "useLegacyCompletionsEndpoint":{ + "type": "boolean", + "default": true, + "hidden": true, + "x-onyxia": { + "overwriteDefaultWith": "user.profile.aiAssistant.useLegacyCompletionsEndpoint" + } + } + } } } }, diff --git a/charts/vscode-python/values.yaml b/charts/vscode-python/values.yaml index a91c432c..80eb43d6 100644 --- a/charts/vscode-python/values.yaml +++ b/charts/vscode-python/values.yaml @@ -229,6 +229,14 @@ startupProbe: userPreferences: darkMode: false language: "en" + aiAssistant: + enabled: false + model: "" + provider: "" + apiBase: "" + apiKey: "" + secretName: "" # Generated based on the service's name if empty or not set + useLegacyCompletionsEndpoint: false openshiftSCC: enabled: false