Server Configuration
The server (cmd/server) accepts configuration via environment variables or Vault-injected secrets.
Always Required
string
required
PostgreSQL connection string.For production, enable SSL:
Required in Production
These can be skipped whenDEV_MODE=true for local development.
string
required
Google OAuth2 client ID from Google Cloud Console.
string
required
Google OAuth2 client secret.
string
required
OAuth callback URL. Must match the authorized redirect URI in Google Cloud Console.
Server Settings
boolean
default:"false"
Enable local development mode. Disables OAuth and auto-logs in as
dev@localhost.boolean
default:"false"
Serve embedded React SPA from Set to
go:embed.false if serving the frontend separately (e.g., via CDN or Vite dev server).string
default:":8081"
HTTP server listen address.
string
default:"http://localhost:8081"
Public URL of the application. Used for OAuth redirects and email links.
string
default:"example.com"
Base domain for user deployment ingresses.User deployments get subdomains like:
boolean
default:"false"
Enable Kubernetes integration (create UserDeployment CRs).Set to
false for local development without a K8s cluster.string
default:"sandbox-%s"
Namespace pattern for user sandboxes. Examples:
%s is replaced with user ID.- User
user-123→ namespacesandbox-user-123 - User
alice→ namespacesandbox-alice
duration
default:"30s"
Interval for reconciling deployment status from Kubernetes.
Session Configuration
string
default:"memory"
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_ADDRduration
default:"24h"
Session lifetime before automatic expiration.Supports:
1h, 24h, 168h (7 days), etc.string
default:"session_id"
Cookie name for session identifier.
duration
default:"24h"
Session lifetime before expiration.
duration
default:"1h"
Interval for cleaning up expired sessions (memory and PostgreSQL backends only).
string
Cookie domain for session cookies. Useful for subdomain sharing.
string
default:"oauth_state"
Cookie name for OAuth state parameter.
boolean
default:"false"
Require HTTPS for cookies. Enable in production.
string
Redis server address. Required when
SESSION_BACKEND=redis.Secrets Backend
k8s-scheduler supports three secrets backends for user/template/deployment secrets:string
default:"database"
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
string
Base64-encoded 32-byte encryption key. Required when
SECRETS_BACKEND=database.Vault Backend
string
Vault server address.
string
Vault access token.
string
Path to Vault token file (for Vault Agent auto-refresh).Preferred over
VAULT_TOKEN in production.string
default:"secret"
Vault KV mount path.
AWS Backend
string
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)
boolean
default:"false"
Enable Stripe billing integration.
string
Stripe secret key (
sk_test_... or sk_live_...).string
Stripe webhook signing secret (Used to verify webhook payloads from Stripe.
whsec_...).Email (Invitations)
string
Email provider. Options:
smtp, sendgrid.string
SMTP server hostname.
string
default:"587"
SMTP server port.
string
SMTP authentication username.
string
SMTP authentication password.
string
SendGrid API key. Required when
EMAIL_PROVIDER=sendgrid.AI (Template Generation)
string
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
string
required
Base domain for ingress routing.Must match the server’s
DEPLOYMENT_DOMAIN.string
ClusterSecretStore name for External Secrets Operator.If empty, the operator skips creating ExternalSecret resources.
boolean
default:"false"
Skip NetworkPolicy creation (for local development).Useful for clusters without NetworkPolicy support (e.g., kind without Calico).
string
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