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. 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
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. Used as chart name, namespace, Platform CR name, and service account name. Must be lowercase kebab-case starting with a letter.
Tenant string
Owning team. Drives the namespace prefix (tenants-<team>), ArgoCD AppProject, and per-tenant resource quotas. 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 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.
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).

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

  • 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.