Tenant Chart Base (Helm library)
A Helm library chart (type: library) that defines the named templates every nanohype Platform-tenant chart shares — the ServiceAccount (IRSA), NetworkPolicy (egress baseline + values-driven ingress), PrometheusRule, Grafana dashboard ConfigMap, and the name/label/selector helpers. Consumer charts vendor it under chart/charts/tenant-chart-base, declare it as a file:// dependency, and replace their copy-pasted templates with one-line `{{ include "tenant-chart-base.*" . }}` wrappers. The named templates run in the consumer's context, so `.Chart`, `.Values`, and `.Release` resolve to the consuming app. Workload topology (Deployments, CronJobs, Services) and the per-tenant ExternalSecret stay in the consumer — those are the legitimate per-app divergences. The catalog's first library chart.
| Name | tenant-chart-base |
| Version | 0.1.0 |
| Category | infrastructure |
| License | Apache-2.0 |
| Persona | engineering |
| Tags | kubernetes, k8s, helm, library, platform, nanohype |
| Source | templates/tenant-chart-base |
Render it
Three front doors, one catalog. Pick whichever suits the caller.
# CLI
npx @nanohype/sdk render tenant-chart-base --out ./my-app
# SDK
import { LocalSource, renderTemplate } from "@nanohype/sdk";
const result = await renderTemplate(source, "tenant-chart-base", variables);
# MCP — from an agent
get_template({ name: "tenant-chart-base" })Prerequisites
| Tool | Version | Why |
|---|---|---|
helm | >=3.0 | Render + lint a consumer chart that depends on this library |
Variables
This template takes no variables — it renders the same output every time.
What it produces
7 files. Placeholder names such as __APP_NAME__ are what the renderer substitutes into.
chart/Chart.yaml
chart/templates/_grafana-dashboard.tpl
chart/templates/_helpers.tpl
chart/templates/_networkpolicy.tpl
chart/templates/_prometheusrule.tpl
chart/templates/_serviceaccount.tpl
chart/templates/_servicemonitor.tplComposes with
- Pairs with
k8s-app-tenant - Nests inside
monorepo