Helm
The Helm lexicon generates production-quality, parameterized Helm charts from typed TypeScript.
Unlike static manifest generators, the Helm lexicon produces real {{ .Values.x }} directives, values.yaml, values.schema.json, conditional resources, Helm hooks, and standard _helpers.tpl.
Install it with:
npm install --save-dev @intentius/chant-lexicon-helm @intentius/chant-lexicon-k8sQuick Start
Section titled “Quick Start”import { Chart, Values } from "@intentius/chant-lexicon-helm";import { values, include, printf, toYaml } from "@intentius/chant-lexicon-helm";import { Deployment, Service } from "@intentius/chant-lexicon-k8s";
export const chart = new Chart({ apiVersion: "v2", name: "my-app", version: "0.1.0", type: "application",});
export const valuesSchema = new Values({ replicaCount: 1, image: { repository: "nginx", tag: "", pullPolicy: "IfNotPresent" }, service: { type: "ClusterIP", port: 80 },});
export const deployment = new Deployment({ metadata: { name: include("my-app.fullname"), labels: include("my-app.labels"), }, spec: { replicas: values.replicaCount, template: { spec: { containers: [{ name: "my-app", image: printf("%s:%s", values.image.repository, values.image.tag), ports: [{ containerPort: values.service.port, name: "http" }], resources: toYaml(values.resources), }], }, }, },});Build the chart:
chant buildhelm lint dist/helm template test dist/At a Glance
Section titled “At a Glance”| Metric | Count |
|---|---|
| Resources | 5 |
| Property types | 3 |
| Services | 5 |
| Intrinsic functions | 7 |
| Pseudo-parameters | 0 |
| Lint rules | 25 |
Lexicon version: 0.1.4
Namespace: Helm
- Getting Started
- Intrinsics Reference
- Composites
- Lint Rules
- Security
- Best Practices
- AI Skills
- Intrinsic Functions — 7 built-in functions
- Lint Rules — 25 rules
- Serialization — output format details