Skip to content

Add JSON schema validation for values.yaml#24

Merged
kervel merged 2 commits intomainfrom
feature/values-schema
Feb 25, 2026
Merged

Add JSON schema validation for values.yaml#24
kervel merged 2 commits intomainfrom
feature/values-schema

Conversation

@kervel
Copy link
Copy Markdown
Contributor

@kervel kervel commented Feb 25, 2026

Summary

  • Adds values.schema.json to catch typos in Helm values at install/upgrade/lint/template time
  • Uses additionalProperties: false on chart-owned structures (persistence, image, service, client, ingress, tls, etc.) where typos are dangerous
  • Leaves pass-through objects open (config, resources, podSecurityContext, probes, annotations, etc.) for user flexibility
  • Motivated by a real bug where storageClass instead of storageClassName silently created a PVC with the wrong storage class

Test plan

  • helm lint headscale/ passes with default values
  • helm template headscale headscale/ renders successfully
  • helm template --set persistence.storageClass=local-path fails (catches the typo)
  • helm template --set persistence.storageClassName=local-path passes (correct key works)
  • helm template --set bogusTopLevel=true fails (catches unknown top-level keys)

🤖 Generated with Claude Code

kervel and others added 2 commits February 25, 2026 19:07
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>
@kervel kervel merged commit a257a47 into main Feb 25, 2026
1 check passed
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

Successfully merging this pull request may close these issues.

1 participant