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

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

Open
luolong opened this issue Aug 17, 2023 · 3 comments
Open

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

luolong opened this issue Aug 17, 2023 · 3 comments

Comments

@luolong
Copy link

luolong commented Aug 17, 2023

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

@Danta1st
Copy link

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

ChristianCiach commented Sep 20, 2024

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:

  • If the default-value for some attribute in values.yaml is null, the generated schema thinks that null is the only valid value for this attribute.
  • It doesn't handle chart-dependencies, and Grafana helm charts use tons of dependencies.

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

ChristianCiach commented Sep 23, 2024

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 kubernetes/ingress-nginx#11295

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

3 participants