Improve handling of "onyxia metadatas"
ihiverlet opened this issue · comments
Hi !
As of today, when launching a service, Onyxia metadatas (such as the friendly name of a service) are stored in values.yaml files.
A cleaner way to handle such metadata would be to create a secret with all relevant information. This secret could be created ad hoc thanks to the API and be attached to the right helm release via the owner reference.
Not only this could allow us to have a better handling of metadata but the secret would also be deleted when doing an helm uninstall
.
An example of such a secret :
apiVersion: v1
kind: Secret
metadata:
name: onyxia-metadata-[release-name]
ownerReferences:
- apiVersion: v1
controller: true
kind: Secret
name: [helm release secret name]
uid: [helm-release-uid]
data:
friendlyName: "service-friendly-name"
At the moment :
- onyxia load charts and inject some values into the
values.schema.json
file https://github.com/InseeFrLab/onyxia-api/blob/5bd597127bbeeb22d155494d9632dfcaf1c28d1d/onyxia-api/src/main/java/fr/insee/onyxia/api/controller/pub/CatalogController.java#L147 - onyxia-web does the injection
- onyxia-api use this data to eventually select charts to return (for group isolation) which is awful
- onyxia-web also use those metadata
With this behavior, onyxia release will have his own metadata and we will be able to let user modify configuration ( friendly name , sharing ) with touching the helm chart