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, with a ModelGateway (agents.nanohype.dev/v1alpha1) the app reaches a model through, so the chart carries no model credential. 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, model-gateway |
| 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 of at most 55 characters. Used as chart name, Platform CR name, and the name of the Platform's namespace tenants-<AppName> and gateway Service <AppName>-gateway. Must be lowercase kebab-case of at most 55 characters, so <AppName>-gateway and tenants-<AppName> are DNS labels.
Tenantstring- Owning team: the tenants-<team> namespace the Platform, BudgetPolicy and ModelGateway CRs are applied in, the Platform's spec.tenant, and the team label on the chart's resources and telemetry. 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 the Grafana dashboard's RED and SLO panels read — 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. The PrometheusRule derives the same prefix from the chart name.
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).
IncludeEmbeddingRoutebool — defaults tofalse- Add the embeddings route (Titan Text Embeddings v2) to the ModelGateway, and amazon-titan to the Platform allowed model families, for an app that embeds through the gateway
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
- Agent Team — Multi-agent system with a central orchestrator, specialized agents for research and writing, an evaluation harness, and MCP tool server.
- AI Chatbot — Full-stack AI chatbot with agentic loop, HTTP service, authentication, evaluation harness, and a Platform tenant chart whose ModelGateway is the agent's model path..
- AI Platform — Full AI platform with HTTP service, LLM gateway, vector store, data pipeline, auth, billing, monitoring, and a Platform tenant chart whose ModelGateway serves the gateway's and the pipeline's model routes.
- AI Web Application — Full-stack web application with Next.js frontend, RAG pipeline, authentication, database, and a Platform tenant chart whose ModelGateway is the app's model path..
- Cost-Optimized AI Stack — Minimize LLM costs with intelligent routing, response caching, and cost monitoring.
- Document Intelligence — Document search and question-answering system with RAG pipeline, HTTP service, file storage, database, and a Platform tenant chart whose ModelGateway serves the pipeline's generation and embeddings routes..
- Enterprise AI Infrastructure — Full enterprise AI stack with agents, tool servers, safety guardrails, evaluation, prompt management, observability, and a Platform tenant chart whose ModelGateway is the stack's model path..
- Multi-Agent System — Multi-agent architecture with A2A protocol peers, MCP tool servers, and an orchestrating agent.
- 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 and ModelGateway CRs) plus the optional AI building blocks as local packages — the LLM gateway and the vector store.
- Product Launch — Full product launch kit spanning engineering, design, QA, product, marketing, and operations.
- AI Proof of Concept — Minimal AI agent with evaluation harness and the Platform tenant chart whose ModelGateway is its model path.
- RAG-Powered Agent — AI agent that uses retrieval-augmented generation as a tool.
- Research to Prototype — Research-driven prototype pipeline.
- Safe AI Agent — AI agent with safety guardrails, evaluation harness, prompt management, and the Platform tenant chart whose ModelGateway is its model path.