Skip to content

Commit

Permalink
Merge pull request #870 from InseeFrLab/chart-v10
Browse files Browse the repository at this point in the history
Chart v10
  • Loading branch information
garronej authored Nov 6, 2024
2 parents 177ffed + 675379a commit 4842671
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 11 deletions.
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
28 changes: 24 additions & 4 deletions helm-chart/values.yaml
Original file line number Diff line number Diff line change
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

0 comments on commit 4842671

Please sign in to comment.