RADAR-base / RADAR-Kubernetes

Kubernetes deployment of RADAR-base
Apache License 2.0
17 stars 9 forks source link

Improve configuration management #82

Open keyvaann opened 3 years ago

keyvaann commented 3 years ago

With lot of configuration options available for the stack and constant changes and updates to them managing the changes becomes more difficult and configuration is more likely to get out of sync with the charts or have wrong configuration or format. There should be away to prevent bad configuration applied to the cluster. Current suggestions are:

keyvaann commented 3 years ago

Another option is defining the configuration as an CRD which has an schema built in to it and Kubernetes will validate and prevent bad configuration from being applied. It will also be a first step into making Radar-Operator. https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/

keyvaann commented 3 years ago

The easiest and fastest improvement that can be done is defining values.schema.json for charts. Helm will validate given values against defined schema. https://helm.sh/docs/topics/charts/#schema-files https://austindewey.com/2020/06/13/helm-tricks-input-validation-with-values-schema-json/

In order to have a quick start it is possible to use the plugin to create the base schema and then build on top of that. https://github.com/karuppiah7890/helm-schema-gen

Using this schema can make CRD definition minimal or obsolete.