leash
by simplyzee
Guardrails for AI agents on Kubernetes. Egress allowlists, scoped Vault credentials, model and MCP gateway, and a kill switch.
About this chart
Leash Helm chart
Guardrails for AI agents on Kubernetes. See the project README for what Leash does.
Install
helm install leash oci://ghcr.io/simplyzee/charts/leash \
--namespace leash-system --create-namespace
CRDs are in crds/: Helm installs them on first install but never upgrades or
deletes them. On upgrade, apply them yourself:
kubectl apply --server-side -f https://raw.githubusercontent.com/simplyzee/leash/v<version>/charts/leash/crds/
Common settings
controller:
networkBackend: auto # auto | cilium | kubernetes
vault: # AgentIdentity; Vault setup is in docs/vault.md
enabled: true
address: https://vault.vault.svc:8200
role: leash
extraEnv:
- name: VAULT_CACERT
value: /vault-ca/ca.crt
extraVolumes:
- name: vault-ca
configMap: {name: vault-ca}
extraVolumeMounts:
- name: vault-ca
mountPath: /vault-ca
gateway: # docs/gateway.md
enabled: true
config:
providers:
anthropic:
url: https://api.anthropic.com
auth:
header: x-api-key
valueFromEnv: ANTHROPIC_API_KEY
mcpServers:
github:
url: http://github-mcp.mcp.svc:8080/mcp
credentials:
existingSecret: leash-gateway-credentials # ANTHROPIC_API_KEY, SLACK_WEBHOOK_URL, ...
All options and their defaults are in values.yaml.
With release name leash, the gateway is
http://leash-gateway.<namespace>.svc.cluster.local:8080. Leash automatically
allows egress to it for every AgentPolicy that sets models or mcp.
The crds/ and files/controller-role.yaml files are generated: run
make chart-sync after changing the API or RBAC markers. CI fails if they
are out of date.
Deploy leash with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has leash on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartleash is pinned at v0.1.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply