Skip to content

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.

Namek8s-app-tenant
Version0.1.0
Categoryinfrastructure
LicenseApache-2.0
Personaengineering
Tagskubernetes, k8s, helm, argocd, platform, nanohype, model-gateway
Sourcetemplates/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

ToolVersionWhy
helm>=3.0Render and lint the chart locally before pushing
kubectl>=1.28Apply the Platform CR during initial tenant setup (before ArgoCD takes over via the ApplicationSet)
kustomize>=5.0Build per-env overlays consumed by the ApplicationSet entry

Variables

Required

AppName string
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.
Tenant string
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.
Image string
Container image base (no tag — tag pinned per-env in values-{env}.yaml).

Optional

AppMetric string — 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.
Description string — defaults to k8s-native Platform tenant
Short app description for Chart.yaml and README.
Persona string — defaults to generic
Platform persona — drives default guardrails, dashboards, and fleet shape. One of: sales-ops, support, finance, ops, founder, eng, marketing, legal, generic.
MonthlyUsd string — defaults to 2500
Soft monthly Bedrock spend cap (USD) for the BudgetPolicy. Kill-switch fires at 120%.
Port string — defaults to 8080
Container port the app listens on.
GitopsRepo string — defaults to nanohype/eks-gitops
Target gitops repo for the ApplicationSet entry.
SyncWave string — defaults to 100
ArgoCD sync wave for this app's ApplicationSet entry. Apps typically deploy after addons (wave >= 100).
IncludeEmbeddingRoute bool — defaults to false
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.md

Composes with

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.