Configuration is loaded via Viper at startup. Environment variables take precedence over config files.
| Variable | Default | Description |
|---|
KUBEGLASS_PORT | 8090 | HTTP listen port |
KUBEGLASS_ENVIRONMENT | development | development or production. Controls logging format, CSP strictness |
KUBEGLASS_DATA_DIR | ~/.kubeglass/data | Directory for BoltDB, admin settings, snapshots |
KUBEGLASS_DRAIN_TIMEOUT | 25s | Graceful shutdown drain budget (keep under K8s terminationGracePeriodSeconds) |
| Variable | Default | Description |
|---|
KUBEGLASS_AUTH_MODE | local | Authentication mode: local, oidc, or impersonation |
KUBEGLASS_SESSION_SECRET | - | HMAC-SHA256 secret for session cookies. Min 32 bytes, 64 recommended. Required for non-local auth |
KUBEGLASS_SESSION_MAX_AGE | 8h | Session cookie TTL |
KUBEGLASS_OIDC_ISSUER_URL | - | OIDC provider URL (required for oidc mode) |
KUBEGLASS_OIDC_CLIENT_ID | - | OIDC client ID |
KUBEGLASS_OIDC_CLIENT_SECRET | - | OIDC client secret |
KUBEGLASS_TRUSTED_PROXIES | - | CIDR list of trusted reverse proxies (for impersonation mode) |
| Variable | Default | Description |
|---|
KUBEGLASS_TLS_ENABLED | false | Enable TLS termination |
KUBEGLASS_TLS_CERT_FILE | - | Path to TLS certificate |
KUBEGLASS_TLS_KEY_FILE | - | Path to TLS private key |
| Variable | Default | Description |
|---|
KUBEGLASS_RATE_LIMIT | 100 | Requests per second per IP |
KUBEGLASS_RATE_BURST | 200 | Burst capacity per IP |
| Variable | Default | Max | Description |
|---|
KUBEGLASS_DEFAULT_PAGE_LIMIT | 100 | - | Default items per page |
KUBEGLASS_MAX_PAGE_LIMIT | 1000 | - | Maximum items per page |
| Variable | Default | Description |
|---|
KUBEGLASS_MAX_REQUEST_BODY_SIZE | 1048576 (1 MiB) | Maximum request body size in bytes |
| Variable | Default | Description |
|---|
KUBEGLASS_DEMO_MODE | false | Run in demo mode with sample data |
| Flag | Description |
|---|
--demo | Start in demo mode |
--port | Override listen port |
These settings are editable from the UI and persisted to {DataDir}/admin-settings.json.
In local mode (kubeconfig), all settings are editable. In cluster mode, settings are
read-only unless KUBEGLASS_UI_CONFIGURABLE explicitly unlocks specific keys.
AdminSettings uses pointer fields to distinguish “not set” (nil) from zero values. When applying,
non-nil values overlay the base AppConfig.