Skip to main content

Loading Helm Chart

Kosko supports loading manifests from Helm charts. You have to install the Helm CLI before using this package.

@kosko/helm uses the helm template command to render Helm chart templates. Most options of helm template command are supported. See API documentation for available options.

Under the hood, @kosko/helm uses @kosko/yaml to load YAML, which means the loadChart function supports all options of the loadString function. See loading Kubernetes YAML for more details.

Install

npm install @kosko/helm @kosko/yaml

Load from a Local Chart

import { loadChart } from "@kosko/helm";

loadChart({
chart: "./nginx"
});

Load from a Repository

import { loadChart } from "@kosko/helm";

loadChart({
chart: "prometheus",
repo: "https://prometheus-community.github.io/helm-charts",
version: "13.6.0"
});

Specify Release Name

import { loadChart } from "@kosko/helm";

loadChart({
chart: "./nginx",
name: "http-server"
});

Specify Values

import { loadChart } from "@kosko/helm";

loadChart({
chart: "./nginx",
values: {
replicaCount: 5
}
});

Include CRDs

import { loadChart } from "@kosko/helm";

loadChart({
chart: "traefik",
repo: "https://helm.traefik.io/traefik",
includeCrds: true
});