Skip to content

Chart v10 #870

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

Merged
merged 3 commits into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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 api
Submodule api updated 25 files
+4 −2 README.md
+24 −23 docs/region-configuration.md
+5 −0 onyxia-api/pom.xml
+5 −1 onyxia-api/src/main/java/fr/insee/onyxia/api/configuration/CustomObjectMapper.java
+92 −2 onyxia-api/src/main/java/fr/insee/onyxia/api/controller/api/mylab/MyLabController.java
+4 −91 onyxia-api/src/main/java/fr/insee/onyxia/api/controller/api/mylab/QuotaController.java
+1 −105 onyxia-api/src/main/java/fr/insee/onyxia/api/controller/pub/CatalogController.java
+8 −4 onyxia-api/src/main/java/fr/insee/onyxia/api/controller/pub/JsonSchemaController.java
+2 −9 onyxia-api/src/main/java/fr/insee/onyxia/api/dao/universe/CatalogLoader.java
+110 −11 onyxia-api/src/main/java/fr/insee/onyxia/api/security/OIDCConfiguration.java
+82 −4 onyxia-api/src/main/java/fr/insee/onyxia/api/services/JsonSchemaRegistryService.java
+21 −11 onyxia-api/src/main/java/fr/insee/onyxia/api/services/JsonSchemaResolutionService.java
+1 −14 onyxia-api/src/main/java/fr/insee/onyxia/api/services/impl/HelmAppsService.java
+10 −24 onyxia-api/src/main/java/fr/insee/onyxia/api/services/impl/kubernetes/KubernetesService.java
+3 −0 onyxia-api/src/main/resources/application.properties
+0 −1 onyxia-api/src/main/resources/regions.json
+20 −0 onyxia-api/src/main/resources/schemas/ide/extraenv.json
+1 −0 onyxia-api/src/main/resources/schemas/nodeSelector-gpu.json
+1 −0 onyxia-api/src/main/resources/schemas/nodeSelector.json
+1 −0 onyxia-api/src/main/resources/schemas/tolerations.json
+11 −0 onyxia-model/src/main/java/fr/insee/onyxia/model/User.java
+21 −0 onyxia-model/src/main/java/fr/insee/onyxia/model/catalog/CatalogWrapper.java
+2 −0 onyxia-model/src/main/java/fr/insee/onyxia/model/catalog/Pkg.java
+7 −26 onyxia-model/src/main/java/fr/insee/onyxia/model/region/Region.java
+12 −0 onyxia-model/src/main/java/fr/insee/onyxia/model/views/Views.java
3 changes: 2 additions & 1 deletion helm-chart/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@ data:
catalogs: {{ .Values.api.catalogs | toJson | quote }}
{{- end}}
{{- if .Values.api.schemas.enabled }}
external.schema.directory: {{ .Values.api.schemas.rootPath | quote }}
external.schema.directory: {{ printf "%s%s/" .Values.api.schemas.rootPath .Values.api.schemas.subPathDefault | quote }}
role.schema.directory: {{ printf "%s%s/" .Values.api.schemas.rootPath .Values.api.schemas.subPathRole | quote }}
{{- end}}
15 changes: 14 additions & 1 deletion helm-chart/templates/configmaps-schemas.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,23 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ $fullname }}-{{ .relativePath | sha256sum | trunc 8 }}
name: {{ $fullname }}-{{ printf "%s %s" .relativePath "default" | sha256sum | trunc 8 }}
data:
{{ .relativePath | base }}: |-
{{ .content | indent 4 }}
---
{{- end }}
{{- range .Values.api.schemas.roles }}
{{- $role := .roleName -}}
{{- range .files }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ $fullname }}-{{ printf "%s %s %s" .relativePath "role" $role | sha256sum | trunc 8 }}
data:
{{ .relativePath | base }}: |-
{{ .content | indent 4 }}
---
{{- end }}
{{- end }}
{{- end }}
26 changes: 22 additions & 4 deletions helm-chart/templates/deployment-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,22 @@ spec:
volumeMounts:
{{- if .Values.api.schemas.enabled }}
{{- $path := .Values.api.schemas.rootPath -}}
{{- $subpath := .Values.api.schemas.subPathDefault -}}
{{- $fullname := include "onyxia.fullname" . -}}
{{- range .Values.api.schemas.files }}
- name: {{ $fullname }}-{{ .relativePath | sha256sum | trunc 8 }}
mountPath: {{ $path }}{{ .relativePath }}
- name: {{ $fullname }}-{{ printf "%s %s" .relativePath "default" | sha256sum | trunc 8 }}
mountPath: {{ printf "%s%s/%s" $path $subpath .relativePath }}
subPath: {{ .relativePath | base }}
{{- end }}
{{- $subpath := .Values.api.schemas.subPathRole -}}
{{- range .Values.api.schemas.roles }}
{{- $role := .roleName -}}
{{- range .files }}
- name: {{ $fullname }}-{{ printf "%s %s %s" .relativePath "role" $role | sha256sum | trunc 8 }}
mountPath: {{ printf "%s%s/%s/%s" $path $subpath $role .relativePath }}
subPath: {{ .relativePath | base }}
{{- end }}
{{- end }}
{{- end }}
{{- if .Values.api.extraVolumeMounts }}
{{- toYaml .Values.api.extraVolumeMounts | nindent 12 }}
Expand All @@ -107,9 +117,17 @@ spec:
{{- if .Values.api.schemas.enabled }}
{{- $fullname := include "onyxia.fullname" . -}}
{{- range .Values.api.schemas.files }}
- name: {{ $fullname }}-{{ .relativePath | sha256sum | trunc 8 }}
- name: {{ $fullname }}-{{ printf "%s %s" .relativePath "default" | sha256sum | trunc 8 }}
configMap:
name: {{ $fullname }}-{{ .relativePath | sha256sum | trunc 8 }}
name: {{ $fullname }}-{{ printf "%s %s" .relativePath "default" | sha256sum | trunc 8 }}
{{- end }}
{{- range .Values.api.schemas.roles }}
{{- $role := .roleName -}}
{{- range .files }}
- name: {{ $fullname }}-{{ printf "%s %s %s" .relativePath "role" $role | sha256sum | trunc 8 }}
configMap:
name: {{ $fullname }}-{{ printf "%s %s %s" .relativePath "role" $role | sha256sum | trunc 8 }}
{{- end }}
{{- end }}
{{- end }}
{{- if .Values.api.extraVolumes }}
Expand Down
30 changes: 25 additions & 5 deletions helm-chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ api:
replicaCount: 1
image:
repository: inseefrlab/onyxia-api
tag: v3.1.0
tag: v4.0.0
pullPolicy: IfNotPresent
contextPath: /api

Expand Down Expand Up @@ -166,10 +166,13 @@ api:
schemas:
enabled: false
rootPath: /schemas/
files:
[]
# - relativePath: nodeSelector.json
# content: |
subPathDefault: default
subPathRole: role
roles:
# - roleName: datascientist
# files:
# - relativePath: nodeSelector.json
# content: |
# {
# "$schema": "http://json-schema.org/draft-07/schema#",
# "title": "Node Selector",
Expand All @@ -188,6 +191,23 @@ api:
# },
# "additionalProperties": false
# }
files:
[]
# - relativePath: nodeSelector.json
# content: |
# {
# "$schema": "http://json-schema.org/draft-07/schema#",
# "title": "Node Selector",
# "type": "object",
# "properties": {
# "disktype": {
# "description": "The type of disk",
# "type": "string",
# "enum": ["ssd", "hdd"]
# }
# },
# "additionalProperties": false
# }
livenessProbe:
enabled: true
path: /public/healthcheck
Expand Down
Loading