From e387ff9a0b408239761aa6cc345a190138542c13 Mon Sep 17 00:00:00 2001 From: Joseph Garrone Date: Fri, 22 Sep 2023 21:45:25 +0200 Subject: [PATCH] Improve the documentation of the outer API --- .env | 45 ++++++++++++++++++++++++++++++++++++++------ helm-chart/README.md | 37 ++++++++++++++++++++++++++++++------ 2 files changed, 70 insertions(+), 12 deletions(-) diff --git a/.env b/.env index 6af7f6c44..75e56e235 100644 --- a/.env +++ b/.env @@ -1,8 +1,34 @@ -# https://github.com/facebook/create-react-app/discussions/11767#discussioncomment-1968889 -GENERATE_SOURCEMAP=false -REACT_APP_ONYXIA_API_URL=/api +# Here are defined the environement variables to configure the docker image inseefrlab/onyxia-web. +# Thoses parameters are mostly related to cosmetic configurations. +# +# Example of a value.yaml file: +# +# web: +# # Parameters inseefrlab/onyxia-web, you are reading the file where they are defined. +# env: +# THEME_ID=ultraviolet +# TERMS_OF_SERVICES: | +# { +# "en": "https://www.sspcloud.fr/tos_en.md", +# "fr": "https://www.sspcloud.fr/tos_fr.md" +# } +# api: +# # Parameters of the Docker image inseefrlab/onyxia-api, defined in /api/README.md +# env: +# security.cors.allowed_origins: http://localhost:3000 +# authentication.mode: openidconnect +# keycloak.realm: datalab +# keycloak.auth-server-url: https://auth.lab.my-domain.net/auth +# regions: +# [ +# { +# "id":"demo", +# "name":"Demo", +# +# +# As you can see in the example above, you can omit the REACT_APP_ prefix when defining the parameters in the values.yaml file. -# ===== Keycloak ===== +# ===== Keycloak parameters ===== # OPTIONAL, optional, if not specified, when user authentication is requested, a Jhon Doe user will be assumed connected. REACT_APP_KEYCLOAK_URL= @@ -17,7 +43,7 @@ REACT_APP_KEYCLOAK_REALM= # { "en": "https://sspcloud.fr/tos_en.md" "fr": "https://sspcloud.fr/tos_fr.md" } REACT_APP_TERMS_OF_SERVICES= -# ===== UI Customization ==== +# ===== UI Customization ====== # Can be one of onyxia, france or ultraviolet REACT_APP_THEME_ID=onyxia @@ -173,4 +199,11 @@ REACT_APP_DISABLE_AUTO_LAUNCH=false # - Kaggle token from being injected # # To enable this security feature, set the value to 'true'. -REACT_APP_DISABLE_PERSONAL_INFOS_INJECTION_IN_GROUP=false \ No newline at end of file +REACT_APP_DISABLE_PERSONAL_INFOS_INJECTION_IN_GROUP=false + + +# ===== Devlevel params ====== + +REACT_APP_ONYXIA_API_URL=/api +# https://github.com/facebook/create-react-app/discussions/11767#discussioncomment-1968889 +GENERATE_SOURCEMAP=false \ No newline at end of file diff --git a/helm-chart/README.md b/helm-chart/README.md index e0333cd8d..6adcbe234 100644 --- a/helm-chart/README.md +++ b/helm-chart/README.md @@ -1,9 +1,34 @@ -# Helm chart for [Onyxia](https://onyxia.sh/) +# Helm Chart of [Onyxia](https://onyxia.sh/) -## Breaking changes +- Complete installation guide: https://onyxia.sh/ +- `api` parameters: [../api/README.md](../api/README.md#configuration) +- `web` parameters: [../.env](../.env) -### v3 to v4 +This is a little sample of a typical `onyxia-values.yaml` to show where +the parameters of onyxia-web and onyxia-api should be filled in: -- `ui` block has been renamed to `web` in the values. Change your `values.yaml` file accordingly. -- Any resource created by helm that was suffixed by `ui` is now suffixed by `web`. This should be seamless for you unless you specifically rely on resource name for other purposes. -- `image.name` has been renamed to `image.repository` and `image.version` has been renamed to `image.tag` to be more standard. If you are overriding versions in either web or API you should use those new values keys. +`onyxia-values.yaml` + +```yaml +web: + env: + THEME_ID=ultraviolet + TERMS_OF_SERVICES: | + { + "en": "https://www.sspcloud.fr/tos_en.md", + "fr": "https://www.sspcloud.fr/tos_fr.md" + } + # ... +api: + env: + security.cors.allowed_origins: http://localhost:3000 + authentication.mode: openidconnect + keycloak.realm: datalab + keycloak.auth-server-url: https://auth.lab.my-domain.net/auth + regions: + [ + { + "id":"demo", + "name":"Demo", + # ... +```