sysco-middleware / KGO

Kafka governance UI
MIT License
3 stars 0 forks source link

Config file #2

Closed jeroenrinzema closed 6 years ago

jeroenrinzema commented 6 years ago

A configuration (json) should be created that contains the instance configuration. This configuration file could be hosted as a static file (/static/config.json) and requested before Vue is initialised.

Example config file

{
  "kafkaSchemaRegistryHost": "http://127.0.0.1:8081",
  "kafkaRestHost": "http://127.0.0.1:8082"
}
jeqo commented 6 years ago

I like the idea. Could these values come from Environment Variables as well? Potentially this UI will be deployed as docker container, and ENV variables would be the easiest way to pass this values.

jeroenrinzema commented 6 years ago

We could create a shell script that is executed upon startup that generates the JSON config file. I was also thinking to include the plausibility to fetch the UI config from a API.

{
  "useExternalConfig": true,
  "externalConfigEndpoint": "http://127.0.0.1:9090/config"
jeqo commented 6 years ago

Are we sure we want to give that responsibility to the app? We have 2 options: keep it as it is (forget my alternative) and pass the JSON as part of the building process (this is how a ConfigMap will work in Kubernetes, one of my use-cases). The other option is to inject Variables. I think we can keep it as you proposed at the beginning. Let's keep it as simple as possible and check how it is adopted.

jeroenrinzema commented 6 years ago

TODO: