Open keyvaann opened 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/
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.
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:
values.yaml
and some predefined rules to make sure they are in sync.