Production deployment uses the same Helm chart as local development, configured for external managed services, real OAuth authentication, TLS ingress, and a container registry for agent images.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/jonwiggins/optio/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
- A Kubernetes cluster (EKS, GKE, AKS, or any conformant cluster)
- Helm 3+ (
helm version) - A managed PostgreSQL instance (e.g. RDS, Cloud SQL, Supabase, Neon)
- A managed Redis instance (e.g. ElastiCache, Upstash, Redis Cloud)
- A container registry for agent images (e.g. GHCR, ECR, Docker Hub)
- At least one OAuth provider (GitHub, Google, or GitLab) with a registered application
metrics-serverinstalled in the cluster- A domain name with DNS pointing to your cluster’s load balancer
Deployment
Generate an encryption key
Optio encrypts all secrets at rest with AES-256-GCM. Generate a key and keep it somewhere safe — if you lose it, stored secrets (API keys, OAuth tokens) cannot be decrypted.Store the output. You will pass it as
--set encryption.key=<value> during install.Push agent images to your registry
Build and push the agent image presets to a registry your cluster can pull from:Set
agent.imagePullPolicy to IfNotPresent or Always (not Never) so Kubernetes can pull from the registry.Configure an OAuth provider
Register an OAuth application with at least one provider. Optio supports GitHub, Google, and GitLab.GitHub — go to Settings → Developer settings → OAuth Apps → New OAuth App:
- Homepage URL:
https://optio.example.com - Authorization callback URL:
https://optio.example.com/api/auth/github/callback
The callback URL must match
API_PUBLIC_URL exactly, including the /api/auth/<provider>/callback path. If these do not match, OAuth login will fail with a redirect URI mismatch error.Install the Helm chart
Set the GitHub token secret
Optio needs a GitHub token for PR watching, issue sync, and repository detection. After the API pod is running, add it via the web UI (Settings → Secrets) or directly:The
GITHUB_TOKEN secret requires repo scope for private repositories and public_repo for public ones.Production checklist
Review each item before going live:| # | Item | Notes |
|---|---|---|
| 1 | Encryption key generated | openssl rand -hex 32; store it securely |
| 2 | OAuth provider configured | At least one of GitHub, Google, or GitLab |
| 3 | Auth bypass disabled | auth.disabled must be false or unset |
| 4 | External PostgreSQL | postgresql.enabled=false + externalDatabase.url |
| 5 | External Redis | redis.enabled=false + externalRedis.url |
| 6 | Public URLs set | API_PUBLIC_URL and WEB_PUBLIC_URL match your domain |
| 7 | Ingress with TLS | ingress.enabled=true with cert-manager or manual TLS |
| 8 | Agent image in registry | agent.imagePullPolicy=IfNotPresent or Always |
| 9 | GitHub token secret set | Required for PR watching, issue sync, repo detection |
| 10 | Resource limits tuned | Adjust api.resources and agent PVC size for your workload |
| 11 | metrics-server installed | Required for resource usage display in the cluster view |
TLS with cert-manager
If cert-manager is installed in your cluster, enable automatic certificate provisioning:ingress.tls field directly in a values file:
RBAC requirements
The Helm chart creates a
ServiceAccount and Role for the API server automatically. The API server needs these permissions to manage agent pods:pods: get, list, watch, create, deletepods/exec: create (for running agents in pods)pods/log: getsecrets: get, list, create, update, deletepersistentvolumeclaims: get, list, create, deleteservices: get, list, create, deleteevents: get, list, watch
ClusterRole covers read access to nodes, namespaces, and metrics for the cluster health view. Do not remove or restrict these permissions — the API server will fail to provision agent pods.Updating
To apply new configuration changes or upgrade to a newer version:Troubleshooting
OAuth login fails with redirect URI mismatch
OAuth login fails with redirect URI mismatch
- Verify that the callback URL registered with the OAuth provider exactly matches
{API_PUBLIC_URL}/api/auth/<provider>/callback - Set
API_PUBLIC_URLexplicitly in your Helm values if it is not being inferred correctly - Check for trailing slashes or
httpvshttpsmismatches
Agent pods fail to start (ImagePullBackOff)
Agent pods fail to start (ImagePullBackOff)
- Confirm the agent image is pushed to your registry and the tag is correct
- Check that
imagePullSecretsis configured if your registry requires authentication - Verify
agent.imagePullPolicyisIfNotPresentorAlways(notNever)
API pod fails to connect to the database
API pod fails to connect to the database
- Confirm
externalDatabase.urlis formatted correctly:postgres://user:pass@host:5432/dbname - Test connectivity from within the cluster:
kubectl run -it --rm debug --image=postgres:16 --restart=Never -n optio -- psql "$DATABASE_URL" - Check that the database allows connections from the cluster’s IP range
Pod health events show OOM kills
Pod health events show OOM kills
- Increase resource limits for agent pods via the image preset or Helm values (
agent.pvc.size, API resource limits) - Check
pod_health_eventsvia the cluster view in the web UI for crash history - The cleanup worker automatically fails tasks on dead pods and recreates pods on the next task
