Add JSON schema validation for values.yaml#24
Merged
Conversation
Prevents silent typos in Helm values (e.g. storageClass vs storageClassName) by validating at helm install/upgrade/lint/template time. Uses additionalProperties: false on chart-owned structures while leaving pass-through objects (config, resources, probes, etc.) open. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Runs helm lint and helm template on every PR to main, catching schema validation errors and template rendering issues early. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
values.schema.jsonto catch typos in Helm values at install/upgrade/lint/template timeadditionalProperties: falseon chart-owned structures (persistence, image, service, client, ingress, tls, etc.) where typos are dangerousconfig,resources,podSecurityContext, probes, annotations, etc.) for user flexibilitystorageClassinstead ofstorageClassNamesilently created a PVC with the wrong storage classTest plan
helm lint headscale/passes with default valueshelm template headscale headscale/renders successfullyhelm template --set persistence.storageClass=local-pathfails (catches the typo)helm template --set persistence.storageClassName=local-pathpasses (correct key works)helm template --set bogusTopLevel=truefails (catches unknown top-level keys)🤖 Generated with Claude Code