Server Configuration
The server (cmd/server) accepts configuration via environment variables or Vault-injected secrets.
Always Required
PostgreSQL connection string.For production, enable SSL:
Required in Production
These can be skipped whenDEV_MODE=true for local development.
Google OAuth2 client ID from Google Cloud Console.
Google OAuth2 client secret.
OAuth callback URL. Must match the authorized redirect URI in Google Cloud Console.
Server Settings
Enable local development mode. Disables OAuth and auto-logs in as
dev@localhost.Serve embedded React SPA from Set to
go:embed.false if serving the frontend separately (e.g., via CDN or Vite dev server).HTTP server listen address.
Public URL of the application. Used for OAuth redirects and email links.
Base domain for user deployment ingresses.User deployments get subdomains like:
Enable Kubernetes integration (create UserDeployment CRs).Set to
false for local development without a K8s cluster.Namespace pattern for user sandboxes. Examples:
%s is replaced with user ID.- User
user-123→ namespacesandbox-user-123 - User
alice→ namespacesandbox-alice
Interval for reconciling deployment status from Kubernetes.
Session Configuration
Session storage backend. Options:
memory, postgres, redis.memory
In-memory storage (lost on restart).Use for: Local developmentDon’t use: Production
postgres
PostgreSQL-backed sessions.Use for: Production (shared database)Requires:
DATABASE_DSNredis
Redis-backed sessions.Use for: Production (separate cache)Requires:
REDIS_ADDRSession lifetime before automatic expiration.Supports:
1h, 24h, 168h (7 days), etc.Cookie name for session identifier.
Session lifetime before expiration.
Interval for cleaning up expired sessions (memory and PostgreSQL backends only).
Cookie domain for session cookies. Useful for subdomain sharing.
Cookie name for OAuth state parameter.
Require HTTPS for cookies. Enable in production.
Redis server address. Required when
SESSION_BACKEND=redis.Secrets Backend
k8s-scheduler supports three secrets backends for user/template/deployment secrets:Secrets storage backend. Options:
database, vault, aws.database
Encrypted secrets in PostgreSQL.Requires:
SECRETS_ENCRYPTION_KEYUse for: Simple deploymentsvault
HashiCorp Vault KV v2.Requires:
VAULT_ADDR, VAULT_TOKENUse for: Production (recommended)aws
AWS Secrets Manager.Requires:
AWS_REGION, IAM roleUse for: AWS-native deploymentsDatabase Backend
Base64-encoded 32-byte encryption key. Required when
SECRETS_BACKEND=database.Vault Backend
Vault server address.
Vault access token.
Path to Vault token file (for Vault Agent auto-refresh).Preferred over
VAULT_TOKEN in production.Vault KV mount path.
AWS Backend
AWS region for Secrets Manager.
AWS credentials are auto-discovered from:
- Instance metadata (IAM role)
- Environment variables (
AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY) ~/.aws/credentials
Optional Integrations
Billing (Stripe)
Enable Stripe billing integration.
Stripe secret key (
sk_test_... or sk_live_...).Stripe webhook signing secret (Used to verify webhook payloads from Stripe.
whsec_...).Email (Invitations)
Email provider. Options:
smtp, sendgrid.SMTP server hostname.
SMTP server port.
SMTP authentication username.
SMTP authentication password.
SendGrid API key. Required when
EMAIL_PROVIDER=sendgrid.AI (Template Generation)
Anthropic API key for AI-assisted template generation.Optional. Enables AI template generation feature in the UI.
Operator Configuration
The operator (cmd/operator) manages UserDeployment custom resources.
Environment Variables
Base domain for ingress routing.Must match the server’s
DEPLOYMENT_DOMAIN.ClusterSecretStore name for External Secrets Operator.If empty, the operator skips creating ExternalSecret resources.
Skip NetworkPolicy creation (for local development).Useful for clusters without NetworkPolicy support (e.g., kind without Calico).
Namespace to watch for UserDeployments. Empty = all namespaces.
Configuration Examples
Production (Vault + PostgreSQL)
.env
Local Development
.env
AWS Deployment (No Vault)
.env
ConfigMap (Helm)
When deploying via Helm, non-secret configuration is stored in a ConfigMap:charts/k8s-scheduler/templates/configmap-server.yaml
Next Steps
Deployment Guide
Deploy k8s-scheduler to production
Dependencies
Learn about platform dependencies