runtimesettings

package
v1.5.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 26, 2026 License: Apache-2.0 Imports: 27 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package runtimesettings holds the registry of operator-tunable settings and resolves each one as saved value, then env var, then registry default.

Index

Constants

View Source
const (
	SourceSaved   = "saved"
	SourceEnv     = "env"
	SourceDefault = "default"
)

Source says where an effective value came from.

View Source
const (
	KeyWebhookReplayProtection = "security.webhook_replay_protection"
	KeyWebhookReplayWindow     = "security.webhook_replay_window"
	KeyAuditSensitiveReads     = "security.audit_sensitive_reads"
	KeyBindBlockCredentialDirs = "security.bind_block_credential_dirs"
	KeyBindAllowedRoots        = "security.bind_allowed_roots"
	KeyTrustLoopbackForwarded  = "security.trust_loopback_forwarded_headers"
	KeyIngressDNS01AllHosts    = "ingress.dns01_all_hosts"
	KeyIngressCARetryBase      = "ingress.ca_switch_retry_base"
	KeyIngressCARetryMax       = "ingress.ca_switch_retry_max"
	KeyMetricsScrapeEnabled    = "observability.metrics_scrape_enabled"
	KeyHeartbeatJobAttempts    = "heartbeat.job_max_attempts"
	KeyHeartbeatJobBackoffBase = "heartbeat.job_backoff_base"
	KeyHeartbeatJobBackoffMax  = "heartbeat.job_backoff_max"
	KeyHeartbeatJobQueue       = "heartbeat.job_queue"
	KeyContainersRestartPolicy = "containers.restart_policy"
	KeyGameStatusTimeout       = "games.status_timeout"
	KeyGameStatusCache         = "games.status_cache"
	KeyRevokedTokenDays        = "retention.revoked_token_days" //nolint:gosec // setting key, not a credential
	KeyExpiredTokenDays        = "retention.expired_token_days" //nolint:gosec // setting key, not a credential
	KeyDesktopSessionTTL       = "desktop.session_ttl"
	KeyDomainsDNSWaitBudget    = "domains.dns_wait_budget"
	KeyDatabasesPoolerDefault  = "databases.pooler_default"
)

Registered setting keys.

View Source
const (
	KeyAbuseMaxRPS            = "abuse.max_rps"
	KeyAbuseMaxBurst          = "abuse.max_burst"
	KeyAbuseMaxDenyEntries    = "abuse.max_deny_entries"
	KeyAbuseMaxAgentEntries   = "abuse.max_agent_entries"
	KeyAbuseDefaultRPS        = "abuse.default_rps"
	KeyAbuseDefaultBurst      = "abuse.default_burst"
	KeyAbuseMaxTrackedClients = "abuse.max_tracked_clients"
	KeyAbuseShards            = "abuse.shards"
	KeyAbuseIdleEvict         = "abuse.idle_evict"
	KeyAbuseMaxRetryAfter     = "abuse.max_retry_after"
	KeyAbuseDryRunDefault     = "abuse.dryrun_default_window"
	KeyAbuseDryRunMax         = "abuse.dryrun_max_window"
	KeyAbuseDryRunTop         = "abuse.dryrun_top_clients"
	KeyAbuseSuggestShare      = "abuse.suggest_client_share"
	KeyAbuseSuggestBurstSecs  = "abuse.suggest_burst_seconds"
)

Registered keys for the per-app abuse defense limits.

View Source
const (
	KeyAccessSearchMaxWindow = "telemetry.access_search_max_window"
	KeyAccessSearchMaxRows   = "telemetry.access_search_max_rows"
	KeyAccessSearchMaxTerm   = "telemetry.access_search_max_term"
	KeyAccessSearchMaxScan   = "telemetry.access_search_max_scan"
	KeyAccessSearchMaxConc   = "telemetry.access_search_max_concurrent"
)

Access log search bounds. The rows live in the edge's in-memory ring, so the scan cap is what keeps one tenant's search from holding CPU on a busy edge.

View Source
const (
	KeyAdvisorTimeoutSeconds   = "databases.advisor_timeout_seconds"
	KeyAdvisorMaxFindings      = "databases.advisor_max_findings"
	KeyAdvisorUnusedIndexBytes = "databases.advisor_unused_index_min_bytes"
	KeyAdvisorSeqScanMinRows   = "databases.advisor_seq_scan_min_rows"
	KeyAdvisorSeqScanPercent   = "databases.advisor_seq_scan_ratio"
	KeyAdvisorDeadTupleRatio   = "databases.advisor_dead_tuple_ratio"
	KeyAdvisorCacheHitMinRatio = "databases.advisor_cache_hit_min_ratio"
	KeyAdvisorIdleInTxMinutes  = "databases.advisor_idle_in_tx_minutes"
	KeyAdvisorSlowStatementMs  = "databases.advisor_slow_statement_ms"
	KeyAdvisorCacheSeconds     = "databases.advisor_cache_seconds"
)

Registered keys for GET /api/v1/databases/{name}/advisor.

View Source
const (
	KeyAlertsAdvisoryNotify      = "alerts.advisory_notify"
	KeyAlertsAdvisoryMinSeverity = "alerts.advisory_min_severity"
)

Advisory alert keys: off by default so a feed never adds noise unasked.

View Source
const (
	KeyAlertsDatabaseCrashLoopEnabled    = "alerts.database.crash_loop_enabled"
	KeyAlertsDatabaseDiskEnabled         = "alerts.database.disk_growth_enabled"
	KeyAlertsDatabaseDiskWarnDays        = "alerts.database.disk_growth_warn_days"
	KeyAlertsDatabaseDiskCriticalDays    = "alerts.database.disk_growth_critical_days"
	KeyAlertsDatabaseDiskFor             = "alerts.database.disk_growth_for"
	KeyAlertsDatabaseConnectionsEnabled  = "alerts.database.connections_enabled"
	KeyAlertsDatabaseConnectionsPercent  = "alerts.database.connections_percent"
	KeyAlertsDatabaseConnectionsFor      = "alerts.database.connections_for"
	KeyAlertsDatabaseBackupEnabled       = "alerts.database.backup_missing_enabled"
	KeyAlertsDatabaseBackupWindow        = "alerts.database.backup_missing_window"
	KeyAlertsDatabaseBackupUnprotectedMB = "alerts.database.backup_unprotected_mb"
)

Keys for the database health alert rules.

View Source
const (
	KeyAlertsDefaultsEnabled   = "alerts.defaults_enabled"
	KeyAlertsDefaultCrashLoop  = "alerts.default_crashloop_restarts"
	KeyAlertsDefault5xxPercent = "alerts.default_5xx_percent"
	KeyAlertsDefault5xxMinReqs = "alerts.default_5xx_min_requests"
	KeyAlertsDigestSchedule    = "alerts.digest_schedule"
)

Default alert and weekly digest setting keys.

View Source
const (
	KeyDomainsWWWMode   = "domains.www_mode"
	KeyDomainsCanonical = "domains.canonical"
)

Keys for how a bare domain and its www twin are set up.

View Source
const (
	KeyAppsMetricsMax                = "api.apps_metrics_max"
	KeyLogExportMaxLines             = "logs.export_max_lines"
	KeyLogMaxLiveSubscribers         = "logs.max_live_subscribers"
	KeyStackHistoryLimit             = "stacks.history_limit"
	KeyMaxTagsPerApp                 = "tags.max_per_app"
	KeyMaxTagsPerResource            = "tags.max_per_resource"
	KeyFixitMaxPerHour               = "fixit.max_per_hour"
	KeyDeployApprovalClaimTimeoutSec = "deploy.approval_claim_timeout_seconds"
	KeyApproveDigestCheckTimeoutSec  = "deploy.approve_digest_check_timeout_seconds"
	KeyGitAccessCacheTTL             = "git.access_cache_ttl_seconds"
	KeyGitAccessNamesMax             = "git.access_names_max"
	KeyExternalProbeConcurrency      = "databases.external_probe_concurrency"
)

Registered keys for API limits that used to be env-only.

View Source
const (
	KeyAppBundleMaxBytes      = "apps.bundle_import_max_bytes"
	KeyAppBundleMaxEntries    = "apps.bundle_import_max_entries"
	KeyAppBundleMaxEntryBytes = "apps.bundle_import_max_entry_bytes"
)

App bundle import keys. A bundle is an uploaded file from anywhere, so every cap has a floor and a ceiling and a stray seed can never lift it.

View Source
const (
	KeyAppMetricsScrapeInterval = "app_metrics.scrape_interval"
	KeyAppMetricsScrapeTimeout  = "app_metrics.scrape_timeout"
	KeyAppMetricsMaxBodyBytes   = "app_metrics.max_body_bytes"
	KeyAppMetricsMaxSeries      = "app_metrics.max_series"
	KeyAppMetricsMaxLabels      = "app_metrics.max_labels"
	KeyAppMetricsRetentionHours = "app_metrics.retention_hours"
	KeyAppMetricsQueryMaxPoints = "app_metrics.query_max_points"
	KeyAppMetricsMaxLabelBytes  = "app_metrics.max_label_bytes"
	KeyAppMetricsMaxStoredRows  = "app_metrics.max_stored_rows"
	KeyAppMetricsScrapeWorkers  = "app_metrics.scrape_workers"
)

App metrics scrape setting keys.

View Source
const (
	KeyAppsMaxIOBps   = "apps.resources_max_io_bps"
	KeyAppsMaxNetMbit = "apps.resources_max_net_mbit"
)

Operator ceilings for the per-app throughput fields; 0 means no ceiling.

View Source
const (
	KeyAppsRunMaxConcurrentPerApp = "apps_run.max_concurrent_per_app"
	KeyAppsRunMaxTimeoutSeconds   = "apps_run.max_timeout_seconds"
	KeyAppsRunMemoryLimitMB       = "apps_run.memory_limit_mb"
	KeyAppsRunCPULimitMillis      = "apps_run.cpu_limit_millis"
)

Limits for one-off command runs (apps run, the dashboard Run card, POST /api/v1/jobs/runs).

View Source
const (
	KeyAppSleepMaxWaiters      = "appsleep.max_waiters"
	KeyAppSleepWakeWaitSeconds = "appsleep.wake_wait_seconds" //nolint:gosec // setting key, not a credential
)

Limits for requests held while a sleeping app wakes.

View Source
const (
	KeyAuditAnchorWebhookURL    = "audit.anchor_webhook_url"
	KeyAuditAnchorWebhookSecret = "audit.anchor_webhook_secret" //nolint:gosec // setting key, not a credential
)

Audit anchor webhook export keys. The URL empty means the export is off.

View Source
const (
	KeyAutoscaleGaugeTimeout  = "autoscale.gauge_timeout"
	KeyAutoscaleGaugeMaxBytes = "autoscale.gauge_max_bytes"
)

Gauge scrape limits for custom autoscale signals. The gauge path stays env-only until a store migration lands.

View Source
const (
	KeyBackupHookTimeoutSeconds = "backup.hook_timeout_seconds"
	KeyBackupHookMaxOutputBytes = "backup.hook_max_output_bytes"
)

Volume backup hook budgets. Hooks run inside the app's own container, so both are clamped to keep a hung or chatty hook from holding a backup open.

View Source
const (
	KeyBackupRunWindow      = "backup.run_window"
	KeyBackupUploadKBPerSec = "backup.upload_kb_per_sec"
)

Backup run window and upload speed cap keys.

View Source
const (
	KeyBackupSFTPAllowPrivate   = "backup.sftp_allow_private_networks" //nolint:gosec // setting key, not a credential
	KeyBackupSFTPConnectTimeout = "backup.sftp_connect_timeout"        //nolint:gosec // setting key, not a credential
	KeyBackupSFTPIdleTimeout    = "backup.sftp_idle_timeout"           //nolint:gosec // setting key, not a credential
	KeyBackupSFTPMaxEntries     = "backup.sftp_max_entries"            //nolint:gosec // setting key, not a credential
	KeyBackupSFTPMaxDepth       = "backup.sftp_max_depth"              //nolint:gosec // setting key, not a credential
	KeyBackupSFTPMaxConns       = "backup.sftp_max_connections"        //nolint:gosec // setting key, not a credential
	KeyBackupSFTPScanPerMinute  = "backup.sftp_scan_per_minute"        //nolint:gosec // setting key, not a credential
)

SFTP backup target tunables. Env vars only seed the defaults; a saved value applies to the next connection.

View Source
const (
	KeyBackupSizeAnomalyPercent  = "backup.size_anomaly_percent"
	KeyBackupSizeAnomalyBaseline = "backup.size_anomaly_baseline"
)

Keys for the backup size anomaly alert.

View Source
const (
	KeyBackupWebDAVAllowPrivate   = "backup.webdav_allow_private_networks" //nolint:gosec // setting key, not a credential
	KeyBackupWebDAVHeaderTimeout  = "backup.webdav_header_timeout"         //nolint:gosec // setting key, not a credential
	KeyBackupWebDAVIdleTimeout    = "backup.webdav_idle_timeout"           //nolint:gosec // setting key, not a credential
	KeyBackupWebDAVRequestTimeout = "backup.webdav_request_timeout"        //nolint:gosec // setting key, not a credential
	KeyBackupWebDAVMaxResponse    = "backup.webdav_max_response_bytes"     //nolint:gosec // setting key, not a credential
	KeyBackupWebDAVMaxEntries     = "backup.webdav_max_entries"            //nolint:gosec // setting key, not a credential
	KeyBackupWebDAVMaxDepth       = "backup.webdav_max_depth"              //nolint:gosec // setting key, not a credential

)

WebDAV backup target tunables. Env vars only seed the defaults; a saved value applies to the next request.

View Source
const (
	KeyBootRechecks     = "boot.rechecks"
	KeyBootEventRecheck = "boot.event_recheck"
	// KeyBootDeferredStages starts non critical boot stages after the listener is up.
	KeyBootDeferredStages = "boot.deferred_stages"
)

Boot recheck keys.

View Source
const (
	KeyBootstrapScriptMaxBytes = "bootstrap_scripts.max_bytes"
	KeyBootstrapScriptMaxCount = "bootstrap_scripts.max_count"

	DefaultBootstrapScriptMaxBytes = 64 << 10
	DefaultBootstrapScriptMaxCount = 50
)

Registered keys for the saved bootstrap script limits.

View Source
const (
	KeyBranchesEnabled           = "branches.enabled"
	KeyBranchesExpiryInterval    = "branches.expiry_interval"
	KeyBranchesExpiryWarning     = "branches.expiry_warning"
	KeyBranchesDefaultTTL        = "branches.default_ttl"
	KeyBranchesPreviewDefaultTTL = "branches.preview_default_ttl"
	KeyBranchesFailedRetention   = "branches.failed_retention"
	KeyBranchesMaxPerRoot        = "branches.max_per_root"
	KeyBranchesMaxTotal          = "branches.max_total"
	KeyBranchesMaxTotalBytes     = "branches.max_total_bytes"
	KeyBranchesMaxDepth          = "branches.max_depth"
	KeyBranchesSlowPathMaxBytes  = "branches.slow_path_max_bytes"
	KeyBranchesSlowPathHeadroom  = "branches.slow_path_headroom_factor"
	KeyBranchesFastPath          = "branches.fast_path"
	KeyBranchesActivityInterval  = "branches.activity_interval"
	KeyBranchesSizeInterval      = "branches.size_interval"
	KeyBranchesMaskPreviewRows   = "branches.mask_preview_rows"
	KeyBranchesCloneTimeout      = "branches.clone_timeout"
	KeyBranchesMinTTL            = "branches.min_ttl"
)

Database branch settings (ADR 081).

View Source
const (
	KeyDatabasesAuditRetentionDays = "databases.audit_retention_days"
	KeyDatabasesAuditStoreText     = "databases.audit_store_text"
	KeyDatabasesAuditQueueSize     = "databases.audit_queue_size"
	KeyDatabasesAuditMaxRows       = "databases.audit_max_rows"
	KeyDatabasesAuditTextMaxBytes  = "databases.audit_text_max_bytes"
)

Database statement audit settings (ADR 082). Seeded from env, changed live.

View Source
const (
	// KeyBuildCacheAppQuotaGB caps one app's cache mounts; 0 turns the quota off.
	KeyBuildCacheAppQuotaGB = "build.cache_app_quota_gb"
	// KeyBuildCacheNodeDepCapGB caps all dependency cache mounts on one build node; 0 turns it off.
	KeyBuildCacheNodeDepCapGB = "build.cache_node_dep_cap_gb"
	// KeyBuildCacheReclaimMaxRecords bounds how many records one reclaim run removes.
	KeyBuildCacheReclaimMaxRecords = "build.cache_reclaim_max_records"
	// KeyBuildCacheReclaimTimeout bounds one reclaim so a wedged builder cannot hold it.
	KeyBuildCacheReclaimTimeout = "build.cache_reclaim_timeout"
	// KeyBuildCachePruneAgeHours is the idle age the dashboard "older than" prune offers.
	KeyBuildCachePruneAgeHours = "build.cache_prune_age_hours"
	// KeyBuildWarmBaseImages lists base images build nodes keep pulled; empty turns warming off.
	KeyBuildWarmBaseImages = "build.warm_base_images"
	// KeyBuildWarmBaseInterval is how often the warm list is pulled again.
	KeyBuildWarmBaseInterval = "build.warm_base_interval"
	// KeyBuildWarmBaseTimeout bounds one image pull on one node.
	KeyBuildWarmBaseTimeout = "build.warm_base_timeout"
)
View Source
const (
	// KeyBuildCacheBudget turns the post build cache budget prune on, off or auto.
	KeyBuildCacheBudget = "build.cache_budget"
	// KeyBuildCacheBudgetMaxMB is the most builder cache kept after a build; 0 sizes it from the disk.
	KeyBuildCacheBudgetMaxMB = "build.cache_budget_max_mb"
	// KeyBuildCacheBudgetReservedMB is the cache a prune never goes below; 0 picks a default.
	KeyBuildCacheBudgetReservedMB = "build.cache_budget_reserved_mb"
)
View Source
const (
	BuildCacheBudgetAuto = "auto"
	BuildCacheBudgetOn   = "on"
	BuildCacheBudgetOff  = "off"
)

Cache budget modes.

View Source
const (
	// KeyBuildkitProbeTimeout bounds the check that the engine serves BuildKit itself.
	KeyBuildkitProbeTimeout = "build.buildkit_probe_timeout"
	// KeyBuildkitReadyTimeout bounds the wait for the managed builder to answer.
	KeyBuildkitReadyTimeout = "build.buildkit_ready_timeout"
	// KeyBuildkitInfoTimeout bounds one readiness call to the managed builder.
	KeyBuildkitInfoTimeout = "build.buildkit_info_timeout"
	// KeyBuildkitRetryInterval spaces readiness calls while the builder starts.
	KeyBuildkitRetryInterval = "build.buildkit_retry_interval"
)
View Source
const (
	KeyBuildHookTriggersPerMinute = "deploy.build_hook_triggers_per_minute"
	KeyBuildHookMaxCIDRs          = "deploy.build_hook_max_cidrs"
)

Incoming build hook limits. The env vars only seed the defaults; a saved value applies to the next hook call without a restart.

View Source
const (
	// KeyBuildMemoryPercent caps one build's memory as a share of host RAM; 0 means unlimited.
	KeyBuildMemoryPercent = "build.memory_percent"
	// KeyBuildCPUPercent caps one build's CPU as a share of host cores; 0 means unlimited.
	KeyBuildCPUPercent = "build.cpu_percent"
	// KeyBuildkitdPidsLimit caps the processes inside the BuildKit daemon container; 0 means unlimited.
	KeyBuildkitdPidsLimit = "build.buildkitd_pids_limit"
)
View Source
const (
	KeyBuildTransferMode    = "build.transfer_mode"
	KeyBuildTransferPushTTL = "build.transfer_push_ttl"
	// KeyBuildTransferBearerTTL is the lifetime of each registry bearer; builds refresh it, so revocation applies within it.
	KeyBuildTransferBearerTTL = "build.transfer_bearer_ttl"
	// KeyRegistryTokenRateLimit throttles the registry token endpoint apart from sign-in limits.
	KeyRegistryTokenRateLimit = "registry.token_rate_limit_rpm"
)

Build transfer settings. The env vars only seed the defaults; a saved value applies to the next dispatched build without a restart.

View Source
const (
	KeyBulkMaxApps      = "bulk.max_apps"
	KeyBulkConcurrency  = "bulk.concurrency"
	KeyBulkConfirmAbove = "bulk.confirm_above"
	KeyBulkMaxResources = "bulk.max_resources"
)

Limits for POST /api/v1/apps/bulk and the resource console bulk tag action.

View Source
const (
	KeyChangesStreamMaxPerCaller = "events.changes_max_streams_per_caller"
	KeyChangesStreamBuffer       = "events.changes_buffer"
	KeyChangesStreamHeartbeat    = "events.changes_heartbeat"
	KeyMaxLiveStreams            = "events.max_live_streams"
)

Change stream caps, so one caller cannot pin unbounded connections or memory.

View Source
const (
	KeyCleanupFailingWindow = "cleanup.failing_window"
	KeyCleanupFailingFloor  = "cleanup.failing_floor"
)

Cleanup failure alert setting keys.

View Source
const (
	KeyCloudAWSSSORenewPercent     = "cloud.aws.sso.renew_percent"
	KeyCloudAWSSSOTokenSkew        = "cloud.aws.sso.token_skew_seconds" //nolint:gosec // setting key, not a credential
	KeyCloudAWSSSOMaxAccounts      = "cloud.aws.sso.max_accounts"
	KeyCloudAWSSSOMaxSessions      = "cloud.aws.sso.max_sessions"
	KeyCloudAWSSSOTimeout          = "cloud.aws.sso.timeout_seconds"
	KeyCloudAWSSSOMaxResponseBytes = "cloud.aws.sso.max_response_bytes"
)

Keys of the live AWS SSO tunables.

View Source
const (
	KeyCloudMaxDestroys           = "cloud.max_destroys"
	KeyCloudAllowProtectedDelete  = "cloud.allow_protected_delete"
	KeyCloudRequireFullEstimate   = "cloud.require_full_estimate"
	KeyCloudEngineTimeoutSeconds  = "cloud.engine_timeout_seconds"
	KeyCloudDefaultMonthlyCostLim = "cloud.default_monthly_cost_limit"
	KeyCloudFetchMaxMB            = "cloud.fetch_max_mb"
	KeyCloudFetchMinFreeMB        = "cloud.fetch_min_free_mb"
	KeyCloudFetchTimeoutSeconds   = "cloud.fetch_timeout_seconds"
	KeyCloudAllowChecksumOnly     = "cloud.allow_checksum_only"
	KeyCloudStateMaxKB            = "cloud.state_max_kb"
	KeyCloudEngineImage           = "cloud.engine_image"
	KeyCloudEngineUser            = "cloud.engine_user"
	KeyCloudEngineNetwork         = "cloud.engine_network"
	KeyCloudEngineDenyAddrs       = "cloud.engine_deny_addresses"
	KeyCloudEngineMemoryMB        = "cloud.engine_memory_mb"
	KeyCloudEngineCPUs            = "cloud.engine_cpus"
	KeyCloudEnginePids            = "cloud.engine_pids"
	KeyCloudEngineRunMinFreeMB    = "cloud.engine_run_min_free_mb"
	KeyCloudEngineTmpMB           = "cloud.engine_tmp_mb"
	KeyCloudPlanMaxAgeMinutes     = "cloud.plan_max_age_minutes"
	KeyCloudMaxConcurrentPlans    = "cloud.max_concurrent_plans"
	KeyCloudPlanJobRetentionHours = "cloud.plan_job_retention_hours"
	KeyCloudOracleSessionMinSecs  = "cloud.oracle.session_min_seconds"
)

Registered keys for the cloud provisioning engine guards. Env names are seeds only.

View Source
const (
	KeyCloudOAuthDOClientID     = "cloud.oauth.digitalocean.client_id"
	KeyCloudOAuthDOClientSecret = "cloud.oauth.digitalocean.client_secret" //nolint:gosec // setting key, not a credential
	KeyCloudOAuthDOTimeout      = "cloud.oauth.digitalocean.timeout_seconds"
	KeyCloudOAuthDORefreshLead  = "cloud.oauth.digitalocean.refresh_lead_seconds"
)

DigitalOcean OAuth app settings. Both credentials empty keeps the Connect button hidden.

View Source
const (
	KeyCloudDoctorDeepParallel    = "cloud.doctor.deep_parallel"
	KeyCloudDoctorDeepTimeoutSecs = "cloud.doctor.deep_timeout_seconds"
	KeyCloudDoctorDeepMinInterval = "cloud.doctor.deep_min_interval_seconds"
)

Keys for the cloud doctor deep check, which makes one cheap read per enabled service.

View Source
const (
	KeyIngressTrustedProxyPreset = "ingress.trusted_proxy_preset"
	KeyCloudflareIPsRefresh      = "ingress.cloudflare_ips_refresh"
	KeyCloudflareIPsMinRanges    = "ingress.cloudflare_ips_min_ranges"
	KeyCloudflareIPsTimeout      = "ingress.cloudflare_ips_timeout"
	KeyCloudflareIPsMaxBytes     = "ingress.cloudflare_ips_max_bytes"

	// TrustedProxyPresetNone and TrustedProxyPresetCloudflare are the preset values.
	TrustedProxyPresetNone       = "none"
	TrustedProxyPresetCloudflare = "cloudflare"
)

Cloudflare client IP preset keys and the refresh bounds around its range list.

View Source
const (
	KeyCloudGuardECR           = "cloud.guard.service.ecr"
	KeyCloudGuardACM           = "cloud.guard.service.acm"
	KeyCloudGuardParams        = "cloud.guard.service.parameters"
	KeyCloudGuardCloudTrail    = "cloud.guard.service.cloudtrail"
	KeyCloudGuardRDS           = "cloud.guard.service.rds"
	KeyCloudGuardElastiCache   = "cloud.guard.service.elasticache"
	KeyCloudGuardLightsail     = "cloud.guard.service.lightsail"
	KeyCloudGuardLSBundles     = "cloud.guard.lightsail.bundles"
	KeyCloudGuardLSMax         = "cloud.guard.lightsail.max_instances"
	KeyCloudGuardEBS           = "cloud.guard.service.ebs"
	KeyCloudGuardCloudWatch    = "cloud.guard.service.cloudwatch"
	KeyCloudGuardIdleCPU       = "cloud.guard.idle.cpu_percent"
	KeyCloudGuardIdleDays      = "cloud.guard.idle.days"
	KeyCloudGuardIdleEBSCents  = "cloud.guard.idle.ebs_gb_month_cents"
	KeyCloudGuardIdleEIPCents  = "cloud.guard.idle.eip_month_cents"
	KeyCloudGuardIdleALBCents  = "cloud.guard.idle.alb_month_cents"
	KeyCloudGuardRestopLead    = "cloud.guard.idle.restop_lead_hours"
	KeyCloudGuardKeepDaily     = "cloud.guard.snapshot.keep_daily"
	KeyCloudGuardKeepWeekly    = "cloud.guard.snapshot.keep_weekly"
	KeyCloudGuardMonthlyCapUSD = "cloud.guard.monthly_cap_usd"
	KeyCloudGuardAccountCaps   = "cloud.guard.account_caps"
	KeyCloudGuardPerCreateUSD  = "cloud.guard.per_create_max_usd"
	KeyCloudGuardInstanceTypes = "cloud.guard.instance_types"
	KeyCloudGuardKillSwitch    = "cloud.guard.kill_switch"
	KeyCloudGuardExpiresHours  = "cloud.guard.default_expires_hours"
	KeyCloudGuardPolicyARN     = "cloud.guard.policy_arn"
	KeyCloudAWSNamePrefix      = "cloud.aws.name_prefix"
)

Registered keys for the AWS create guard and the per service enable flags.

View Source
const (
	KeyCloudGuardCloudFront   = "cloud.guard.service.cloudfront"
	KeyCloudGuardSSM          = "cloud.guard.service.ssm"
	KeyCloudGuardSSMRun       = "cloud.guard.service.ssm_run"
	KeyCloudFrontMaxPaths     = "cloud.cloudfront.max_invalidation_paths"
	KeyCloudSSMCommands       = "cloud.ssm.command_allowlist"
	KeyCloudSSMTimeoutSeconds = "cloud.ssm.command_timeout_seconds"
)

Keys for the CloudFront and Systems Manager AWS modules.

View Source
const (
	KeyCloudSpendEnabled              = "cloud.spend.enabled"
	KeyCloudSpendCacheTTLMinutes      = "cloud.spend.cache_ttl_minutes"
	KeyCloudSpendRefreshMinInterval   = "cloud.spend.refresh_min_interval_minutes"
	KeyCloudSpendRefreshPerUserHour   = "cloud.spend.refresh_per_user_per_hour"
	KeyCloudSpendStaleAfterHours      = "cloud.spend.stale_after_hours"
	KeyCloudSpendAWSCostExplorer      = "cloud.spend.aws_cost_explorer"
	KeyCloudSpendMaxPages             = "cloud.spend.max_pages"
	KeyCloudInstancesCacheTTLSecs     = "cloud.instances.cache_ttl_seconds"
	KeyCloudInstancesEventsWindowDays = "cloud.instances.events_window_days"
)

Registered keys for cloud account spend and the instance list cache.

View Source
const (
	KeyComposeRepoFileMaxBytes  = "compose.repo_file_max_bytes"
	KeyComposeRepoDeployTimeout = "compose.repo_deploy_timeout"
)

Keys for compose apps deployed from a git repository.

View Source
const (
	KeyContainersLogMaxSizeMB = "containers.log_max_size_mb"
	KeyContainersLogMaxFiles  = "containers.log_max_files"
)

Registered keys for managed container log rotation.

View Source
const (
	KeyDeployCutoverGapWindow     = "deploy.cutover_gap_window"
	KeyDeployCutoverGapQueuedOver = "deploy.cutover_gap_queued_over"
)

Keys for the measured cutover gap on the deploy timeline.

View Source
const (
	KeyCutoverVerifyCertWarnDays = "cutover.verify_cert_warn_days"
	KeyCutoverVerifyCertFailDays = "cutover.verify_cert_fail_days"
	KeyCutoverVerifySlowTTFB     = "cutover.verify_slow_ttfb"
	KeyCutoverVerifyHSTSMinAge   = "cutover.verify_hsts_min_age"
	KeyCutoverVerifyTimeout      = "cutover.verify_timeout"
	KeyCutoverVerifyMinInterval  = "cutover.verify_min_interval"
	KeySetupHTTPSIssuingWindow   = "setup.https_issuing_window_minutes"
)

Registered keys for the domain cutover verifier thresholds.

View Source
const (
	KeyDatabaseBulkConcurrency = "databases.bulk_concurrency"
	KeyDatabaseBulkMaxItems    = "databases.bulk_max_items"
)

Registered keys for POST /api/v1/databases/bulk.

View Source
const (
	KeyDatabasesAutoLatest                = "databases.auto_latest"
	KeyDatabasesLatestVersionCacheSeconds = "databases.latest_version_cache_seconds"
	KeyDatabasesLatestLookupSeconds       = "databases.latest_lookup_timeout_seconds"
)

Automatic newest stable version for databases created without a version.

View Source
const (
	KeyDBSpaceRows         = "db.space_report_rows"
	KeyDBCompactMinFree    = "db.compact_min_free_percent"
	KeySystemProcessesRows = "system.processes_max_rows"
)

Registered keys for the database space report and host process table.

View Source
const (
	KeyDBCrashLoopRestarts      = "databases.crash_loop_restarts"
	KeyDBCrashLoopWindowSeconds = "databases.crash_loop_window_seconds"
)

Registered keys for the database crash loop detector.

View Source
const (
	KeyDatabaseStatsInterval     = "databases.stats_interval_seconds"
	KeyDatabaseStatsMaxDatabases = "databases.stats_max_databases"
	KeyDatabaseStatsTimeout      = "databases.stats_timeout_seconds"
)

Keys for database statistics sampling.

View Source
const (
	KeyDBCacheSizeMB = "store.cache_size_mb"
	KeyDBMmapSizeMB  = "store.mmap_size_mb"
	KeyDBTempStore   = "store.temp_store"
	KeyDBSynchronous = "store.synchronous"
)

Keys for SQLite connection tuning of the control plane database.

View Source
const (
	DBTuningDefault = "default"
	DBTempFile      = "file"
	DBTempMemory    = "memory"
	DBSyncNormal    = "normal"
	DBSyncFull      = "full"
)

Tuning value names; "default" leaves the SQLite built-in untouched.

View Source
const (
	KeyDBViewerTimeout    = "database_viewer.query_timeout"
	KeyDBViewerMaxRows    = "database_viewer.max_rows"
	KeyDBViewerMaxBytes   = "database_viewer.max_bytes"
	KeyDBViewerMaxCell    = "database_viewer.max_cell_bytes"
	KeyDBViewerSchemaRows = "database_viewer.schema_max_rows"
	KeyDBViewerMaxSQL     = "database_viewer.max_sql_bytes"
	KeyDBViewerMaxConc    = "database_viewer.max_concurrent"
	// KeyDBViewerCacheSeconds is how long overviews and schema outlines are reused, 0 disables.
	KeyDBViewerCacheSeconds = "databases.viewer_cache_seconds"
	KeyDBViewerQueueWaitMs  = "database_viewer.queue_wait_ms"
	// KeyDeploySummaryCacheSeconds is how long the deployments summary scan is reused, 0 disables.
	KeyDeploySummaryCacheSeconds = "deployments.summary_cache_seconds"

	KeyDynamoPageItems     = "databases.dynamodb.page_items"
	KeyDynamoPageItemsMax  = "databases.dynamodb.page_items_max"
	KeyDynamoDescribeMax   = "databases.dynamodb.describe_tables_max"
	KeyLogRuleEvalInterval = "log_rules.eval_interval"
	KeyLogRuleMaxWindow    = "log_rules.max_window"
	KeyLogRuleMaxRows      = "log_rules.max_rows"
	KeyLogRuleSamples      = "log_rules.samples"
)

Registered keys for the database console and log rule limits. Env names are the long-standing ones and only seed defaults.

View Source
const (
	KeyIngressUnmatchedMode        = "ingress.unmatched_mode"
	KeyIngressUnmatchedRedirectURL = "ingress.unmatched_redirect_url"
	// UnmatchedDiagnostic, UnmatchedNotFound and UnmatchedRedirect are the accepted ingress.unmatched_mode values.
	UnmatchedDiagnostic = "diagnostic"
	UnmatchedNotFound   = "not_found"
	UnmatchedRedirect   = "redirect"
)

Registered keys for what the ingress answers when no route claims the requested host.

View Source
const (
	KeyDeployDrainTimeout        = "deploy.drain_timeout"
	KeyDeployPreviousReleaseHold = "deploy.previous_release_hold"
	KeyDeployStableWindow        = "deploy.stable_window"
	KeyDeployWatchWindow         = "deploy.watch_window"
	// KeyDeployCIGateMaxWaits caps the CI gate waits one app may hold at once, one per ref.
	KeyDeployCIGateMaxWaits = "deploy.ci_gate_max_waits_per_app"
	// KeyDeployReceiptApprovalWindow is the longest gap between an approval and the deploy it released.
	KeyDeployReceiptApprovalWindow = "deploy.receipt_approval_window"
	// KeyDeployProcfileDefaultPort is the port a Procfile web process gets, since a Procfile cannot declare one.
	KeyDeployProcfileDefaultPort = "deploy.procfile_default_port"
)

Deploy window keys: the drain, hold, stable and watch timings that decide whether a deploy drops requests. Env names stay as the seed.

View Source
const (
	KeyAlertsDurationRegressionPercent  = "alerts.duration_regression_percent"
	KeyAlertsDurationRegressionRecent   = "alerts.duration_regression_recent"
	KeyAlertsDurationRegressionBaseline = "alerts.duration_regression_baseline"
)

Keys for the deploy duration regression alert.

View Source
const (
	KeyDiskHistoryRetentionDays  = "disk.history_retention_days"
	KeyDiskHistorySampleInterval = "disk.history_sample_interval"
	KeyDiskForecastWindowDays    = "disk.forecast_window_days"
	KeyDiskForecastMinDays       = "disk.forecast_min_days"
	DiskHistoryMinSampleInterval = time.Hour
)

Disk history setting keys.

View Source
const (
	KeyDNSEgressReportMaxNames = "dns.egress_report_max_names"
	DNSEgressReportMaxNamesMin = 10
	DNSEgressReportMaxNamesMax = 10000
)

Egress dry run: caps how many distinct names one report lists.

View Source
const (
	KeyDNSForwardEnabled        = "dns.forward_enabled"
	KeyDNSForwardAttemptTimeout = "dns.forward_attempt_timeout"
	KeyDNSForwardQueryTimeout   = "dns.forward_query_timeout"
	KeyDNSForwardUpstreams      = "dns.forward_upstreams"
	KeyDNSCacheBytes            = "dns.cache_bytes"
	KeyDNSCacheMaxTTL           = "dns.cache_max_ttl"
	KeyDNSCacheNegativeMaxTTL   = "dns.cache_negative_max_ttl"
	KeyDNSContainerFallback     = "dns.container_fallback"
	KeyDNSRateLimitQPS          = "dns.rate_limit_qps"
	KeyDNSRateLimitBurst        = "dns.rate_limit_burst"

	// DNSFallbackHostUpstream and DNSFallbackNone are the values of dns.container_fallback.
	DNSFallbackHostUpstream = "host_upstream"
	DNSFallbackNone         = "none"
)

Mesh DNS forwarding to the host's upstream resolvers (beta, only active while the mesh resolver is on).

View Source
const (
	KeyDNSInternalNamesEnabled  = "dns.internal_names_enabled"
	KeyDNSInternalNamesMax      = "dns.internal_names_max"
	KeyDNSInternalNameMaxLength = "dns.internal_name_max_length"
	KeyDNSInternalLabelMaxLen   = "dns.internal_label_max_length"
	KeyDNSInternalNamesReserved = "dns.internal_names_reserved"
)

Extra internal DNS names per app (beta, off by default).

View Source
const (
	KeyDNSMeshResolverEnabled  = "dns.mesh_resolver_enabled"
	KeyDNSMeshResolverInterval = "dns.mesh_resolver_interval"
)

Mesh DNS resolver on the bridge gateways (beta, off by default).

View Source
const (
	KeyDNSQueryLogAppRefresh = "dns.query_log_app_refresh"
	KeyDNSQueryLogEnabled    = "dns.query_log_enabled"
	KeyDNSQueryLogSize       = "dns.query_log_size"
	KeyDNSQueryLogPrivacy    = "dns.query_log_privacy"
	// DNSQueryLogSizeMin and Max clamp how many records the ring may hold.
	DNSQueryLogSizeMin = 10
	DNSQueryLogSizeMax = 100000
)

Mesh DNS query visibility (beta, off by default).

View Source
const (
	KeyDomainsDNSWatchInterval = "domains.dns_watch_interval_seconds"
	KeyDomainsDNSWatchMaxMins  = "domains.dns_watch_max_minutes"
)

Keys for the background DNS watcher that follows a new domain until it is live.

View Source
const (
	KeyDockerHubLimitWarnPercent  = "registry.dockerhub.limit_warn_percent"
	KeyDockerHubLimitsCacheSecond = "registry.dockerhub.limits_cache_seconds"
	KeyDockerHubTagPageSize       = "registry.dockerhub.tag_page_size"
	KeyDockerHubUseCredential     = "registry.dockerhub.use_credential"
)

Docker Hub integration keys.

View Source
const (
	KeyDomainLimitsMaxBodyBytes      = "domains.limits_max_body_bytes"
	KeyDomainLimitsMaxTimeoutSeconds = "domains.limits_max_timeout_seconds"
)

Registered keys for the ceilings on per-domain request limits.

View Source
const (
	KeyDomainTuningMinTimeoutSeconds = "domains.tuning_min_timeout_seconds"
	KeyDomainTuningMaxTimeoutSeconds = "domains.tuning_max_timeout_seconds"
	KeyDomainTuningMaxStreamSeconds  = "domains.tuning_max_stream_seconds"
)

Registered keys for the bounds on per-domain proxy tuning.

View Source
const (
	KeyDomainsWaitTimeout = "domains.wait_timeout"
	KeyDomainsWaitPoll    = "domains.wait_poll"
)

Keys for how the CLI waits for a new domain to go live.

View Source
const (
	KeyEnvRevisionsKeep  = "env.revisions_keep"
	KeyAppsUndoWindowDay = "apps.undo_window_days"
)

Keys for env revision history.

View Source
const (
	KeyErrorsDedupHours = "errors.dedup_hours"
	KeyErrorsDedupMax   = "errors.dedup_max"
)

Keys for the error tracking event-ID dedup window.

View Source
const (
	KeyFootprintGCPercent       = "footprint.gc_percent"
	KeyFootprintMemLimitPercent = "footprint.memlimit_percent"
	KeyFootprintTrimInterval    = "footprint.trim_interval"
	KeyFootprintTrimMinIdleMB   = "footprint.trim_min_idle_mb"
)

Keys for the live Go runtime footprint knobs.

View Source
const (
	KeyGitLabDeployments            = "git.gitlab_deployments"
	KeyGitLabDeploymentsConnections = "git.gitlab_deployments_connections"
)

Keys for reporting deploys to a GitLab project's Deployments and Environments pages.

View Source
const (
	KeyGitPollEnabled     = "git.poll_enabled"
	KeyGitPollInterval    = "git.poll_interval"
	KeyGitPollConcurrency = "git.poll_concurrency"
	KeyGitPollMaxBackoff  = "git.poll_max_backoff"
)

Keys of the live git poller settings.

View Source
const (
	KeyGitTriggerPatternsMax   = "git.trigger_patterns_max"
	KeyGitTriggerPatternMaxLen = "git.trigger_pattern_max_length"
	KeyGitTriggerRefMaxBytes   = "git.trigger_ref_max_bytes"
	KeyGitTriggerListMaxBytes  = "git.trigger_pattern_list_max_bytes"
)

Registered keys bounding git deploy trigger tag and branch patterns.

View Source
const (
	KeyGitRefreshEnabled      = "git.oauth_refresh_enabled"
	KeyGitRefreshLead         = "git.oauth_refresh_lead"
	KeyGitRefreshInterval     = "git.oauth_refresh_interval"
	KeyGitRefreshFailureGrace = "git.oauth_refresh_failure_grace"
	KeyGitRotateLifetimeDays  = "git.rotate_lifetime_days"
)

Git provider credential renewal: OAuth access tokens refresh themselves ahead of expiry, and a connection only alerts when a refresh keeps failing.

View Source
const (
	KeyGitSubmodulesMaxDepth     = "git.submodules_max_depth"
	KeyGitSubmodulesMaxCount     = "git.submodules_max_count"
	KeyGitSubmodulesMaxMB        = "git.submodules_max_mb"
	KeyGitSubmodulesTimeout      = "git.submodules_timeout"
	KeyGitSubmodulesAuthHosts    = "git.submodules_credential_hosts"
	KeyGitLFSHosts               = "git.lfs_hosts"
	KeyGitSubmodulesAllowedCIDRs = "git.submodules_allowed_cidrs"
)

Keys bounding submodule and LFS fetches of git source builds.

View Source
const (
	KeyIaCPlanValueMax        = "iac.plan_value_max"
	KeyStackPruneMaxPercent   = "stacks.prune_max_percent"
	KeyStackPruneMaxCount     = "stacks.prune_max_count"
	KeyIaCSecretMatchMinLen   = "iac.secret_match_min_len"
	KeyHFTimeoutSeconds       = "models.hf_timeout_seconds"
	KeyHFMaxResponseBytes     = "models.hf_max_response_bytes"
	KeyHFMaxListedFiles       = "models.hf_max_listed_files"
	KeyPlacementAffinityTerms = "placement.affinity_max_terms"
)

Registered keys for plan and prune guards, model fetch limits and placement limits.

View Source
const (
	KeyHostPressureEnabled      = "host.pressure_enabled"
	KeyHostPressureShedEnabled  = "host.pressure_shed_enabled"
	KeyHostPressureInterval     = "host.pressure_interval"
	KeyHostPressureHold         = "host.pressure_hold"
	KeyHostPressureExitPercent  = "host.pressure_exit_percent"
	KeyHostPressureJitter       = "host.pressure_resume_jitter"
	KeyHostPressureCPUWarn      = "host.pressure_cpu_warn"
	KeyHostPressureCPUCritical  = "host.pressure_cpu_critical"
	KeyHostPressureMemWarn      = "host.pressure_mem_warn"
	KeyHostPressureMemCritical  = "host.pressure_mem_critical"
	KeyHostPressureFullWarn     = "host.pressure_mem_full_warn"
	KeyHostPressureFullCritical = "host.pressure_mem_full_critical"
	KeyHostPressureAvailWarn    = "host.pressure_avail_warn_percent"
	KeyHostPressureAvailCrit    = "host.pressure_avail_critical_percent"
	KeyHostPressureLoadWarn     = "host.pressure_load_warn"
	KeyHostPressureLoadCritical = "host.pressure_load_critical"
	KeyHostNoSwapRAMMB          = "host.no_swap_ram_threshold_mb"
)

Host pressure setting keys.

View Source
const (
	// KeyHostUncleanRestartWindow is how long an unclean restart stays in the attention feed and the doctor row.
	KeyHostUncleanRestartWindow = "host.unclean_restart_window"
	// KeyHostProtectedOOMScoreAdj is the OOM score adjustment at or below which the control plane counts as protected.
	KeyHostProtectedOOMScoreAdj = "host.protected_oom_score_adj"
)
View Source
const (
	KeyIaCComposeRefs       = "iac.compose_refs"
	KeyIaCComposeMaxFileKB  = "iac.compose_max_file_kb"
	KeyIaCComposeMaxFiles   = "iac.compose_max_files"
	KeyIaCComposeMaxTotalKB = "iac.compose_max_total_kb"
)

Registered keys for compose references in the App kind (ADR 081).

View Source
const (
	// KeyBuildImageBloatPercent is the image growth, against the previous build, that raises a bloat warning; 0 turns it off.
	KeyBuildImageBloatPercent = "build.image_bloat_percent"
	// KeyBuildImageBloatMinMB is the smallest growth in MiB that can raise a bloat warning.
	KeyBuildImageBloatMinMB = "build.image_bloat_min_mb"
)
View Source
const (
	KeyImagesKeepPerApp    = "images.keep_per_app"
	KeyImagesPruneSchedule = "images.prune_schedule"
)

Image retention keys.

View Source
const (
	KeyAppImageKeep          = "app.image_keep"
	KeyAppImageKeepOverrides = "app.image_keep_overrides"
)

Per-app image keep keys. 0 follows images.keep_per_app.

View Source
const (
	KeyIncidentPostmortemFieldMax  = "incidents.postmortem_field_max"
	KeyIncidentPostmortemActionMax = "incidents.postmortem_action_items_max"
	KeyIncidentPostmortemBodyMax   = "incidents.postmortem_body_max"
)

Incident postmortem bounds. Each text field is capped on its own so one long section cannot crowd the incident detail view or the audit trail.

View Source
const (
	KeyIngressMaxBodyBytes  = "ingress.max_body_bytes"
	KeyAccessLogRetention   = "telemetry.access_log_retention"
	KeyIngressFallbackCerts = "ingress.fallback_certs"
	// KeyVisitorSaltRotation sets how often the salt behind visitor hashes changes.
	KeyVisitorSaltRotation = "telemetry.visitor_salt_rotation"
	// KeyVisitorHistoryRetention sets how long hourly visitor rollups are kept; 0 turns persistence off.
	KeyVisitorHistoryRetention = "telemetry.visitor_history_retention"
	// FallbackCertsEager and FallbackCertsLazy are the accepted ingress.fallback_certs values.
	FallbackCertsEager = "eager"
	FallbackCertsLazy  = "lazy"
)

Registered keys for the ingress body cap and the in-memory access log window.

View Source
const (
	KeyK8sClustersEnabled     = "k8s.clusters_enabled"
	KeyK8sInClusterEnabled    = "k8s.in_cluster_enabled"
	KeyK8sAllowPrivateAPI     = "k8s.allow_private_api" // gitleaks:allow
	KeyK8sRequestTimeout      = "k8s.request_timeout"
	KeyK8sKubeconfigMaxBytes  = "k8s.kubeconfig_max_bytes"
	KeyK8sMaxBodyBytes        = "k8s.max_body_bytes" // gitleaks:allow
	KeyK8sLogTailLinesMax     = "k8s.log_tail_lines_max"
	KeyK8sStatusPollInterval  = "k8s.status_poll_interval"
	KeyK8sDefaultNamespace    = "k8s.default_namespace"
	KeyK8sCPURequest          = "k8s.cpu_request"
	KeyK8sMemoryRequest       = "k8s.memory_request"
	KeyK8sCPULimit            = "k8s.cpu_limit" // gitleaks:allow
	KeyK8sMemoryLimit         = "k8s.memory_limit"
	KeyK8sMaxReplicas         = "k8s.max_replicas" // gitleaks:allow
	KeyK8sMaxEnvVars          = "k8s.max_env_vars"
	KeyK8sRunAsUser           = "k8s.run_as_user"
	KeyK8sAllowedNamespaces   = "k8s.allowed_namespaces"
	KeyK8sAllowUnverifiedHost = "k8s.allow_unverified_hosts"
	KeyK8sMaxEnvValueBytes    = "k8s.max_env_value_bytes"
	KeyK8sAllowClusterAdmin   = "k8s.allow_cluster_admin"
)

Kubernetes cluster connection settings. Env values only seed the defaults.

View Source
const (
	KeyAPIRateLimitRead      = "api.rate_limit_read_rpm"
	KeyAPIRateLimitWrite     = "api.rate_limit_write_rpm"
	KeyAPIRateLimitRedeem    = "api.rate_limit_redeem_rpm"
	KeyAuthRateLimitPerIP    = "auth.engine_rate_limit_per_ip"
	KeyAuthRateLimitPerEmail = "auth.engine_rate_limit_per_email"
	KeyAPIMaxBodyBytes       = "api.max_body_bytes"
	KeyAssetsUploadMaxBytes  = "assets.upload_max_bytes"
	KeyDeployMaxConcurrent   = "deploy.max_concurrent"
	KeyUploadMaxBytes        = "deploy.upload_max_bytes"
	KeyInlineSourceMaxBytes  = "deploy.inline_source_max_bytes"
	KeyInlineSourceMaxFiles  = "deploy.inline_source_max_files"
	KeyInlineSourceKeep      = "deploy.inline_source_keep"
)

Registered keys for request limits and deploy concurrency.

View Source
const (
	KeyMeshWakeDebounce    = "mesh.wake_debounce"
	KeyMeshApplyTimeout    = "mesh.apply_timeout"
	KeyMeshApplyRetries    = "mesh.apply_retries"
	KeyMeshApplyRetryDelay = "mesh.apply_retry_delay"
)

Mesh config push keys: how a node's join wakes the mesh and how long one push may take.

View Source
const (
	KeyMeshHubResolveTTL = "mesh.hub_resolve_ttl"
	KeyMeshHubStaleMax   = "mesh.hub_stale_max"
)

Mesh hub hostname resolution keys.

View Source
const (
	KeyMetricsIdleInterval   = "metrics.idle_interval"
	KeyMetricsPresenceWindow = "metrics.presence_window"
	KeyStoreTouchFlush       = "store.touch_flush_interval"
	KeyMetricsSampleInterval = "metrics.sample_interval"
	KeySlowRequestThreshold  = "api.slow_request_threshold"
	KeyMetricsCapTarget      = "metrics.cap_target_percent"
)

Keys for how the metrics collector slows down while nobody watches.

View Source
const (
	KeyMetricsRetention1m  = "metrics.retention_1m"
	KeyMetricsRetention5m  = "metrics.retention_5m"
	KeyMetricsRetention1h  = "metrics.retention_1h"
	KeyMetricsRetention1d  = "metrics.retention_1d"
	KeyMetricsRawRange     = "metrics.raw_query_max_range"
	KeyMetricsRange1m      = "metrics.1m_query_max_range"
	KeyMetricsRange5m      = "metrics.5m_query_max_range"
	KeyMetricsRange1h      = "metrics.1h_query_max_range"
	KeyMetricsMaxDBBytes   = "metrics.max_db_bytes"
	KeyMetricsRollupLag    = "metrics.rollup_lag"
	KeyMetricsRollupEvery  = "metrics.rollup_every"
	KeyMetricsPruneEvery   = "metrics.prune_every"
	KeyMetricsRollupBudget = "metrics.rollup_budget"
)

Keys for metric rollup tier retention, query ranges and the maintenance job (ADR 080). Raw retention keeps its older key, KeyMetricsRetention, so saved values carry over.

View Source
const (
	KeyAgentBufferMaxItems     = "nodes.agent_buffer_max_items"
	KeyAgentBufferMaxBytes     = "nodes.agent_buffer_max_bytes"
	KeyAgentUpdateHealthFailed = "nodes.agent_update_health_failures"
	KeyAgentAutoUpdate         = "nodes.agent_auto_update"
	KeyAgentUpdateWindow       = "nodes.agent_update_window"
	KeyAgentUpdateChannel      = "nodes.agent_update_channel"
	KeyAgentUpdateHeldNodes    = "nodes.agent_update_held_nodes"
	KeyAgentUpdateForceNodes   = "nodes.agent_update_force_nodes"
	KeyNodeDrainStallSeconds   = "nodes.drain_stall_seconds"
)

Agent offline buffer and self-update health limits.

View Source
const (
	KeyNodeMovePrepull        = "node_move.prepull"
	KeyNodeMovePrepullTimeout = "node_move.prepull_timeout"
)

Keys for pre-pulling a moved resource's image on the target node.

View Source
const (
	// KeyNodesPatchPreviewTTL is how long a patch preview token stays valid for an apply.
	KeyNodesPatchPreviewTTL = "nodes.patch_preview_ttl"
	// KeyNodesPatchApplyTimeout bounds one package upgrade run on a node.
	KeyNodesPatchApplyTimeout = "nodes.patch_apply_timeout"
	// KeyNodesPatchOutputTailLines is how many lines of package manager output a run keeps.
	KeyNodesPatchOutputTailLines = "nodes.patch_output_tail_lines"
	// KeyNodesPatchRunHistory is how many patch runs per node stay listed.
	KeyNodesPatchRunHistory = "nodes.patch_run_history"
	// KeyNodesPatchPollInterval is how often a detached upgrade unit's state is read.
	KeyNodesPatchPollInterval = "nodes.patch_poll_interval"
	// KeyNodesPatchAdoptLimit caps how many leftover upgrade units a restarted control plane adopts.
	KeyNodesPatchAdoptLimit = "nodes.patch_adopt_limit"
)
View Source
const (
	KeyNodeCPUThresholdPercent    = "nodes.alert_cpu_percent"
	KeyNodeMemoryThresholdPercent = "nodes.alert_memory_percent"
	KeyNodeDiskThresholdPercent   = "nodes.alert_disk_percent"
	KeyNodeThresholdSustained     = "nodes.alert_sustained_intervals"

	// NodeThresholdMinPercent and NodeThresholdMaxPercent bound defaults and per-node overrides alike.
	NodeThresholdMinPercent = 1
	NodeThresholdMaxPercent = 100
)

Node threshold alert setting keys; per-node overrides live in the node_threshold_overrides table.

View Source
const (
	KeyOrgsAvatarMaxBytes     = "orgs.avatar_max_bytes"
	KeyOrgsAvatarMaxDimension = "orgs.avatar_max_dimension"
)

Organization profile keys.

View Source
const (
	KeyOrgsStrictIsolation = "orgs.strict_isolation"
	KeyOrgsAdminsCanCreate = "orgs.admins_can_create"
	// KeyOrgsProvisionedDefaultMembership defaults on so existing installs keep joining provisioned users to the default org.
	KeyOrgsProvisionedDefaultMembership = "orgs.provisioned_default_membership"
)

Organization isolation settings. Both default to off so an existing install behaves as before.

View Source
const (
	KeyOTLPIngestEnabled    = "otlp.ingest_enabled"
	KeyOTLPIngestMaxBody    = "otlp.ingest_max_body_bytes"
	KeyOTLPIngestMaxRecords = "otlp.ingest_max_records"
	KeyOTLPIngestMaxLine    = "otlp.ingest_max_line_bytes"
)

Keys for the OTLP logs and metrics receiver. It is off until an operator turns it on.

View Source
const (
	KeyPagesBuildLogMaxBytes   = "pages.build_log_max_bytes"
	KeyPagesBuildLogRetention  = "pages.build_log_retention"
	KeyPagesBuildCacheMaxBytes = "pages.build_cache_max_bytes"
)

Keys for Pages build logs and the dependency cache.

View Source
const (
	KeyPagesProxyMaxBodyMB       = "pages.proxy_max_body_mb"
	KeyPagesProxyResponseTimeout = "pages.proxy_response_timeout"
)

Keys for the limits on Pages proxy routes.

View Source
const (
	KeyAuthPasswordMinLength      = "auth.password_min_length"
	KeyAuthPasswordRequireClasses = "auth.password_require_classes"
)

Password policy keys. The defaults match the rule that shipped before these settings existed.

View Source
const (
	KeyPerfStatementTiming = "perf.statement_timing"
	KeyPerfSlowStatementMS = "perf.slow_statement_ms"
	KeyPerfSlowStatements  = "perf.slow_statement_ring"
)

Statement timing keys for the control plane's own database.

View Source
const (
	KeyPreviewDefaultMode    = "preview.default_mode"
	KeyPreviewMaxConcurrent  = "preview.max_concurrent"
	KeyPreviewMinInterval    = "preview.min_interval_seconds"
	KeyPreviewRenderTimeout  = "preview.render_timeout_seconds"
	KeyPreviewIdleStop       = "preview.idle_stop_seconds"
	KeyPreviewBrowserMemory  = "preview.browser_memory_mb"
	KeyPreviewBrowserCPUMill = "preview.browser_cpu_millis"
)

Keys for the deploy preview render tier.

View Source
const (
	KeyProjectsArchiveMaxTotalBytes = "projects.archive_max_total_bytes"
	KeyProjectsArchiveMaxEntries    = "projects.archive_max_entries"
	KeyProjectsArchiveMaxSpecBytes  = "projects.archive_max_spec_bytes"
	KeyProjectsImportMaxBytes       = "projects.import_max_bytes"
	KeyProjectsImportMaxConcurrent  = "projects.import_max_concurrent"
	KeyProjectsArchiveMinPassphrase = "projects.archive_min_passphrase"
	KeyProjectsImportMaxGlobal      = "projects.import_max_concurrent_global"
)

Project archive (.lrx) import and export limits. The env vars only seed the defaults; a saved value applies to the next request without a restart.

View Source
const (
	KeyProjectsDefaultEnvironment     = "projects.default_environment"
	KeyProjectsDefaultEnvironmentName = "projects.default_environment_name"
)

Keys for the environment a new project starts with.

View Source
const (
	KeyProvisionCapCacheTTL      = "provision.capabilities.cache_ttl_seconds"
	KeyProvisionCapRecheckMin    = "provision.capabilities.recheck_interval_minutes"
	KeyProvisionCapRefreshMinGap = "provision.capabilities.refresh_min_interval_seconds"
	KeyProvisionCapProbeParallel = "provision.capabilities.probe_concurrency"
)

Provider capability check settings. Env values only seed defaults.

View Source
const (
	KeyProvisionResourcesCacheTTL    = "provision.resources.cache_ttl_seconds"
	KeyProvisionResourcesRefreshGap  = "provision.resources.refresh_min_interval_seconds"
	KeyProvisionSpendCacheTTL        = "provision.spend.cache_ttl_seconds"
	KeyProvisionSpendRefreshMinInter = "provision.spend.refresh_min_interval_seconds"
)

Provider discovery and spend read settings. Env values only seed defaults.

View Source
const (
	KeyProvisionMaxServers        = "provision.max_servers"
	KeyProvisionMaxMonthlyPrice   = "provision.max_monthly_price_usd"
	KeyProvisionAllowUnknownPrice = "provision.allow_unknown_price"
	KeyProvisionEURToUSDRate      = "provision.eur_to_usd_rate"
	KeyProvisionEnrollTimeout     = "provision.enroll_timeout"
)

Cloud server provisioning guards. Env values only seed the defaults.

View Source
const (
	KeyProvisionOracleEnabled          = "provision.oracle.enabled"
	KeyProvisionOracleAllowUnknown     = "provision.oracle.allow_unknown_price"
	KeyProvisionOracleMaxA1OCPU        = "provision.oracle.max_a1_ocpu"
	KeyProvisionOracleMaxA1MemoryGB    = "provision.oracle.max_a1_memory_gb"
	KeyProvisionOracleMaxE2Micro       = "provision.oracle.max_e2_micro"
	KeyProvisionOracleAllowPaidShapes  = "provision.oracle.allow_paid_shapes"
	KeyProvisionOracleFlexPresets      = "provision.oracle.flex_presets"
	KeyProvisionOracleBootVolumeGB     = "provision.oracle.boot_volume_gb"
	KeyProvisionOracleAvailDomains     = "provision.oracle.availability_domains"
	KeyProvisionOracleImageOS          = "provision.oracle.image_os"
	KeyProvisionOracleImageOSVersion   = "provision.oracle.image_os_version"
	KeyProvisionOracleVCNCIDR          = "provision.oracle.vcn_cidr"
	KeyProvisionOracleMaxBootVolumeGB  = "provision.oracle.max_boot_volume_gb"
	KeyProvisionOracleCompartmentScope = "provision.oracle.allow_compartment_scope"
)

Oracle provider settings. Env values only seed defaults. The allowance limits default to 0 so every capped create is refused until the operator sets numbers checked against their own account.

View Source
const (
	KeyQuotaDefaultMaxApps      = "quota.default_max_apps"
	KeyQuotaDefaultMaxDatabases = "quota.default_max_databases"
	KeyQuotaDefaultMaxMemoryMB  = "quota.default_max_memory_mb"
	KeyQuotaDefaultMaxCPU       = "quota.default_max_cpu"
	KeyQuotaDefaultMaxPreviews  = "quota.default_max_previews"
)

Registered keys for the instance wide quota applied to teams and projects with none of their own. 0 is unlimited.

View Source
const (
	KeyDoctorReachabilityDialbackURL          = "doctor.reachability_dialback_url"
	KeyDoctorReachabilityDialbackAllowPrivate = "doctor.reachability_dialback_allow_private"
)

Reachability dial-back keys. The URL empty means nothing is ever contacted.

View Source
const (
	KeyDeploysRegistryPushMaxBody  = "deploys.registry_push_max_body_bytes"
	KeyDeploysRegistryPushTimeout  = "deploys.registry_push_timeout"
	KeyDeploysRegistryPushDebounce = "deploys.registry_push_debounce"
)

Registry push webhook keys (GHCR and Docker Hub deliveries to the image-update hook).

View Source
const (
	KeyResourceDescriptionMaxChars = "resources.description_max_chars"
	KeyResourceNotesMaxBytes       = "resources.notes_max_bytes"
)

Registered caps for the description and notes an operator records on apps and databases.

View Source
const (
	KeyRegistryKeepTags = "retention.registry_keep_tags"
	KeyRegistryGCMinMB  = "retention.registry_gc_min_mb"
)

Built-in registry retention keys.

View Source
const (
	KeySizingLookback     = "sizing.lookback"
	KeySizingRaiseAtPct   = "sizing.raise_at_pct"
	KeySizingLowerAtPct   = "sizing.lower_at_pct"
	KeySizingMemoryMargin = "sizing.memory_margin_pct"
	KeySizingCPUMargin    = "sizing.cpu_margin_pct"
	KeySizingMinSamples   = "sizing.min_samples"
	KeySizingMinCoverage  = "sizing.min_coverage"
)

Right-sizing hint setting keys.

View Source
const (
	KeyRolloutMaxSurge       = "rollout.max_surge"
	KeyRolloutMaxUnavailable = "rollout.max_unavailable"
	KeyRolloutMinAvailable   = "rollout.min_available"
	KeyCanaryStages          = "canary.stages"
	KeyCanaryInterval        = "canary.interval"
	KeyCanaryMaxErrorRate    = "canary.max_error_rate"
	SettingCanaryMaxP95Ratio = "canary.max_p95_ratio"
	KeyCanaryMinRequests     = "canary.min_requests"
	SettingCanaryP95FloorMS  = "canary.p95_floor_ms"
	KeyCanaryTick            = "canary.tick"
	KeyCanarySticky          = "canary.sticky"
	KeyCanaryMaxHealthFails  = "canary.max_health_failures"
	KeyCanaryAlertRuleID     = "canary.alert_rule_id"
)

Platform defaults for rolling deploys and staged canaries. An app's own rollout or canary block still wins; the env names only seed these.

View Source
const (
	KeyRuntimeTmpfsMax       = "runtime.tmpfs_max"
	KeyRuntimeTmpfsMaxBytes  = "runtime.tmpfs_max_bytes"
	KeyRuntimeTmpfsDefault   = "runtime.tmpfs_default_bytes"
	KeyRuntimeShmMaxBytes    = "runtime.shm_max_bytes"
	KeyRuntimeExtraHostsMax  = "runtime.extra_hosts_max"
	KeyRuntimeDNSMax         = "runtime.dns_max"
	KeyRuntimeStopTimeoutMax = "runtime.stop_timeout_max_seconds"
	KeyRuntimePidsMax        = "runtime.pids_limit_max"
	KeyRuntimeUlimitCount    = "runtime.ulimit_count_max"
	KeyRuntimeUlimitBytes    = "runtime.ulimit_bytes_max"
)

Keys for the bounds a service's runtime options are validated against.

View Source
const (
	KeySavedViewNameMaxChars  = "views.name_max_chars"
	KeySavedViewFilterMaxKeys = "views.filter_max_keys"
	KeySavedViewValueMaxBytes = "views.filter_value_max_bytes"
	KeySavedViewMaxPerUser    = "views.max_per_user"
)

Registered caps for saved list views, so one user cannot fill the store or the menu.

View Source
const (
	KeyScanDefaultEnabled = "supply_chain.default_enabled"
	KeyScanDefaultGate    = "supply_chain.default_gate"
)

Registered keys for the instance default scan policy apps inherit.

View Source
const (
	KeyDatabasesSchemaDiffMaxObjects     = "databases.schema_diff_max_objects"
	KeyDatabasesSchemaDiffTimeoutSeconds = "databases.schema_diff_timeout_seconds"
)

Registered keys for GET /api/v1/databases/{name}/branches/{branch}/schema-diff.

View Source
const (
	KeySecretsRequireRefEnvironments = "secrets.require_ref_environments" //nolint:gosec // setting key, not a credential
	KeySecretsRequireRefMode         = "secrets.require_ref_mode"         //nolint:gosec // setting key, not a credential

	SecretRefModeOff     = "off"
	SecretRefModeWarn    = "warn"
	SecretRefModeEnforce = "enforce"
)

Secret reference policy: environments where literal secret values are not accepted.

View Source
const (
	KeySecretProviderTimeout     = "secrets.provider_timeout_seconds"   //nolint:gosec // setting key, not a credential
	KeySecretProviderCacheTTL    = "secrets.provider_cache_ttl_seconds" //nolint:gosec // setting key, not a credential
	KeySecretProviderMaxRPS      = "secrets.provider_max_rps"           //nolint:gosec // setting key, not a credential
	KeySecretProviderMaxResponse = "secrets.provider_max_response_kib"  //nolint:gosec // setting key, not a credential
)

External secret provider (Doppler, Infisical, 1Password) read tunables.

View Source
const (
	KeySecretRefMaxRef      = "secrets.ref_max_ref_bytes"  //nolint:gosec // setting key, not a credential
	KeySecretRefMaxConn     = "secrets.ref_max_conn_bytes" //nolint:gosec // setting key, not a credential
	KeySecretRefMaxPath     = "secrets.ref_max_path_bytes" //nolint:gosec // setting key, not a credential
	KeySecretRefMaxSegments = "secrets.ref_max_path_depth" //nolint:gosec // setting key, not a credential
	KeySecretRefMaxKey      = "secrets.ref_max_key_bytes"  //nolint:gosec // setting key, not a credential
)

Length limits for secret:// references and connection names.

View Source
const (
	SelfHeartbeatMinInterval = 10
	SelfHeartbeatMaxInterval = 86400
)

Bounds of the dead man's switch interval, in seconds.

View Source
const (
	KeyAlertingSelfHeartbeatURL      = "alerting.self_heartbeat_url"
	KeyAlertingSelfHeartbeatInterval = "alerting.self_heartbeat_interval"
)

Keys for the outbound dead man's switch ping.

View Source
const (
	KeyAPIMaxHeaderBytes         = "api.max_header_bytes"
	KeyIngressBodyReadTimeoutSec = "ingress.body_read_timeout_seconds"
	KeyIngressMaxRequestsPerIP   = "ingress.max_requests_per_ip"
)

Registered keys for request size and connection limits on the API server and the ingress edge.

View Source
const (
	KeySpoolMaxAgeSeconds  = "spool.max_age_seconds"
	KeySpoolQuotaBytes     = "spool.quota_bytes"
	KeyAPIExpensiveReadTTL = "api.expensive_read_ttl"
)

Upload spool and expensive-read cache keys. 0 keeps the value the env seed gives.

View Source
const (
	KeyIaCApplyEnabled           = "iac.apply_enabled"
	KeyIaCV1HashAccepted         = "iac.v1_hash_accepted"
	KeyStacksSoloSelfApprove     = "stacks.solo_self_approve"
	KeyStackLockTTL              = "stacks.lock_ttl"
	KeyStackLockRenewFraction    = "stacks.lock_renew_fraction"
	KeyStackApprovalTTL          = "stacks.approval_ttl"
	KeyStackOIDCTTL              = "stacks.oidc_ttl"
	KeyStackDriftIntervalSecs    = "stacks.drift_interval_seconds"
	KeyStackDriftSummaryMax      = "stacks.drift_summary_max"
	KeyStackDriftRotationMinutes = "stacks.drift_rotation_minutes"
)

Registered keys for stack and IaC apply. Env names stay as seeds; call sites still read env until each slice moves them to the registry.

View Source
const (
	KeyStackSyncTickSecs        = "stacks.sync_tick_seconds"
	KeyStackSyncMinIntervalSecs = "stacks.sync_min_interval_seconds"
	KeyStackSyncMaxRepoMB       = "stacks.sync_max_repo_mb"
	KeyStackSyncFetchTimeout    = "stacks.sync_fetch_timeout_seconds"
	KeyStackSyncMaxFiles        = "stacks.sync_max_files"
	KeyStackSyncMaxFileKB       = "stacks.sync_max_file_kb"
	KeyStackSyncRefreshMinSecs  = "stacks.sync_refresh_min_seconds"
	KeyStackSyncMinFreeMB       = "stacks.sync_min_free_mb"
	KeyStackSyncWebhookMaxKB    = "stacks.sync_webhook_max_body_kb"
	KeyStackSyncSparseWatchMS   = "stacks.sync_sparse_watch_ms"
)

Registered keys for the plan only git sync of stacks.

View Source
const (
	KeyDiskLowFreeMB      = "disk.low_free_mb"
	KeyDiskCriticalFreeMB = "disk.critical_free_mb"
	KeyDiskReserveMB      = "disk.reserve_mb"
	KeyMetricsRetention   = "telemetry.metrics_retention"
	KeyLogsRetention      = "telemetry.logs_retention"
	KeyLogBudgetMB        = "telemetry.log_budget_mb"
	KeyMonitorRawRetained = "monitors.raw_retention"

	KeyRetentionBatchRows   = "telemetry.retention_batch_rows"
	KeyRetentionSweepBudget = "telemetry.retention_sweep_budget"
	KeyRetentionBatchPause  = "telemetry.retention_batch_pause"
)

Disk guard and telemetry storage setting keys.

View Source
const (
	KeyStorageLowFreePercent      = "storage.low_free_percent"
	KeyStorageCriticalFreePercent = "storage.critical_free_percent"
)

Free-space percent floors the Storage page uses to judge disk health.

View Source
const (
	KeyTemplatesImportMaxBytes = "templates.import_max_bytes"
	KeyTemplatesImportTimeout  = "templates.import_timeout"
)

Template import by URL keys.

View Source
const (
	KeyTokensReminderWindows  = "credential_expiry.reminder_windows_days" //nolint:gosec // setting key, not a credential
	KeyTokensReminderInterval = "credential_expiry.reminder_interval"     //nolint:gosec // setting key, not a credential
	KeyTokensRotationGrace    = "credential_expiry.rotation_grace"        //nolint:gosec // setting key, not a credential

)

Token expiry reminders, rotation grace and git credential renewal.

View Source
const (
	KeyTokensDefaultTTLDays  = "tokens.default_ttl_days"  //nolint:gosec // setting key, not a credential
	KeyTokensUnusedAlertDays = "tokens.unused_alert_days" //nolint:gosec // setting key, not a credential

	KeyTokensSiteDeployMaxDays = "tokens.site_deploy_max_days" //nolint:gosec // setting key, not a credential

	KeyTokensExpiryWarningDays      = "tokens.expiry_warning_days"          //nolint:gosec // setting key, not a credential
	KeyTokensSystemRotationLeadMins = "tokens.system_rotation_lead_minutes" //nolint:gosec // setting key, not a credential
)

Token hygiene settings. Both default to 0 so an existing install behaves as before.

View Source
const (
	KeyProjectCloneMaxApps           = "projects.clone_max_apps"
	KeyProjectClonePlaceholderDomain = "projects.clone_placeholder_domain"
	KeyPreviewMigrateTimeout         = "previews.migrate_timeout"
	KeyPreviewMigrateWait            = "previews.migrate_wait"
	KeyCDNPurgeHistory               = "cdn.purge_history"
	KeyDeployExplainLogLines         = "deploy.explain_log_lines"
	KeyUpdateOfferedChannels         = "updates.offered_channels"
	KeyNetworkGCMaxRemovals          = "network.gc_max_removals"
	KeyMeshReadyRetrySeconds         = "mesh.ready_retry_seconds"
	KeyAppsContainersInspectTimeout  = "apps.containers_inspect_timeout"
	KeyAppsSummaryCacheSeconds       = "apps.summary_cache_seconds"
	KeyAppsSummaryCacheMaxEntries    = "apps.summary_cache_max_entries"
	KeyAppsSummaryTimeout            = "apps.summary_timeout"
	KeyBackupsComposeRestoreTimeout  = "backups.compose_restore_timeout"
	KeyBackupsScheduleRetainDefault  = "backups.schedule_retain_default"
	KeyBackupsDrillIntervalHours     = "backups.drill_interval_hours"
	KeyBackupsDrillRetentionDays     = "backups.drill_retention_days"
	KeyBackupsDrillTimeout           = "backups.drill_timeout"
	KeyBackupsDrillMaxConcurrent     = "backups.drill_max_concurrent"
	KeyBackupsDrillReservedScheduled = "backups.drill_reserved_scheduled"
)

Tunables that used to be env-only. The env name stays as the seed.

View Source
const (
	KeyUpdatesCheckBackoffMax = "updates.check_backoff_max"
	KeyUpdatesCheckAlertAfter = "updates.check_alert_after"
	KeyUpdatesFallbackBaseURL = "updates.fallback_release_base_url"
)

Keys that keep automatic updates reliable when the release source is slow or blocked.

View Source
const (
	KeyCloudVaultAuth      = "cloud.vault.auth_method"
	KeyCloudVaultAuthMount = "cloud.vault.aws_auth_mount"
	KeyCloudVaultAuthRole  = "cloud.vault.aws_auth_role"
	KeyCloudVaultServerID  = "cloud.vault.server_id_header"
)

How a vault_aws account without its own token reference signs in to Vault.

View Source
const (
	KeyVaultCacheTTL        = "secrets.vault_cache_ttl_seconds"   //nolint:gosec // setting key, not a credential
	KeyVaultAllowPrivate    = "vault.allow_private_address"       //nolint:gosec // setting key, not a credential
	KeyVaultTokenRenewAfter = "secrets.vault_token_renew_percent" //nolint:gosec // setting key, not a credential
)

HashiCorp Vault and OpenBao client tunables.

View Source
const (
	KeyVolumesUsageAlertPercent    = "volumes.usage_alert_percent"
	KeyVolumesSizeHistoryRetention = "volumes.size_history_retention"
)

Registered keys for volume usage alerts and the volume size history.

View Source
const (
	KeyVolumesTransferMaxBytes = "volumes.transfer_max_bytes"
	KeyVolumesTransferTimeout  = "volumes.transfer_timeout"
	KeyVolumesImportOverwrite  = "volumes.import_overwrite"
	// KeyVolumesTransferMaxConcurrent bounds uploads staged at once on a control plane.
	KeyVolumesTransferMaxConcurrent = "volumes.transfer_max_concurrent"
	// KeyVolumesTransferSpoolDir names the folder under the data dir that stages import archives.
	KeyVolumesTransferSpoolDir = "volumes.transfer_spool_dir"

	// DefaultVolumesTransferSpoolDir is the spool folder name under the data dir.
	DefaultVolumesTransferSpoolDir = "volume-transfer"
)

Registered keys for moving a volume's files in and out as an archive.

View Source
const (
	KeyAuditLogDays        = "retention.audit_log_days"
	KeyAuditSecurityDays   = "retention.audit_security_days"
	KeyEmailLogDays        = "retention.email_log_days"
	KeyWebhookDeliveryDays = "retention.webhook_delivery_days"
	KeyEventWebhookDays    = "retention.event_webhook_days"
	KeyAlertHistoryDays    = "retention.alert_history_days"
	KeyAuthExpiredDays     = "retention.auth_expired_days"
	KeyAIHistoryDays       = "retention.ai_history_days"
	KeyRestoreHistoryDays  = "retention.restore_history_days"
	KeyProbeAttemptDays    = "retention.probe_attempt_days"
	KeyAppHistoryDays      = "retention.app_history_days"
	KeyForgeStatusDays     = "retention.forge_status_days"
	KeyUsageCostDays       = "retention.usage_cost_days"
	KeyStatusIncidentDays  = "retention.status_incident_days"
	KeyDeployAttemptDays   = "retention.deploy_attempt_days"
	KeyNodeEventDays       = "retention.node_event_days"
	KeyMaxRowsPerApp       = "retention.max_rows_per_app"
	KeyCleanupInterval     = "cleanup.interval"
	KeyCleanupEnabled      = "cleanup.enabled"
	AuditLogFloorDays      = 90
	AuditSecurityFloorDays = 365
	CleanupMinInterval     = 15 * time.Minute
)

Retention and cleanup scheduler keys. Each retention key is the runtime form of an older env var, which stays as that setting's env override.

View Source
const AppImageKeepMin = 2

AppImageKeepMin is the smallest per-app keep, so the previous successful release survives.

View Source
const AuthRateLimitFloor = 10

AuthRateLimitFloor keeps the credential limiter high enough for an admin to sign in, MFA included, and low enough to stop stuffing.

View Source
const DefaultPoolerImage = "edoburu/pgbouncer:v1.26.1-p0"

DefaultPoolerImage is an exact version tag of a pgbouncer image that speaks the env contract the pooler reconciler writes.

View Source
const DefaultSizePresets = "small=0.5:512Mi,medium=1:1Gi,large=2:2Gi,xlarge=4:4Gi"

DefaultSizePresets seeds the table when nothing is saved or in env.

View Source
const DigestScheduleOff = "off"

DigestScheduleOff is the value that turns the weekly digest off.

View Source
const ImagesPruneOff = "off"

ImagesPruneOff turns the scheduled prune off, which is the long-standing behavior.

View Source
const JobQueueMax = 10000

JobQueueMax bounds the job ping queue so its backing channel has a fixed size while the limit stays live.

View Source
const KeyAPIConditionalGet = "api.conditional_get"

KeyAPIConditionalGet switches ETag and 304 answers on read JSON endpoints.

View Source
const KeyAPIConditionalGetMaxBytes = "api.conditional_get_max_bytes"

KeyAPIConditionalGetMaxBytes caps the body buffered to compute an ETag.

View Source
const KeyAPIRouteStatBound = "api.route_stat_bound"

KeyAPIRouteStatBound caps how many distinct API routes the hot routes list tracks.

View Source
const (
	KeyAccessLogSize = "telemetry.access_log_size"
)

KeyAccessLogSize is the per-route ring size of the in-memory recent-requests log.

View Source
const KeyAccountPreferencesMaxBytes = "account.preferences_max_bytes"

KeyAccountPreferencesMaxBytes caps one saved per-user preference document.

View Source
const KeyAlertsNotifyOnSleep = "alerts.notify_on_sleep"

KeyAlertsNotifyOnSleep lets alerts through for apps that sleep when idle.

View Source
const KeyAlertsRenotifyInterval = "alerts.renotify_interval"

KeyAlertsRenotifyInterval repeats a still-firing alert until it is read in the Inbox.

View Source
const KeyAppsEnvApplyOnSet = "apps.env_apply_on_set"

KeyAppsEnvApplyOnSet makes env set and import restart the app right away.

View Source
const KeyAppsMaxReplicasPerService = "apps.max_replicas_per_service"

KeyAppsMaxReplicasPerService caps the replica count one service may be given.

View Source
const KeyAuthSSOAutoRedirect = "auth.sso_auto_redirect"

KeyAuthSSOAutoRedirect sends the sign-in page straight to the only enabled single sign-on provider.

View Source
const KeyBackupDefaultRetentionHours = "backup.default_retention_hours"

KeyBackupDefaultRetentionHours is the default backup retention window in hours.

View Source
const (
	KeyBackupLocalRoot = "backup.local_root"
)

Backup root key.

View Source
const KeyBuildFairShare = "build.fair_share"

KeyBuildFairShare makes queued builds take turns across projects.

View Source
const KeyBuildReuseUnchanged = "build.reuse_unchanged"

KeyBuildReuseUnchanged turns image reuse for an unchanged commit and build settings on or off.

View Source
const KeyBuildRunnerMinDiskMB = "build.runner_min_disk_free_mb"

KeyBuildRunnerMinDiskMB is the free disk a build node needs to be picked for a build.

View Source
const KeyBuildSettingValueMaxBytes = "builds.setting_value_max_bytes"

KeyBuildSettingValueMaxBytes caps each per-app build setting value.

View Source
const KeyBuildStageLogTailLines = "build.stage_log_tail_lines"

KeyBuildStageLogTailLines sizes the log tail kept for each build stage.

View Source
const KeyBuildsMemoryLimitMB = "builds.memory_limit_mb"

KeyBuildsMemoryLimitMB caps the memory one build may use; 0 means auto.

View Source
const KeyBulkMaxPauseSeconds = "bulk.max_pause_seconds"

KeyBulkMaxPauseSeconds caps the pause between waves of a staggered bulk action.

View Source
const KeyCertificatesWeeklyIssueWarn = "certificates.weekly_issue_warn"

KeyCertificatesWeeklyIssueWarn is the certificate count in seven days at which the budget meter warns.

View Source
const KeyCloudConnectionsEnabled = "cloud.connections_enabled"

KeyCloudConnectionsEnabled gates the cloud connections API and CLI (preview).

View Source
const KeyComposeDependsOnTimeout = "compose.depends_on_timeout"

KeyComposeDependsOnTimeout bounds how long a compose service waits on a depends_on dependency.

View Source
const KeyConnectionBindingRuleValueMaxLen = "connections.binding_rule_value_max_len"

KeyConnectionBindingRuleValueMaxLen caps one string inside binding rules, such as a branch or a path.

View Source
const KeyConnectionBindingRulesMaxBytes = "connections.binding_rules_max_bytes"

KeyConnectionBindingRulesMaxBytes caps the rules JSON a binding may store.

View Source
const (
	KeyConnectionExpiryWarn = "connections.expiry_warn"
)

KeyConnectionExpiryWarn is how far ahead the integrations hub flags a connection as expiring.

View Source
const KeyDBOptimizeInterval = "store.optimize_interval"

KeyDBOptimizeInterval is how often the control plane database refreshes planner statistics.

View Source
const KeyDBParamsMaxConnections = "databases.params_max_connections"

KeyDBParamsMaxConnections caps the connection parameters a database owner may stage (max_connections, maxclients, maxConns). The env name only seeds the default.

View Source
const KeyDBParamsMaxMemoryMB = "databases.params_max_memory_mb"

KeyDBParamsMaxMemoryMB caps memory parameters of a database that has no memory limit.

View Source
const KeyDNSAuthorityWarnTTL = "dns.authority_warn_ttl_seconds"

KeyDNSAuthorityWarnTTL is the answer TTL above which who-answers reports slow failover.

View Source
const KeyDNSVerifyTokenOnSave = "dns.verify_provider_on_save" //nolint:gosec // setting key, not a credential

KeyDNSVerifyTokenOnSave makes a DNS provider credential save also test it.

View Source
const (
	KeyDatabaseImportMaxBytes = "databases.import_max_bytes"
)

KeyDatabaseImportMaxBytes caps one dump uploaded to a managed database.

View Source
const KeyDatabasesPoolerImage = "databases.pooler_image"

KeyDatabasesPoolerImage is the image the managed Postgres pooler runs.

View Source
const KeyDeployApprovalMaxRequired = "deploy.approval_max_required"

KeyDeployApprovalMaxRequired caps how many distinct approvers an environment may require, so a typo cannot lock deploys out.

View Source
const KeyDeployCoalesceWindow = "deploys.coalesce_window"

KeyDeployCoalesceWindow is the window in which a second deploy of the same commit is folded into the running one.

View Source
const KeyDeployMaxConcurrentPerProject = "deploy.max_concurrent_per_project"

KeyDeployMaxConcurrentPerProject caps simultaneous builds inside one project.

View Source
const KeyDeployOrphanGraceSeconds = "deploy.orphan_grace_seconds"

KeyDeployOrphanGraceSeconds is how old a running deploy must be before cancel may treat it as orphaned.

View Source
const KeyDomainsAuthGateTimeout = "domains.auth_gate_timeout"

KeyDomainsAuthGateTimeout is the default auth gate subrequest timeout.

View Source
const KeyDomainsBatchMaxItems = "domains.batch_max_items"

KeyDomainsBatchMaxItems caps the items of one POST /api/v1/domains/batch.

View Source
const KeyDomainsHTTPSAttemptsPerHour = "domains.https_attempts_per_hour"

KeyDomainsHTTPSAttemptsPerHour caps production HTTPS enable attempts per hour.

View Source
const KeyDomainsParkedRetentionDays = "domains.parked_retention_days"

KeyDomainsParkedRetentionDays is how long a parked domain may sit before the hourly job forgets it.

View Source
const KeyDomainsRollbackWindowMinutes = "domains.rollback_window_minutes"

KeyDomainsRollbackWindowMinutes bounds how long a domain change can be rolled back.

View Source
const KeyFirewallConfirmWindow = "firewall.confirm_window"

KeyFirewallConfirmWindow is how long a dashboard or CLI port restriction waits for confirmation.

View Source
const KeyGitSSHScanAllowInternal = "git.ssh_scan_allow_internal"

KeyGitSSHScanAllowInternal lists internal networks a host key scan may dial.

View Source
const KeyImagesPullConcurrency = "images.pull_concurrency"

KeyImagesPullConcurrency caps how many distinct image pulls run at once on a node.

View Source
const KeyImagesRemoveMaxPerRequest = "images.remove_max_per_request"

KeyImagesRemoveMaxPerRequest caps how many images one explicit removal request may name.

View Source
const KeyMajorUpgradeRestorePointMaxAgeHours = "databases.major_upgrade_restore_point_max_age_hours"

KeyMajorUpgradeRestorePointMaxAgeHours is how old the newest successful backup may be before the major upgrade check answers no-go.

View Source
const KeyMonitorsEnabled = "monitors.enabled"

KeyMonitorsEnabled turns the uptime monitor engine on or off without a restart.

View Source
const KeyNetOutboundTimeout = "net.outbound_timeout"

KeyNetOutboundTimeout bounds every shared outbound HTTP request.

View Source
const KeyNextjsGenerateActionsKey = "nextjs.generate_actions_key"

KeyNextjsGenerateActionsKey turns on the one-time Server Actions key for wizard-created Next.js apps.

View Source
const KeyNextjsMemoryFloorMB = "nextjs.memory_floor_mb"

KeyNextjsMemoryFloorMB is the memory limit under which the doctor warns about Next.js apps.

View Source
const KeyNodesProtectedTaintKeys = "nodes.protected_taint_keys"

KeyNodesProtectedTaintKeys lists taint keys whose removal or loosening counts as weakening.

View Source
const KeyOnboardingEnabled = "onboarding.enabled"

KeyOnboardingEnabled turns the first-run onboarding flow on or off for everyone.

View Source
const KeyOnboardingRestoreReminderDays = "onboarding.restore_reminder_days"

KeyOnboardingRestoreReminderDays is how many days after onboarding starts the dashboard nudges a restore test.

View Source
const KeyPagesAnalyticsRetentionDays = "pages.analytics_retention_days"

KeyPagesAnalyticsRetentionDays caps the longest Pages analytics range served.

View Source
const KeyPagesImageResize = "pages.image_resize"

KeyPagesImageResize turns on the on-demand image resize route for Pages sites.

View Source
const KeyPagesImageResizeCacheBytes = "pages.image_resize_cache_bytes"

KeyPagesImageResizeCacheBytes caps the memory held by resized variants.

View Source
const KeyPagesImageResizeMaxPixels = "pages.image_resize_max_pixels"

KeyPagesImageResizeMaxPixels caps the decoded source pixel count, which bounds memory.

View Source
const KeyPagesImageResizeMaxSourceBytes = "pages.image_resize_max_source_bytes"

KeyPagesImageResizeMaxSourceBytes caps the source image size that is decoded.

View Source
const KeyPagesImageResizeMaxWidth = "pages.image_resize_max_width"

KeyPagesImageResizeMaxWidth caps the width a resize request may ask for.

View Source
const KeyPagesPreviewMaxPerSite = "pages.preview_max_per_site"

KeyPagesPreviewMaxPerSite caps preview sites kept per Pages site; 0 keeps them all.

View Source
const KeyPagesServingWait = "pages.serving_wait"

KeyPagesServingWait bounds how long a Pages promote or rollback waits for the new files to be served.

View Source
const KeyPipelinesOIDCListenPort = "pipelines.oidc_listen_port"

KeyPipelinesOIDCListenPort is the port of the job OIDC endpoint on the bridge gateway.

View Source
const KeyPreviewSkipDrafts = "deploy.preview_skip_drafts"

KeyPreviewSkipDrafts skips preview deploys for draft pull requests.

View Source
const KeyProxyCertWait = "ingress.proxy_cert_wait"

KeyProxyCertWait is how long a managed proxy route may lack a certificate before the diagnosis stops saying "still requesting".

View Source
const (
	KeyReadConns = "store.read_connections"
)

KeyReadConns sizes the control plane database read pool.

View Source
const KeyReconcileEventDriven = "reconcile.event_driven"

KeyReconcileEventDriven lets a reconcile pass skip apps that settled and saw no change.

View Source
const KeyReconcileLagWarnSeconds = "reconcile.lag_warn_seconds"

KeyReconcileLagWarnSeconds is how long a desired change may wait before a reconciler counts as lagging.

View Source
const KeyReconcileResyncSeconds = "reconcile.resync_seconds"

KeyReconcileResyncSeconds is the safety-net interval between full reconcile passes.

View Source
const KeyRegistryMirrorPrefix = "registry.mirror_prefix"

KeyRegistryMirrorPrefix is the pull-through prefix for the agent and BuildKit images.

View Source
const KeyRetentionRecentlyDeletedDays = "retention.recently_deleted_days"

KeyRetentionRecentlyDeletedDays is how long a deleted app or database can be restored.

View Source
const KeyScheduledTasksHistoryKeep = "scheduled_tasks.history_keep"

KeyScheduledTasksHistoryKeep caps the run history rows kept per scheduled task.

View Source
const KeyScheduledTasksMaxOutputBytes = "scheduled_tasks.max_output_bytes"

KeyScheduledTasksMaxOutputBytes bounds the output tail kept per run.

View Source
const KeySecurityDockerGuardMaxItems = "security.docker_guard_max_items"

KeySecurityDockerGuardMaxItems caps how many per-rule Docker guard items the attention feed lists.

View Source
const KeySecurityProtectedSilenceMaxDays = "security.protected_silence_max_days"

KeySecurityProtectedSilenceMaxDays caps how long a root admin may mute a security-integrity issue.

View Source
const KeyShellSectionTimeout = "shell.section_timeout"

KeyShellSectionTimeout bounds each section of the shell bootstrap aggregate.

View Source
const KeySizePresets = "apps.size_presets"

KeySizePresets holds the named resource sizes offered for apps and databases.

View Source
const KeyStatusTemplatesMax = "status_page.templates_max"

KeyStatusTemplatesMax caps saved status page incident templates.

View Source
const KeyStorageLargeUnmanagedImageMB = "storage.large_unmanaged_image_mb"

KeyStorageLargeUnmanagedImageMB is the size at which the Storage page marks an unmanaged image as large.

View Source
const KeyTemplatesCapNetAdmin = "templates.capability_net_admin_enabled"

KeyTemplatesCapNetAdmin gates the Elevated net_admin capability class.

View Source
const KeyTemplatesFileInputMaxBytes = "templates.file_input_max_bytes"

KeyTemplatesFileInputMaxBytes caps one config file an install form supplies.

View Source
const KeyTemplatesFirstBootMaxSeconds = "templates.first_boot_max_seconds"

KeyTemplatesFirstBootMaxSeconds caps a template's own first_boot_seconds.

View Source
const KeyUIOutboundUTM = "ui.outbound_utm"

KeyUIOutboundUTM controls whether the dashboard tags outbound links to third party sites with UTM parameters.

View Source
const KeyUpgradeVerifyBackup = "upgrade.verify_backup"

KeyUpgradeVerifyBackup turns on the scratch restore of the pre-upgrade backup.

View Source
const PasswordMinLengthFloor = 8

PasswordMinLengthFloor is the weakest length any policy may reach, enforced in code as well.

Variables

View Source
var BackupRetentionPresets = []int{0, 24, 48, 168, 720, 1440, 2160}

BackupRetentionPresets are the hour counts an operator may pick: 1, 2, 7, 30, 60 and 90 days; 0 keeps backups.

View Source
var ErrSensitiveKey = errors.New("runtimesettings: sensitive setting cannot be written by this caller")

ErrSensitiveKey is returned when a caller that may not write credentials targets a sensitive setting.

View Source
var ErrUnknownKey = errors.New("runtimesettings: unknown setting")

ErrUnknownKey is returned for a key that is not registered.

View Source
var ErrWeakeningNotConfirmed = errors.New("runtimesettings: change weakens a security protection and was not confirmed")

ErrWeakeningNotConfirmed is returned when a write weakens a protection and the caller did not confirm it.

View Source
var RetentionPresets = []int{0, 30, 60, 90, 180, 365}

RetentionPresets are the day counts a cleanup policy offers; 0 keeps the data forever.

View Source
var TokenRetentionPresets = []int{0, 30, 60, 90, 365}

TokenRetentionPresets are the day counts an operator may pick; 0 keeps tokens forever.

Functions

func BindRolloutDefaults

func BindRolloutDefaults(s *Service)

BindRolloutDefaults makes the rollout and canary env defaults read these settings. Only the service that handles settings writes may call it.

func BindRuntimeLimits

func BindRuntimeLimits(s *Service)

BindRuntimeLimits points the spec bounds at s. Only the service that handles settings writes may call it, since another instance would cache saved rows and miss later changes.

func CheckAppImageKeep

func CheckAppImageKeep(n int) error

CheckAppImageKeep accepts 0 (follow the global count) or AppImageKeepMin up to the ceiling.

func CheckAppImageKeepCount

func CheckAppImageKeepCount(n int) error

CheckAppImageKeepCount refuses a map with more apps than the settings row may hold.

func ClampBuildCacheReclaimTimeout

func ClampBuildCacheReclaimTimeout(d time.Duration) time.Duration

ClampBuildCacheReclaimTimeout forces an env seeded timeout into its safe range.

func ClampLimit

func ClampLimit(key string, n int) int

ClampLimit forces n into the safe range of a limit setting; boot code uses it so nothing starts below a floor.

func ClampMeshApplyRetries

func ClampMeshApplyRetries(n int) int

ClampMeshApplyRetries bounds a mesh.apply_retries value to its registered range.

func ClampMeshApplyRetryDelay

func ClampMeshApplyRetryDelay(d time.Duration) time.Duration

ClampMeshApplyRetryDelay bounds a mesh.apply_retry_delay value to its registered range.

func ClampMeshApplyTimeout

func ClampMeshApplyTimeout(d time.Duration) time.Duration

ClampMeshApplyTimeout bounds a mesh.apply_timeout value to its registered range.

func ClampMeshWakeDebounce

func ClampMeshWakeDebounce(d time.Duration) time.Duration

ClampMeshWakeDebounce bounds a mesh.wake_debounce value to its registered range.

func DurationEnvToDays

func DurationEnvToDays(allowZero bool) func(string) (string, error)

DurationEnvToDays converts a legacy duration env value (a Go duration such as 720h, or Nd) into whole days, rounding up so a window never shrinks. allowZero says whether 0 means keep forever.

func MinDaysCheck

func MinDaysCheck(floor int) func(string) error

MinDaysCheck rejects a positive day count below floor. 0 (keep forever) always passes.

func MinDurationCheck

func MinDurationCheck(floor time.Duration) func(string) error

MinDurationCheck rejects a duration below floor.

func NonNegativeCheck

func NonNegativeCheck(canonical string) error

NonNegativeCheck rejects a negative count; 0 means no limit.

func ParseAppImageKeepOverrides

func ParseAppImageKeepOverrides(raw string) (map[string]int, error)

ParseAppImageKeepOverrides reads the per-app keep map; an empty value is no overrides.

func ParseBackupWindow

func ParseBackupWindow(v string) (start, end int, ok bool, err error)

ParseBackupWindow reads "HH:MM-HH:MM" (server local time) into start and end minutes of the day. An empty value means no window. A window may wrap midnight, such as 22:00-05:00.

func ParseDigestSchedule

func ParseDigestSchedule(v string) (weekday int, hour int, on bool, err error)

ParseDigestSchedule reads "off" or "<day>@<hour>" (day mon..sun, hour 0..23, UTC), e.g. "mon@08".

func ParseDuration

func ParseDuration(s string) (time.Duration, error)

ParseDuration parses a positive duration.

func ParseJSON

func ParseJSON(d Definition, raw json.RawMessage) (string, error)

ParseJSON validates an API value (bool, string, number or string array) and returns the canonical stored form.

func ParseK8sNamespaces

func ParseK8sNamespaces(v string) []string

ParseK8sNamespaces splits a comma list, dropping blanks.

func PositiveDaysEnv

func PositiveDaysEnv(raw string) (string, error)

PositiveDaysEnv accepts only a positive whole-day env value, matching the old audit sweepers where 0 meant "use the default".

func Register

func Register(d Definition)

Register adds a setting to the registry. It panics on a malformed or duplicate definition so a bad registration fails at process start.

func ValidK8sQuantity

func ValidK8sQuantity(v string) bool

ValidK8sQuantity reports whether v is a plain Kubernetes resource quantity.

Types

type AccessSearchLimits

type AccessSearchLimits struct {
	MaxWindow time.Duration
	MaxRows   int
	MaxTerm   int
	MaxScan   int
	MaxConc   int
}

AccessSearchLimits bounds one access log search, read fresh on every request.

type AdvisorSettings

type AdvisorSettings struct {
	Timeout             time.Duration
	MaxFindings         int
	UnusedIndexMinBytes int64
	SeqScanMinRows      int64
	SeqScanPercent      int
	DeadTuplePercent    int
	CacheHitMinPercent  int
	IdleInTxMinutes     int
	SlowStatementMs     int
	CacheTTL            time.Duration
}

AdvisorSettings are the advisor's live values, read fresh on every request.

type Apply

type Apply string

Apply says when a changed value takes effect.

const (
	ApplyLive    Apply = "live"
	ApplyRestart Apply = "restart"
)

Apply modes.

type Category

type Category string

Category groups settings in the dashboard.

const (
	CategorySecurity      Category = "security"
	CategoryNetworking    Category = "networking"
	CategoryDeploys       Category = "deploys"
	CategoryObservability Category = "observability"
	CategoryExperimental  Category = "experimental"
	CategoryRetention     Category = "retention"
)

Setting categories.

type CutoverGapSettings

type CutoverGapSettings struct {
	Window     time.Duration
	QueuedOver time.Duration
}

CutoverGapSettings are the live bounds of the cutover gap measurement.

type CutoverVerify

type CutoverVerify struct {
	CertWarnDays int
	CertFailDays int
	SlowTTFB     time.Duration
	HSTSMinAge   int
	Timeout      time.Duration
	MinInterval  time.Duration
}

CutoverVerify holds the verifier thresholds, forced into their safe ranges so a stray env seed can never turn a line off.

type DBViewerLimits

type DBViewerLimits struct {
	Timeout      time.Duration
	MaxRows      int
	MaxBytes     int
	MaxCellBytes int
	SchemaRows   int
	SQLBytes     int
	// MaxConcurrent bounds in-flight document browser reads per database and per principal.
	MaxConcurrent int
}

DBViewerLimits is the console's per-query bounds, read fresh on every request.

type Definition

type Definition struct {
	Key        string
	Category   Category
	Kind       Kind
	Default    string
	Env        string
	Apply      Apply
	Risk       Risk
	Onboarding bool
	// Sensitive masks the value in API responses and audit rows; required for credential-like settings.
	Sensitive   bool
	TitleKey    string
	DescKey     string
	Title       string
	Description string
	// AllowedInts limits an int setting to these values; empty accepts any integer.
	AllowedInts []int
	// CheckItem validates one string_list entry; nil accepts any non-empty entry.
	CheckItem func(item string) error
	// AllowedStrings limits a string setting to these values.
	AllowedStrings []string
	// CheckValue vets a canonical value on API writes only (floors and minimums); env and saved rows are not rechecked.
	CheckValue func(canonical string) error
	// EnvConvert rewrites the env value into this setting's unit before validation (for example a Go duration into days).
	EnvConvert func(raw string) (string, error)
	// EnvLoose lets an int setting take any non-negative env value, not only the presets, so existing deployments keep working.
	EnvLoose bool
	// FailClosed makes StringChecked fail instead of falling back to the default when a saved or env value is invalid.
	FailClosed bool
	// HigherIsWeaker marks an int limit where raising the value weakens a protection, so a raise asks for confirmation.
	HigherIsWeaker bool
	// StrengthOrder lists a string setting's allowed values from weakest to strongest, so WeakensTo can tell a downgrade.
	StrengthOrder []string
	// RemovalIsWeaker marks a string_list of protections, where dropping an entry weakens and adding one does not.
	RemovalIsWeaker bool
	// TrueIsWeaker marks a bool that opens something up when on, so turning it on asks for confirmation.
	TrueIsWeaker bool
}

Definition describes one setting. Default and values are in string form (bool "true", duration "10m", int "5", string_list as colon separated).

func Definitions

func Definitions() []Definition

Definitions returns a copy of the registry in registration order.

type Kind

type Kind string

Kind is the value type of a setting.

const (
	KindBool       Kind = "bool"
	KindDuration   Kind = "duration"
	KindStringList Kind = "string_list"
	KindInt        Kind = "int"
	KindString     Kind = "string"
)

Setting kinds.

type LogRuleLimits

type LogRuleLimits struct {
	EvalEvery time.Duration
	MaxWindow time.Duration
	MaxRows   int
	Samples   int
}

LogRuleLimits bounds one log rule evaluation.

type MetricsTiers

type MetricsTiers struct {
	RawRetention, Retention1m, Retention5m, Retention1h, Retention1d time.Duration
	RawRange, Range1m, Range5m, Range1h                              time.Duration
	MaxDBBytes                                                       int64
	Lag, RollupEvery, PruneEvery, RollupBudget                       time.Duration
}

MetricsTiers is the live view of the tier settings. The 5m and 1d fields, the 1h range and the budget are stored but nothing reads them until those tiers ship.

type PostmortemLimits

type PostmortemLimits struct {
	FieldMax  int
	ActionMax int
	BodyMax   int
}

PostmortemLimits bounds one postmortem write, read fresh on every request.

type PreviewRender

type PreviewRender struct {
	DefaultMode   string
	MaxConcurrent int
	MinInterval   int
	RenderTimeout int
	IdleStop      int
	MemoryMB      int
	CPUMillis     int
}

PreviewRender is the live render tuning for app card previews.

type Risk

type Risk string

Risk marks settings where a weaker value (off, wider, shorter) needs confirmation.

const (
	RiskNormal          Risk = "normal"
	RiskWeakensSecurity Risk = "weakens_security"
)

Risk levels.

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service resolves settings. A nil *Service resolves env then default only, so callers and tests without a database still get the secure defaults.

func New

func New(s Store, lookup func(string) (string, bool)) *Service

New builds a Service over the global registry. lookup defaults to os.LookupEnv.

func NewWithDefinitions

func NewWithDefinitions(s Store, lookup func(string) (string, bool), defs []Definition) *Service

NewWithDefinitions builds a Service over an explicit definition list.

func (*Service) AbuseLimits

func (s *Service) AbuseLimits(ctx context.Context) abuse.Limits

AbuseLimits builds the abuse limits from the saved settings, env seeds and defaults, so a caller re-reading it per pass sees a changed value without a restart. Restart-only keys return their boot value.

func (*Service) AccessLogRetention

func (s *Service) AccessLogRetention(ctx context.Context) time.Duration

AccessLogRetention returns the access log window forced into its range, so a stray env seed can never hide every record.

func (*Service) AccessSearchLimits

func (s *Service) AccessSearchLimits(ctx context.Context) AccessSearchLimits

AccessSearchLimits returns the live access log search bounds; a nil service serves env then defaults.

func (*Service) AckReviewed

func (s *Service) AckReviewed(ctx context.Context, actor string) error

AckReviewed marks the first-run security review as done.

func (*Service) Advisor

func (s *Service) Advisor(ctx context.Context) AdvisorSettings

Advisor reads every advisor setting.

func (*Service) All

func (s *Service) All(ctx context.Context) ([]Setting, error)

All returns every registered setting in registration order.

func (*Service) AnyPendingRestart

func (s *Service) AnyPendingRestart(ctx context.Context) (bool, error)

AnyPendingRestart reports whether a restart-kind setting differs from its boot value.

func (*Service) AuthGateTimeout

func (s *Service) AuthGateTimeout(ctx context.Context) time.Duration

AuthGateTimeout returns the saved default forced into its range, so a bad seed never disables the wait.

func (*Service) Bool

func (s *Service) Bool(ctx context.Context, key string) bool

Bool returns a bool setting; an unknown key or a non-bool kind yields false.

func (*Service) BuildkitFallbackTimeouts

func (s *Service) BuildkitFallbackTimeouts(ctx context.Context) (probe, ready, info, retry time.Duration)

BuildkitFallbackTimeouts returns the live timings for the managed builder fallback.

func (*Service) CaptureBoot

func (s *Service) CaptureBoot(ctx context.Context) error

CaptureBoot records the effective value of every restart-kind setting; the accessors keep returning it and pending_restart compares against it.

func (*Service) ContainerLogRotation

func (s *Service) ContainerLogRotation(ctx context.Context) (sizeMB, files int)

ContainerLogRotation returns the live rotation limits; 0 means unchanged.

func (*Service) CutoverGap

func (s *Service) CutoverGap(ctx context.Context) CutoverGapSettings

CutoverGap returns the live cutover gap settings; a nil service serves defaults.

func (*Service) CutoverVerify

func (s *Service) CutoverVerify(ctx context.Context) CutoverVerify

CutoverVerify reads the thresholds at call time.

func (*Service) DatabaseParamsMaxConnections

func (s *Service) DatabaseParamsMaxConnections(ctx context.Context) int

DatabaseParamsMaxConnections returns the live connection ceiling.

func (*Service) DatabaseParamsMaxMemoryMB

func (s *Service) DatabaseParamsMaxMemoryMB(ctx context.Context) int

DatabaseParamsMaxMemoryMB returns the live memory ceiling for unlimited databases.

func (*Service) DatabaseViewerLimits

func (s *Service) DatabaseViewerLimits(ctx context.Context) DBViewerLimits

DatabaseViewerLimits returns the live console limits; a nil service serves env then defaults.

func (*Service) Duration

func (s *Service) Duration(ctx context.Context, key string) time.Duration

Duration returns a duration setting.

func (*Service) FirewallConfirmWindow

func (s *Service) FirewallConfirmWindow(ctx context.Context) time.Duration

FirewallConfirmWindow reads the confirm window, forced into its safe range.

func (*Service) Get

func (s *Service) Get(ctx context.Context, key string) (Setting, error)

Get returns one resolved setting.

func (*Service) GitSubmodulesTimeout

func (s *Service) GitSubmodulesTimeout(ctx context.Context) time.Duration

GitSubmodulesTimeout returns the saved fetch timeout forced into its range.

func (*Service) Int

func (s *Service) Int(ctx context.Context, key string) int

Int returns an int setting.

func (*Service) Limit

func (s *Service) Limit(ctx context.Context, key string) int

Limit returns an int limit setting forced into its safe range. API writes are already range-checked; this also covers env seeds, which are only parsed, so a stray 0 or huge value can never disable a limit.

func (*Service) List

func (s *Service) List(ctx context.Context, key string) []string

List returns a string_list setting.

func (*Service) LogRuleLimits

func (s *Service) LogRuleLimits(ctx context.Context) LogRuleLimits

LogRuleLimits returns the live log rule bounds.

func (*Service) MetricsTiers

func (s *Service) MetricsTiers(ctx context.Context) MetricsTiers

MetricsTiers reads every tier setting; each call sees the latest saved value.

func (*Service) Onboarding

func (s *Service) Onboarding(ctx context.Context) ([]Setting, error)

Onboarding returns the settings flagged for the first-run review.

func (*Service) PagesAnalyticsRetentionDays

func (s *Service) PagesAnalyticsRetentionDays(ctx context.Context) int

PagesAnalyticsRetentionDays returns the saved retention in days.

func (*Service) PagesBuildLogLimits

func (s *Service) PagesBuildLogLimits(ctx context.Context) (int64, time.Duration)

PagesBuildLogLimits returns the saved log size cap in bytes and the retention.

func (*Service) PagesImageResize

func (s *Service) PagesImageResize(ctx context.Context) (on bool, maxWidth, maxSourceBytes, maxPixels, cacheBytes int)

PagesImageResize returns the live resize switch, the three source limits and the cache cap.

func (*Service) PagesProxyLimits

func (s *Service) PagesProxyLimits(ctx context.Context) (int64, time.Duration)

PagesProxyLimits returns the saved body cap in bytes and response timeout.

func (*Service) PagesServingWait

func (s *Service) PagesServingWait(ctx context.Context) time.Duration

PagesServingWait returns the saved wait for a promoted deploy to go live.

func (*Service) PostmortemLimits

func (s *Service) PostmortemLimits(ctx context.Context) PostmortemLimits

PostmortemLimits returns the live postmortem bounds; a nil service serves env then defaults.

func (*Service) PreviewRender

func (s *Service) PreviewRender(ctx context.Context) PreviewRender

PreviewRender returns the current values; a change applies to the next render.

func (*Service) ProxyCertWait

func (s *Service) ProxyCertWait(ctx context.Context) time.Duration

ProxyCertWait returns the wait forced into its range.

func (*Service) Reset

func (s *Service) Reset(ctx context.Context, key string) (Setting, error)

Reset deletes the saved value so env or the default applies again.

func (*Service) Reviewed

func (s *Service) Reviewed(ctx context.Context) (bool, error)

Reviewed reports whether the first-run security review was acknowledged.

func (*Service) Set

func (s *Service) Set(ctx context.Context, key string, raw json.RawMessage, actor string) (Setting, error)

Set validates raw and saves it. The returned error is a *ValidationError for a bad value.

func (*Service) Source

func (s *Service) Source(ctx context.Context, key string) string

Source reports whether a key's value is saved, from the environment, or the default.

func (*Service) String

func (s *Service) String(ctx context.Context, key string) string

String returns a string setting.

func (*Service) StringChecked

func (s *Service) StringChecked(ctx context.Context, key string) (string, error)

StringChecked returns a string setting for a security decision. Unlike String it errors, naming where the problem came from, when the saved settings cannot be read or a FailClosed setting holds an invalid value.

func (*Service) SystemTokenRotationLead

func (s *Service) SystemTokenRotationLead(ctx context.Context) time.Duration

SystemTokenRotationLead reads the rotation lead, forced into its safe range.

func (*Service) TemplatesImportTimeout

func (s *Service) TemplatesImportTimeout(ctx context.Context) time.Duration

TemplatesImportTimeout returns the saved timeout forced into its range.

func (*Service) TrustedProxyPreset

func (s *Service) TrustedProxyPreset(ctx context.Context) string

TrustedProxyPreset returns the stored preset, falling back to none for any unknown value.

func (*Service) ValidateForWrite

func (s *Service) ValidateForWrite(ctx context.Context, key string, raw json.RawMessage, opts WriteOptions) (string, error)

ValidateForWrite checks raw against key's type, range, enum and floor rules and the caller's permissions, returning the canonical value. Every writer goes through it.

func (*Service) VisitorHistoryRetention

func (s *Service) VisitorHistoryRetention(ctx context.Context) time.Duration

VisitorHistoryRetention returns the rollup window forced into its range; 0 means persistence is off.

func (*Service) VisitorSaltRotation

func (s *Service) VisitorSaltRotation(ctx context.Context) time.Duration

VisitorSaltRotation returns the salt period forced into its range.

func (*Service) WeakensOnReset

func (s *Service) WeakensOnReset(ctx context.Context, key string) bool

WeakensOnReset reports whether deleting the saved value would leave a weaker environment seed than the one in force now. Returning to the built-in default never needs confirmation, so only an explicit env seed is compared.

func (*Service) WeakensTo

func (s *Service) WeakensTo(ctx context.Context, key string, raw json.RawMessage) bool

WeakensTo reports whether saving raw would make a weakens_security setting weaker than it is now: a bool turned off, an allowlist cleared or widened, or a duration shortened.

type Setting

type Setting struct {
	Key            string          `json:"key"`
	Category       string          `json:"category"`
	Kind           string          `json:"kind"`
	Title          string          `json:"title"`
	Description    string          `json:"description"`
	Default        json.RawMessage `json:"default"`
	Value          json.RawMessage `json:"value"`
	Source         string          `json:"source"`
	Env            string          `json:"env"`
	Apply          string          `json:"apply"`
	Risk           string          `json:"risk"`
	Onboarding     bool            `json:"onboarding"`
	Sensitive      bool            `json:"sensitive"`
	AllowedValues  []int           `json:"allowed_values,omitempty"`
	AllowedStrings []string        `json:"allowed_strings,omitempty"`
	PendingRestart bool            `json:"pending_restart"`
	// WeakerThanDefault is true when a weakens_security setting now holds a weaker value than its default.
	WeakerThanDefault bool       `json:"weaker_than_default"`
	UpdatedAt         *time.Time `json:"updated_at"`
	UpdatedBy         string     `json:"updated_by"`
}

Setting is the wire shape of one resolved setting.

type SizePreset

type SizePreset struct {
	Name        string  `json:"name"`
	CPU         float64 `json:"cpu"`
	MemoryBytes int64   `json:"memory_bytes"`
}

SizePreset is one named CPU and memory size.

func ParseSizePresets

func ParseSizePresets(v string) ([]SizePreset, error)

ParseSizePresets reads name=cpu:memory pairs; it rejects duplicates, zero sizes and bad units.

type Store

type Store interface {
	ListRuntimeSettings(ctx context.Context) ([]store.RuntimeSettingRow, error)
	SetRuntimeSetting(ctx context.Context, key, value, actor string, now time.Time) error
	DeleteRuntimeSetting(ctx context.Context, key string) error
}

Store persists saved values; *store.DB satisfies it.

type ValidationError

type ValidationError struct {
	Key     string
	Message string
}

ValidationError is a rejected value, reported against the request's value field.

func (*ValidationError) Error

func (e *ValidationError) Error() string

type WriteOptions

type WriteOptions struct {
	ConfirmWeakening bool
	RefuseSensitive  bool
}

WriteOptions carries what the caller is allowed to do; the zero value is the strictest.

Source Files

Directories

Path Synopsis
Package registrymirror rewrites image references through an operator supplied pull-through prefix.
Package registrymirror rewrites image references through an operator supplied pull-through prefix.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL