This collection of charts help users to launch many IDE with various binary stacks (python , R) with or without GPU support. Docker images are built here and help us to give a homogeneous stack.
In order to contribute you have to be familiar with Helm and to be familiar with Helm you need to be familiar with Kubernetes objects.
In Onyxia we use the values.schema.json file to know what options should be displayed to the user at the service configuration step and what default value Onyxia should inject.
Let's consider a sample of the values.schema.json of the InseeFrLab/helm-charts-datascience's Jupyter chart:
values.schema.json
"git": {"description":"Git user configuration","type":"object","properties": {"enabled": {"type":"boolean","description":"Add git config inside your environment","default":true },"name": {"type":"string","description":"user name for git","default":"","x-onyxia": {"overwriteDefaultWith":"git.name" },"hidden": {"value":false,"path":"git/enabled" } },"email": {"type":"string","description":"user email for git","default":"","x-onyxia": {"overwriteDefaultWith":"git.email" },"hidden": {"value":false,"path":"git/enabled" } },"cache": {"type":"string","description":"duration in seconds of the credentials cache duration","default":"","x-onyxia": {"overwriteDefaultWith":"git.credentials_cache_duration" },"hidden": {"value":false,"path":"git/enabled" } },"token": {"type":"string","description":"personal access token","default":"","x-onyxia": {"overwriteDefaultWith":"git.token" },"hidden": {"value":false,"path":"git/enabled" } },"repository": {"type":"string","description":"Repository url","default":"","hidden": {"value":false,"path":"git/enabled" } },"branch": {"type":"string","description":"Brach automatically checkout","default":"","hidden": {"value":"","path":"git/repository" } } }},
And it translates into this:
Note the "git.name", "git.email" and "git.token", this enables onyxia-web to pre fill the fields.
If the user took the time to fill its profile information, onyxia-web know what is the Git username, email and personal access token of the user.
Here is defined the structure of the context that you can use in the overwriteDefaultWith field:
You probably want to be able to define a limit to the amount of resources a user can request when launching a service.
It's possible to do it at the catalog level but it's best to enable the person who is deploying Onyxia to define boundaries for his deployment regions.
This is the purpose of the x-onyxia param useRegionSliderConfig
{"$schema":"http://json-schema.org/schema#","type":"object","properties": {"resources": { "description": "Your service will have at least the requested resources and never more than its limits. No limit for a resource and you can consume everything left on the host machine.",
"type":"object","properties": {"limits": {"description":"max resources","type":"object","properties": {"nvidia.com/gpu": {"description":"GPU to allocate to this instance. This is also requested","type":"string","default":"0",// Will be overwritten by "1""render":"slider","sliderMin":0,// Will be overwritten by 1"sliderMax":3,// Will be overwritten by 4"sliderStep":1,// Will be overwritten by 1"sliderUnit":"",// Will be overwritten by """x-onyxia": {"overwriteDefaultWith":"region.resources.gpu","useRegionSliderConfig":"gpu"// đ } },"cpu": {"description":"The maximum amount of cpu","title":"CPU","type":"string","default":"30000m","render":"slider","sliderMin":50,"sliderMax":40000,"sliderStep":50,"sliderUnit":"m","sliderExtremity":"up","sliderExtremitySemantic":"Maximum","sliderRangeId":"cpu","x-onyxia": {"overwriteDefaultWith":"region.resources.cpuLimit","useRegionSliderConfig":"cpu" } },"memory": {"description":"The maximum amount of memory","title":"Memory","type":"string","default":"50Gi","render":"slider","sliderMin":1,"sliderMax":200,"sliderStep":1,"sliderUnit":"Gi","sliderExtremity":"up","sliderExtremitySemantic":"Maximum","sliderRangeId":"memory","x-onyxia": {"overwriteDefaultWith":"region.resources.memoryLimit","useRegionSliderConfig":"memory" } } } } } } }}
You now have all the relevent information to submit PR on the existing catalogs or even to create your own.
Remember that a helm chart repository is nothing more than a GitHub repo with a special github Action setup to publish the charts on GitHub Pages.
If you are looking for a repo to start from have a look at this one, it has a directory where you can put the icons of your services.