0Pricing
Helm Academy · Lesson

Schema Validation with values.schema.json

Rejecting invalid values before rendering.

Schema Validation with values.schema.json is a free Helm Academy lesson on CoddyKit — lesson 4 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Helm Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.

Guard Your Values

Users can pass any values into your chart. A values.schema.json file lets you reject bad input before a single template renders. 🚧

It Is JSON Schema

The file follows the standard JSON Schema format. You describe the shape, types, and required fields your values must have.

Where It Lives

Place values.schema.json in the chart's root, right beside values.yaml. Helm picks it up automatically with no extra flags.

A Minimal Schema

Every schema starts with a type of object and a properties block describing each value your chart accepts.

{
  "type": "object",
  "properties": {}
}

Typing a Field

Inside properties you declare each field's type, such as integer for a replica count, so a string would be rejected.

"replicaCount": { "type": "integer" }

Marking Fields Required

The required array lists fields that must be present. Omit one and Helm refuses to render the chart.

"required": ["image"]

Constraining Values

You can add bounds like minimum so a replicaCount below one is caught immediately as invalid.

"replicaCount": { "type": "integer", "minimum": 1 }

Restricting to a Set

Use enum to allow only specific strings, such as a service type of ClusterIP, NodePort, or LoadBalancer.

"type": { "enum": ["ClusterIP", "NodePort"] }

When Validation Runs

Helm validates against the schema during install, upgrade, template, and lint, so bad values are blocked everywhere.

Clear Failure Messages

When values break the schema, Helm stops and prints exactly which field is invalid, making fixes quick and obvious.

Error: values don't meet the specifications of the schema(s)

Why It Matters

A schema turns silent misconfigurations into loud, early errors, protecting users of your chart from surprises in production.

Quick Check

You want a chart to reject an install when the image value is missing. What do you use?

Recap

You learned that values.schema.json validates user input with JSON Schema, using type, required, minimum, and enum to block bad values early. 🎉

Frequently asked questions

Is the “Schema Validation with values.schema.json” lesson free?

Yes — the full text of “Schema Validation with values.schema.json” is free to read here on the web, and the Helm Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Helm Academy course, upgrade to CoddyKit PRO.

What will I learn in “Schema Validation with values.schema.json”?

Rejecting invalid values before rendering. You practise Helm Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start Helm Academy?

No prior experience is required. Helm Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 4 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “Schema Validation with values.schema.json” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this Helm Academy lesson?

Yes. Every Helm Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

All lessons in this course

  1. Static Checks with helm lint
  2. Verifying Output with helm template
  3. Writing helm test Cases
  4. Schema Validation with values.schema.json
← Back to Helm Academy