Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve configuration management #82

Open
keyvaann opened this issue Apr 19, 2021 · 2 comments
Open

Improve configuration management #82

keyvaann opened this issue Apr 19, 2021 · 2 comments

Comments

@keyvaann
Copy link
Collaborator

keyvaann commented Apr 19, 2021

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:

  • Using a linter: This would check the configuration against charts internal values.yaml and some predefined rules to make sure they are in sync.
  • Using versions and migrations: In this approach configuration is treated as database schemes and any changes and differences between schemes and actual configuration will be detected by a script and will ask user to migrate the configuration to new format and update it with proper values.
@keyvaann
Copy link
Collaborator Author

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
Copy link
Collaborator Author

keyvaann commented Apr 20, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant