K8s App as Platform Tenant
Primary scaffolding for a nanohype-org k8s-native application. Produces a Helm chart with per-environment values, an ArgoCD ApplicationSet entry ready to register against nanohype/eks-gitops, and a Platform CR (platform.nanohype.dev/v1alpha1) plus its required BudgetPolicy (governance.nanohype.dev/v1alpha1) declaring the tenant boundary for the eks-agent-platform operator to reconcile. Use this for every k8s-native deliverable unless an explicit escape hatch (aws-lambda, fly, vercel, cloudflare) is justified.
| Name | k8s-app-tenant |
| Version | 0.1.0 |
| Category | infrastructure |
| License | Apache-2.0 |
| Persona | engineering |
| Tags | kubernetes, k8s, helm, argocd, platform, nanohype |
| Source | templates/k8s-app-tenant |
Render it
Three front doors, one catalog. Pick whichever suits the caller.
# CLI
npx @nanohype/sdk render k8s-app-tenant --out ./my-app
# SDK
import { LocalSource, renderTemplate } from "@nanohype/sdk";
const result = await renderTemplate(source, "k8s-app-tenant", variables);
# MCP — from an agent
get_template({ name: "k8s-app-tenant" })Prerequisites
| Tool | Version | Why |
|---|---|---|
helm | >=3.0 | Render and lint the chart locally before pushing |
kubectl | >=1.28 | Apply the Platform CR during initial tenant setup (before ArgoCD takes over via the ApplicationSet) |
kustomize | >=5.0 | Build per-env overlays consumed by the ApplicationSet entry |
Variables
Required
AppNamestring- Kebab-case app name. Used as chart name, namespace, Platform CR name, and service account name. Must be lowercase kebab-case starting with a letter.
Tenantstring- Owning team. Drives the namespace prefix (tenants-<team>), ArgoCD AppProject, and per-tenant resource quotas. Must be lowercase kebab-case.
Imagestring- Container image base (no tag — tag pinned per-env in values-{env}.yaml).
Optional
AppMetricstring — defaults to${AppName}- Metric-name prefix for the RED/SLO panels and burn-rate rules — the service name with dashes converted to underscores (e.g. competitive_intelligence). The app emits <prefix>_requests_total / _errors_total / _request_duration_seconds. Defaults to AppName, so single-word names need nothing; multi-word names must set the underscored form.
Descriptionstring — defaults tok8s-native Platform tenant- Short app description for Chart.yaml and README.
Personastring — defaults togeneric- Platform persona — drives default guardrails, dashboards, and fleet shape. One of: sales-ops, support, finance, ops, founder, eng, marketing, legal, generic.
MonthlyUsdstring — defaults to2500- Soft monthly Bedrock spend cap (USD) for the BudgetPolicy. Kill-switch fires at 120%.
Portstring — defaults to8080- Container port the app listens on.
GitopsRepostring — defaults tonanohype/eks-gitops- Target gitops repo for the ApplicationSet entry.
SyncWavestring — defaults to100- ArgoCD sync wave for this app's ApplicationSet entry. Apps typically deploy after addons (wave >= 100).
What it produces
25 files. Placeholder names such as __APP_NAME__ are what the renderer substitutes into.
.gitignore
chart/Chart.yaml
chart/charts/tenant-chart-base/Chart.yaml
chart/charts/tenant-chart-base/templates/_grafana-dashboard.tpl
chart/charts/tenant-chart-base/templates/_helpers.tpl
chart/charts/tenant-chart-base/templates/_networkpolicy.tpl
chart/charts/tenant-chart-base/templates/_prometheusrule.tpl
chart/charts/tenant-chart-base/templates/_serviceaccount.tpl
chart/charts/tenant-chart-base/templates/_servicemonitor.tpl
chart/dashboards/__APP_NAME__.json
chart/templates/deployment.yaml
chart/templates/externalsecret.yaml
chart/templates/grafana-dashboard.yaml
chart/templates/networkpolicy.yaml
chart/templates/prometheusrule.yaml
chart/templates/service.yaml
chart/templates/serviceaccount.yaml
chart/templates/servicemonitor.yaml
chart/values-development.yaml
chart/values-production.yaml
chart/values-staging.yaml
chart/values.yaml
gitops/applicationset-entry.yaml
platform.yaml
README.mdComposes with
- Pairs with
ts-service - Pairs with
go-service - Pairs with
next-app - Pairs with
mcp-server-ts - Pairs with
mcp-server-python - Pairs with
agentic-loop - Nests inside
monorepo
Composites that use it
- Platform Tenant — One-shot scaffolder for a k8s-native nanohype Platform tenant: the k8s-app-tenant chart (which vendors tenant-chart-base and ships per-env values, an ArgoCD ApplicationSet entry, and the Platform + BudgetPolicy CRs) plus the optional AI building blocks as local packages — the LLM gateway and the vector store.