| title | Kubernetes |
|---|---|
| description | Deploy Forge agents to Kubernetes with generated manifests and NetworkPolicy. |
| order | 2 |
Every forge build generates container-ready artifacts:
| Artifact | Purpose |
|---|---|
guardrails.json |
Guardrail policy config (copied from project root if present) |
Dockerfile |
Container image with minimal attack surface |
deployment.yaml |
Kubernetes Deployment manifest |
service.yaml |
Kubernetes Service manifest |
secrets.yaml |
Kubernetes Secret with one empty entry per required env var |
network-policy.yaml |
NetworkPolicy restricting pod egress to allowed domains |
egress_allowlist.json |
Machine-readable domain allowlist |
checksums.json |
SHA-256 checksums + Ed25519 signature |
deployment.yaml wires each required env var to a secretKeyRef against the agent's <agent_id>-secrets Secret. The required set is the union of:
- Skill env vars —
metadata.forge.requires.env.requiredfrom everySKILL.md. - Channel env vars — every
_env-suffixed setting in each<channel>-config.yamlreferenced bychannels:inforge.yaml. For example,bot_token_env: SLACK_BOT_TOKENinslack-config.yamladdsSLACK_BOT_TOKENto the required set.
The same canonical source feeds docker-compose.yaml when forge package --with-channels is used, so the two output paths produce a consistent set.
Adding a new channel env var requires zero edits to the build pipeline — append a new _env-suffixed setting to the channel YAML and the next forge build picks it up. To wire the secret values into the cluster, populate secrets.yaml (or replace it with a sealed-secret / ExternalSecret) before applying.
# slack-config.yaml — operator adds a per-project override
adapter: slack
settings:
app_token_env: SLACK_APP_TOKEN
bot_token_env: SLACK_BOT_TOKEN
custom_env: MY_PROJECT_SLACK_OVERRIDE # ← appears in secrets.yaml + deployment.yamlA channel listed in forge.yaml whose <channel>-config.yaml is missing produces a build warning, not an error — the manifest is generated without that channel's env vars.
Forge can run entirely offline with local models:
- Use
ollamaas the LLM provider with a locally-hosted model - Set egress mode to
deny-allto block all outbound traffic - Pre-install all binary dependencies in the container image
- Use environment variables for secrets (no passphrase prompting needed)
model:
provider: ollama
name: llama3
egress:
mode: deny-all