Repository navigation
Quick Start
Franklin García edited this page Sep 6, 2026
·
15 revisions
This guide creates and validates a small typed Helm chart without relying on raw YAML.
- Node.js
^22.22.2,^24.15.0, or>=26.0.0. - pnpm 9 or later.
- Helm 3 when you want to lint or render the generated chart.
mkdir timonel-demo
cd timonel-demo
pnpm init
pnpm add timonel cdk8s cdk8s-plus-33 constructs
pnpm add -D typescript tsx @types/nodeSet your package to ESM:
{
"type": "module"
}import * as kplus from 'cdk8s-plus-33';
import { Rutter } from 'timonel';
const chart = new Rutter({
meta: {
name: 'demo',
version: '1.0.0',
description: 'My first Timonel chart',
},
defaultValues: {
environment: 'development',
},
envValues: {
production: {
environment: 'production',
},
},
});
const deployment = new kplus.Deployment(chart.getChart(), 'Web', {
metadata: { name: 'demo-web' },
containers: [
{
name: 'web',
image: 'nginx:1.27',
portNumber: 80,
resources: {
cpu: { request: kplus.Cpu.millis(100) },
},
},
],
});
deployment.exposeViaService();
new kplus.ConfigMap(chart.getChart(), 'Config', {
metadata: { name: 'demo-config' },
data: { owner: 'platform-team' },
});
new kplus.HorizontalPodAutoscaler(chart.getChart(), 'WebHpa', {
target: deployment,
minReplicas: 1,
maxReplicas: 5,
});
await chart.write('./dist/demo');Run it:
pnpm exec tsx chart.tsdist/demo/
├── Chart.yaml
├── values.yaml
├── values-production.yaml
├── .helmignore
└── templates/
├── _helpers.tpl
├── Web.yaml
├── Config.yaml
└── WebHpa.yaml
The exact set of generated resource filenames follows the logical construct IDs synthesized by cdk8s.
helm lint ./dist/demo
helm template demo ./dist/demo
helm template demo ./dist/demo -f ./dist/demo/values-production.yamlIf a resource has no suitable upstream construct, object-form addManifest() is the supported
fallback:
chart.addManifest(
{
apiVersion: 'example.io/v1',
kind: 'Widget',
metadata: { name: 'demo-widget' },
spec: { size: 'small' },
},
'Widget',
);Do not use the raw YAML overload for new code unless there is no practical typed alternative.
The CLI can scaffold a project:
pnpm exec tl init demo
pnpm exec tl synth demo demo/distThe CLI is a convenience layer. For application code, the library API shown above is the preferred starting point.
Timonel documentation · Repository · npm · Issues