grafana / helm-charts

Apache License 2.0
1.61k stars 2.24k forks source link

Add values.schema.json to Grafana Helm charts #2605

Open luolong opened 1 year ago

luolong commented 1 year ago

This will allow various IDE's to provide intellisense when authoring Grafana chart values.

Danta1st commented 2 weeks ago

This would be a very welcomed addition from my perspective.

Is there any tooling we could use to generate these as part of ci and perhaps push them to schemastore.org, or similar? I wouldn't mind doing some of the required work if there's any suggestions.

ChristianCiach commented 1 week ago

There is https://github.com/losisin/helm-values-schema-json and the README mentions ways of automation. But the generated schema leaves a lot to be desired:

It is probably impossible to reliably generate a schema for a given values.yaml. These schemas should probably be authored manually.

Edit: Fixed link, sorry!

ChristianCiach commented 1 week ago

https://github.com/dadav/helm-schema works very nicely and also adds dependency charts to the schema. I just tested it with the grafana-oncall chart and the resulting schema is very usable.

Also, this tool can be nicely integrated into github-actions, as seen in https://github.com/kubernetes/ingress-nginx/pull/11295