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 HIP for outputting chart JSON schemas #200

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

remcohaszing
Copy link

Helm supports JSON schema validation to validate values.yaml. It would be nice if JSON schema validation is also possible by editors of values.yaml files. It would be nice if JSON schemas can be referenced by dependant Helm chart JSON schemas. Both will be possible if the JSON schemas are served on separate URLs.

It was requested in helm/helm#9920 (comment) to write a HIP.

@technosophos
Copy link
Member

As an alternative idea, would it be sufficient if helm show had a schema or values-scheme subcommand that emitted the schema?

hips/hip-9999.md Outdated Show resolved Hide resolved
Copy link
Member

@technosophos technosophos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do have to tell an OCI registries story for this feature as well. That's the main thing that would need to be addressed.

I left a comment already about perhaps considering this as a new subcommand to helm show. There are three reasons I currently prefer that:

  1. It is ultimately simpler to implement
  2. I don't see a clear way to make this work with OCI registries, which are being considered as the default chart serving mechanism for v4.
  3. We have had very bad luck getting package providers to upload .prov files, and I am suspicious that we would see the same thing here, which would reduce the usefulness. Further, it means that a repo that doesn't support this feature becomes a blocker for all of the users who would want this feature.

In contrast, using a local command would enable devs to generate this information as desired, while still allowing repo admins to choose to generate and serve schemata as static assets in a well-known location.

By outputting the JSON schema next to the packaged Helm chart, Helm determines the standard output location.
Chart publishers could copy their JSON schema manually, but this isn’t standardized in any way.
If Helm determines the standard output location of such files, chart publishers are likely to use this.
Helm already outputs an additional file for signed charts. This proposal is consistent with that behaviour.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This implies that chart publishers will publish schema files, but it does not explain how charts stored in OCI registries would make schemata available. While OCI is considered an experimental feature, because it is part of Helm's core we would need to introduce a solution for that registry as well as for a regular Helm chart repo.

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

Successfully merging this pull request may close these issues.

4 participants