gen-mind / cognix

Opensource private chatGPT for your organization knowledge
https://cognix.ch
Other
13 stars 5 forks source link

implement config map #345

Open gsantopaolo opened 2 months ago

gsantopaolo commented 2 months ago

config map shall be implemented server side

If you deen you can contact Noel for k8/config map

apCognixCh commented 2 months ago

Need to be clarified :

  1. What user role will have ability to call configmap endpoints ? ( in current implementation all users that registered in cognix have role admin for they tenant ) We do not have any user that have permission for configure working environment.

  2. For applying changes in configmap we need to restart containers that depends on this changes. I need research time or instruction how I can do that from inside of pod ( I hope this package provide this ability https://github.com/kubernetes/client-go) and from docker container ( I need time for research )

  3. Do you need to have a separate one container for management k8s and docker or do implement this functionality in api container ?

apCognixCh commented 2 months ago

According to figma design is not clear what configMap ( or .env file) we should manage. curently we use several configMaps for different services. ?

@gsantopaolo

gsantopaolo commented 2 months ago
  1. super admin
  2. pod restart its out of the scope of this feature
  3. separate container
  4. For the use it shall be transparent under the hood if we are running Docker we change our .env files. If we are running on K8 we change the config map. I would like to have separate files in config map as well, ask noel
apCognixCh commented 2 months ago

@gsantopaolo

implement new container for edit .env files in docker-compose environment . edit configMap in k8s cluster

endpoints [GET] /api/config-map/{filename} - return content of config map [POST] /api/config-map/{filename} - add or update key - value pair in configmap [DELETE] / api/config-map/{filename}/{key} - remove key- value pair from configmap.

Estimation time : 16 - 20 hours