-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Establish an OpenAPI Schema values.schema.json
with "additionalProperties": false
#2157
Comments
values.schema.json
with "additionalProperties": false
values.schema.json
with "additionalProperties": falsevalues.schema.json
with "additionalProperties": false
IMHO helm schema is cool but it's also very time consuming. And I think this is the reason why the adoption of helm schema is very low in the community. There was a nice plugin in the past to generate a (baseline) schema from Any (other) opinions from the maintainers here? @jmeridth @mbevc1 @pdrastil @yu-croco ? |
@mkilchhofer In my experience this is hard to maintain without any auto-generation tooling. Also if the schema is strict, it's problematic to create umbrella charts that will not allow extension sections as the validation will complain about this. |
I would say, there is not really an alternative for the schema when it comes to production readiness. According the strictness: it's (dis-) enableable for each section. |
@mkilchhofer thanks for the tool, I also thought: "there must be a tool or sth". 😃 Even though it is archived |
Agree and nothing more to add to what @mkilchhofer and @pdrastil have alreayd said 😄 |
This could be also helpful: https://davidgarcia.dev/posts/how-to-split-open-api-spec-into-multiple-files/ |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This would be tremendous for using with tools like |
Would be great to look into this again. During kubecon 2024 it was also highlighted multiple times, that one of the issues with developer UX in k8s, is a lack of YAML validation tooling, and often you only realise that something was intended wrongly (but still resulted in valid YAML), when you deploy it. Taking a quick look around, there are still a few tools around that enable easy generation form values.yaml like losisin/helm-values-json-schema which is a helm plugin, but looks kind of like a one man show, and also SocialGouv/helm-schema which is node based, and developed by the french government. |
Hey, could you take a look into this again? We are working on a tool that renders UIs for helm charts based on their schema and would also love to support the ArgoCD charts. I found another tool for generating helm chart schema: https://github.com/dadav/helm-schema. Cerbos and Grafana K6 use it to generate their schema for values file. This would solve issues like the one mentioned above, like dev experience, but it wouldn't require you to do it manually. Let me know what you think. Thanks! |
Is your feature request related to a problem?
I always get frustrated when I update my Argo CD Helm Chart dependency and some values silently stop working.
Related helm chart
argo-cd, argo-events, argo-rollouts, argo-workflows, argocd-image-updater, argocd-apps, other
Describe the solution you'd like
For each Helm chart, create a matching
values.schema.json
file with strict rules and no additional properties allowed. There are also property patterns when values on parts need to be flexible.Here is an example that could also serve as a starting point:
Describe alternatives you've considered
There are no alternatives as far as I know.
Additional context
For publicly available Helm charts, it's generally good to have a very strict OpenAPI schema (values.schema.json). It's only optional from Helm, but it's extremely useful for Helm charts that are used by many people and have multiple releases. If ANYTHING is wrong in the user's
values.yaml
file, they'll immediately get an accurate error message.The text was updated successfully, but these errors were encountered: