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
- Variables
- func BindRolloutDefaults(s *Service)
- func BindRuntimeLimits(s *Service)
- func CheckAppImageKeep(n int) error
- func CheckAppImageKeepCount(n int) error
- func ClampBuildCacheReclaimTimeout(d time.Duration) time.Duration
- func ClampLimit(key string, n int) int
- func ClampMeshApplyRetries(n int) int
- func ClampMeshApplyRetryDelay(d time.Duration) time.Duration
- func ClampMeshApplyTimeout(d time.Duration) time.Duration
- func ClampMeshWakeDebounce(d time.Duration) time.Duration
- func DurationEnvToDays(allowZero bool) func(string) (string, error)
- func MinDaysCheck(floor int) func(string) error
- func MinDurationCheck(floor time.Duration) func(string) error
- func NonNegativeCheck(canonical string) error
- func ParseAppImageKeepOverrides(raw string) (map[string]int, error)
- func ParseBackupWindow(v string) (start, end int, ok bool, err error)
- func ParseDigestSchedule(v string) (weekday int, hour int, on bool, err error)
- func ParseDuration(s string) (time.Duration, error)
- func ParseJSON(d Definition, raw json.RawMessage) (string, error)
- func ParseK8sNamespaces(v string) []string
- func PositiveDaysEnv(raw string) (string, error)
- func Register(d Definition)
- func ValidK8sQuantity(v string) bool
- type AccessSearchLimits
- type AdvisorSettings
- type Apply
- type Category
- type CutoverGapSettings
- type CutoverVerify
- type DBViewerLimits
- type Definition
- type Kind
- type LogRuleLimits
- type MetricsTiers
- type PostmortemLimits
- type PreviewRender
- type Risk
- type Service
- func (s *Service) AbuseLimits(ctx context.Context) abuse.Limits
- func (s *Service) AccessLogRetention(ctx context.Context) time.Duration
- func (s *Service) AccessSearchLimits(ctx context.Context) AccessSearchLimits
- func (s *Service) AckReviewed(ctx context.Context, actor string) error
- func (s *Service) Advisor(ctx context.Context) AdvisorSettings
- func (s *Service) All(ctx context.Context) ([]Setting, error)
- func (s *Service) AnyPendingRestart(ctx context.Context) (bool, error)
- func (s *Service) AuthGateTimeout(ctx context.Context) time.Duration
- func (s *Service) Bool(ctx context.Context, key string) bool
- func (s *Service) BuildkitFallbackTimeouts(ctx context.Context) (probe, ready, info, retry time.Duration)
- func (s *Service) CaptureBoot(ctx context.Context) error
- func (s *Service) ContainerLogRotation(ctx context.Context) (sizeMB, files int)
- func (s *Service) CutoverGap(ctx context.Context) CutoverGapSettings
- func (s *Service) CutoverVerify(ctx context.Context) CutoverVerify
- func (s *Service) DatabaseParamsMaxConnections(ctx context.Context) int
- func (s *Service) DatabaseParamsMaxMemoryMB(ctx context.Context) int
- func (s *Service) DatabaseViewerLimits(ctx context.Context) DBViewerLimits
- func (s *Service) Duration(ctx context.Context, key string) time.Duration
- func (s *Service) FirewallConfirmWindow(ctx context.Context) time.Duration
- func (s *Service) Get(ctx context.Context, key string) (Setting, error)
- func (s *Service) GitSubmodulesTimeout(ctx context.Context) time.Duration
- func (s *Service) Int(ctx context.Context, key string) int
- func (s *Service) Limit(ctx context.Context, key string) int
- func (s *Service) List(ctx context.Context, key string) []string
- func (s *Service) LogRuleLimits(ctx context.Context) LogRuleLimits
- func (s *Service) MetricsTiers(ctx context.Context) MetricsTiers
- func (s *Service) Onboarding(ctx context.Context) ([]Setting, error)
- func (s *Service) PagesAnalyticsRetentionDays(ctx context.Context) int
- func (s *Service) PagesBuildLogLimits(ctx context.Context) (int64, time.Duration)
- func (s *Service) PagesImageResize(ctx context.Context) (on bool, maxWidth, maxSourceBytes, maxPixels, cacheBytes int)
- func (s *Service) PagesProxyLimits(ctx context.Context) (int64, time.Duration)
- func (s *Service) PagesServingWait(ctx context.Context) time.Duration
- func (s *Service) PostmortemLimits(ctx context.Context) PostmortemLimits
- func (s *Service) PreviewRender(ctx context.Context) PreviewRender
- func (s *Service) ProxyCertWait(ctx context.Context) time.Duration
- func (s *Service) Reset(ctx context.Context, key string) (Setting, error)
- func (s *Service) Reviewed(ctx context.Context) (bool, error)
- func (s *Service) Set(ctx context.Context, key string, raw json.RawMessage, actor string) (Setting, error)
- func (s *Service) Source(ctx context.Context, key string) string
- func (s *Service) String(ctx context.Context, key string) string
- func (s *Service) StringChecked(ctx context.Context, key string) (string, error)
- func (s *Service) SystemTokenRotationLead(ctx context.Context) time.Duration
- func (s *Service) TemplatesImportTimeout(ctx context.Context) time.Duration
- func (s *Service) TrustedProxyPreset(ctx context.Context) string
- func (s *Service) ValidateForWrite(ctx context.Context, key string, raw json.RawMessage, opts WriteOptions) (string, error)
- func (s *Service) VisitorHistoryRetention(ctx context.Context) time.Duration
- func (s *Service) VisitorSaltRotation(ctx context.Context) time.Duration
- func (s *Service) WeakensOnReset(ctx context.Context, key string) bool
- func (s *Service) WeakensTo(ctx context.Context, key string, raw json.RawMessage) bool
- type Setting
- type SizePreset
- type Store
- type ValidationError
- type WriteOptions
Constants ¶
const ( SourceSaved = "saved" SourceEnv = "env" SourceDefault = "default" )
Source says where an effective value came from.
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.
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" KeyAbuseSuggestBurstSecs = "abuse.suggest_burst_seconds" )
Registered keys for the per-app abuse defense limits.
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.
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.
const ( KeyAlertsAdvisoryNotify = "alerts.advisory_notify" KeyAlertsAdvisoryMinSeverity = "alerts.advisory_min_severity" )
Advisory alert keys: off by default so a feed never adds noise unasked.
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.
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.
const ( KeyDomainsWWWMode = "domains.www_mode" KeyDomainsCanonical = "domains.canonical" )
Keys for how a bare domain and its www twin are set up.
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.
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.
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.
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.
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).
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.
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.
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.
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.
const ( KeyBackupRunWindow = "backup.run_window" KeyBackupUploadKBPerSec = "backup.upload_kb_per_sec" )
Backup run window and upload speed cap keys.
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.
const ( KeyBackupSizeAnomalyPercent = "backup.size_anomaly_percent" KeyBackupSizeAnomalyBaseline = "backup.size_anomaly_baseline" )
Keys for the backup size anomaly alert.
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.
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.
const ( KeyBootstrapScriptMaxBytes = "bootstrap_scripts.max_bytes" KeyBootstrapScriptMaxCount = "bootstrap_scripts.max_count" DefaultBootstrapScriptMaxBytes = 64 << 10 DefaultBootstrapScriptMaxCount = 50 )
Registered keys for the saved bootstrap script limits.
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).
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.
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" )
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" )
const ( BuildCacheBudgetAuto = "auto" BuildCacheBudgetOn = "on" BuildCacheBudgetOff = "off" )
Cache budget modes.
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" )
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.
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" )
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.
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.
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.
const ( KeyCleanupFailingWindow = "cleanup.failing_window" KeyCleanupFailingFloor = "cleanup.failing_floor" )
Cleanup failure alert setting keys.
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.
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.
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.
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.
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.
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.
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.
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.
const ( KeyComposeRepoFileMaxBytes = "compose.repo_file_max_bytes" KeyComposeRepoDeployTimeout = "compose.repo_deploy_timeout" )
Keys for compose apps deployed from a git repository.
const ( KeyContainersLogMaxSizeMB = "containers.log_max_size_mb" KeyContainersLogMaxFiles = "containers.log_max_files" )
Registered keys for managed container log rotation.
const ( KeyDeployCutoverGapWindow = "deploy.cutover_gap_window" KeyDeployCutoverGapQueuedOver = "deploy.cutover_gap_queued_over" )
Keys for the measured cutover gap on the deploy timeline.
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.
const ( KeyDatabaseBulkConcurrency = "databases.bulk_concurrency" KeyDatabaseBulkMaxItems = "databases.bulk_max_items" )
Registered keys for POST /api/v1/databases/bulk.
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.
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.
const ( KeyDBCrashLoopRestarts = "databases.crash_loop_restarts" KeyDBCrashLoopWindowSeconds = "databases.crash_loop_window_seconds" )
Registered keys for the database crash loop detector.
const ( KeyDatabaseStatsInterval = "databases.stats_interval_seconds" KeyDatabaseStatsMaxDatabases = "databases.stats_max_databases" KeyDatabaseStatsTimeout = "databases.stats_timeout_seconds" )
Keys for database statistics sampling.
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.
const ( DBTuningDefault = "default" DBTempFile = "file" DBTempMemory = "memory" DBSyncNormal = "normal" DBSyncFull = "full" )
Tuning value names; "default" leaves the SQLite built-in untouched.
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.
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.
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.
const ( KeyAlertsDurationRegressionPercent = "alerts.duration_regression_percent" KeyAlertsDurationRegressionRecent = "alerts.duration_regression_recent" KeyAlertsDurationRegressionBaseline = "alerts.duration_regression_baseline" )
Keys for the deploy duration regression alert.
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.
const ( KeyDNSEgressReportMaxNames = "dns.egress_report_max_names" DNSEgressReportMaxNamesMin = 10 DNSEgressReportMaxNamesMax = 10000 )
Egress dry run: caps how many distinct names one report lists.
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).
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).
const ( KeyDNSMeshResolverEnabled = "dns.mesh_resolver_enabled" KeyDNSMeshResolverInterval = "dns.mesh_resolver_interval" )
Mesh DNS resolver on the bridge gateways (beta, off by default).
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).
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.
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.
const ( KeyDomainLimitsMaxBodyBytes = "domains.limits_max_body_bytes" KeyDomainLimitsMaxTimeoutSeconds = "domains.limits_max_timeout_seconds" )
Registered keys for the ceilings on per-domain request limits.
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.
const ( KeyDomainsWaitTimeout = "domains.wait_timeout" KeyDomainsWaitPoll = "domains.wait_poll" )
Keys for how the CLI waits for a new domain to go live.
const ( KeyEnvRevisionsKeep = "env.revisions_keep" KeyAppsUndoWindowDay = "apps.undo_window_days" )
Keys for env revision history.
const ( KeyErrorsDedupHours = "errors.dedup_hours" KeyErrorsDedupMax = "errors.dedup_max" )
Keys for the error tracking event-ID dedup window.
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.
const ( KeyGitLabDeployments = "git.gitlab_deployments" KeyGitLabDeploymentsConnections = "git.gitlab_deployments_connections" )
Keys for reporting deploys to a GitLab project's Deployments and Environments pages.
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.
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.
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.
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.
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.
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.
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" )
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).
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" )
const ( KeyImagesKeepPerApp = "images.keep_per_app" KeyImagesPruneSchedule = "images.prune_schedule" )
Image retention keys.
const ( KeyAppImageKeep = "app.image_keep" KeyAppImageKeepOverrides = "app.image_keep_overrides" )
Per-app image keep keys. 0 follows images.keep_per_app.
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.
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.
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.
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.
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.
const ( KeyMeshHubResolveTTL = "mesh.hub_resolve_ttl" KeyMeshHubStaleMax = "mesh.hub_stale_max" )
Mesh hub hostname resolution keys.
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.
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.
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.
const ( KeyNodeMovePrepull = "node_move.prepull" KeyNodeMovePrepullTimeout = "node_move.prepull_timeout" )
Keys for pre-pulling a moved resource's image on the target node.
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" )
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.
const ( KeyOrgsAvatarMaxBytes = "orgs.avatar_max_bytes" KeyOrgsAvatarMaxDimension = "orgs.avatar_max_dimension" )
Organization profile keys.
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.
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.
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.
const ( KeyPagesProxyMaxBodyMB = "pages.proxy_max_body_mb" KeyPagesProxyResponseTimeout = "pages.proxy_response_timeout" )
Keys for the limits on Pages proxy routes.
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.
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.
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.
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.
const ( KeyProjectsDefaultEnvironment = "projects.default_environment" KeyProjectsDefaultEnvironmentName = "projects.default_environment_name" )
Keys for the environment a new project starts with.
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.
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.
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.
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.
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.
const ( KeyDoctorReachabilityDialbackURL = "doctor.reachability_dialback_url" KeyDoctorReachabilityDialbackAllowPrivate = "doctor.reachability_dialback_allow_private" )
Reachability dial-back keys. The URL empty means nothing is ever contacted.
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).
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.
const ( KeyRegistryKeepTags = "retention.registry_keep_tags" KeyRegistryGCMinMB = "retention.registry_gc_min_mb" )
Built-in registry retention keys.
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.
const ( KeyRolloutMaxSurge = "rollout.max_surge" 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.
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.
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.
const ( KeyScanDefaultEnabled = "supply_chain.default_enabled" KeyScanDefaultGate = "supply_chain.default_gate" )
Registered keys for the instance default scan policy apps inherit.
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.
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.
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.
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.
const ( SelfHeartbeatMinInterval = 10 SelfHeartbeatMaxInterval = 86400 )
Bounds of the dead man's switch interval, in seconds.
const ( KeyAlertingSelfHeartbeatURL = "alerting.self_heartbeat_url" KeyAlertingSelfHeartbeatInterval = "alerting.self_heartbeat_interval" )
Keys for the outbound dead man's switch ping.
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.
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.
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.
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.
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.
const ( KeyStorageLowFreePercent = "storage.low_free_percent" KeyStorageCriticalFreePercent = "storage.critical_free_percent" )
Free-space percent floors the Storage page uses to judge disk health.
const ( KeyTemplatesImportMaxBytes = "templates.import_max_bytes" KeyTemplatesImportTimeout = "templates.import_timeout" )
Template import by URL keys.
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.
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.
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.
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.
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.
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.
const ( KeyVolumesUsageAlertPercent = "volumes.usage_alert_percent" KeyVolumesSizeHistoryRetention = "volumes.size_history_retention" )
Registered keys for volume usage alerts and the volume size history.
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.
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.
const AppImageKeepMin = 2
AppImageKeepMin is the smallest per-app keep, so the previous successful release survives.
const AuthRateLimitFloor = 10
AuthRateLimitFloor keeps the credential limiter high enough for an admin to sign in, MFA included, and low enough to stop stuffing.
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.
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.
const DigestScheduleOff = "off"
DigestScheduleOff is the value that turns the weekly digest off.
const ImagesPruneOff = "off"
ImagesPruneOff turns the scheduled prune off, which is the long-standing behavior.
const JobQueueMax = 10000
JobQueueMax bounds the job ping queue so its backing channel has a fixed size while the limit stays live.
const KeyAPIConditionalGet = "api.conditional_get"
KeyAPIConditionalGet switches ETag and 304 answers on read JSON endpoints.
const KeyAPIConditionalGetMaxBytes = "api.conditional_get_max_bytes"
KeyAPIConditionalGetMaxBytes caps the body buffered to compute an ETag.
const KeyAPIRouteStatBound = "api.route_stat_bound"
KeyAPIRouteStatBound caps how many distinct API routes the hot routes list tracks.
const (
KeyAccessLogSize = "telemetry.access_log_size"
)
KeyAccessLogSize is the per-route ring size of the in-memory recent-requests log.
const KeyAccountPreferencesMaxBytes = "account.preferences_max_bytes"
KeyAccountPreferencesMaxBytes caps one saved per-user preference document.
const KeyAlertsNotifyOnSleep = "alerts.notify_on_sleep"
KeyAlertsNotifyOnSleep lets alerts through for apps that sleep when idle.
const KeyAlertsRenotifyInterval = "alerts.renotify_interval"
KeyAlertsRenotifyInterval repeats a still-firing alert until it is read in the Inbox.
const KeyAppsEnvApplyOnSet = "apps.env_apply_on_set"
KeyAppsEnvApplyOnSet makes env set and import restart the app right away.
const KeyAppsMaxReplicasPerService = "apps.max_replicas_per_service"
KeyAppsMaxReplicasPerService caps the replica count one service may be given.
const KeyAuthSSOAutoRedirect = "auth.sso_auto_redirect"
KeyAuthSSOAutoRedirect sends the sign-in page straight to the only enabled single sign-on provider.
const KeyBackupDefaultRetentionHours = "backup.default_retention_hours"
KeyBackupDefaultRetentionHours is the default backup retention window in hours.
const (
KeyBackupLocalRoot = "backup.local_root"
)
Backup root key.
KeyBuildFairShare makes queued builds take turns across projects.
const KeyBuildReuseUnchanged = "build.reuse_unchanged"
KeyBuildReuseUnchanged turns image reuse for an unchanged commit and build settings on or off.
const KeyBuildRunnerMinDiskMB = "build.runner_min_disk_free_mb"
KeyBuildRunnerMinDiskMB is the free disk a build node needs to be picked for a build.
const KeyBuildSettingValueMaxBytes = "builds.setting_value_max_bytes"
KeyBuildSettingValueMaxBytes caps each per-app build setting value.
const KeyBuildStageLogTailLines = "build.stage_log_tail_lines"
KeyBuildStageLogTailLines sizes the log tail kept for each build stage.
const KeyBuildsMemoryLimitMB = "builds.memory_limit_mb"
KeyBuildsMemoryLimitMB caps the memory one build may use; 0 means auto.
const KeyBulkMaxPauseSeconds = "bulk.max_pause_seconds"
KeyBulkMaxPauseSeconds caps the pause between waves of a staggered bulk action.
const KeyCertificatesWeeklyIssueWarn = "certificates.weekly_issue_warn"
KeyCertificatesWeeklyIssueWarn is the certificate count in seven days at which the budget meter warns.
const KeyCloudConnectionsEnabled = "cloud.connections_enabled"
KeyCloudConnectionsEnabled gates the cloud connections API and CLI (preview).
const KeyComposeDependsOnTimeout = "compose.depends_on_timeout"
KeyComposeDependsOnTimeout bounds how long a compose service waits on a depends_on dependency.
const KeyConnectionBindingRuleValueMaxLen = "connections.binding_rule_value_max_len"
KeyConnectionBindingRuleValueMaxLen caps one string inside binding rules, such as a branch or a path.
const KeyConnectionBindingRulesMaxBytes = "connections.binding_rules_max_bytes"
KeyConnectionBindingRulesMaxBytes caps the rules JSON a binding may store.
const (
KeyConnectionExpiryWarn = "connections.expiry_warn"
)
KeyConnectionExpiryWarn is how far ahead the integrations hub flags a connection as expiring.
const KeyDBOptimizeInterval = "store.optimize_interval"
KeyDBOptimizeInterval is how often the control plane database refreshes planner statistics.
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.
const KeyDBParamsMaxMemoryMB = "databases.params_max_memory_mb"
KeyDBParamsMaxMemoryMB caps memory parameters of a database that has no memory limit.
const KeyDNSAuthorityWarnTTL = "dns.authority_warn_ttl_seconds"
KeyDNSAuthorityWarnTTL is the answer TTL above which who-answers reports slow failover.
const KeyDNSVerifyTokenOnSave = "dns.verify_provider_on_save" //nolint:gosec // setting key, not a credential
KeyDNSVerifyTokenOnSave makes a DNS provider credential save also test it.
const (
KeyDatabaseImportMaxBytes = "databases.import_max_bytes"
)
KeyDatabaseImportMaxBytes caps one dump uploaded to a managed database.
const KeyDatabasesPoolerImage = "databases.pooler_image"
KeyDatabasesPoolerImage is the image the managed Postgres pooler runs.
const KeyDeployApprovalMaxRequired = "deploy.approval_max_required"
KeyDeployApprovalMaxRequired caps how many distinct approvers an environment may require, so a typo cannot lock deploys out.
const KeyDeployCoalesceWindow = "deploys.coalesce_window"
KeyDeployCoalesceWindow is the window in which a second deploy of the same commit is folded into the running one.
const KeyDeployMaxConcurrentPerProject = "deploy.max_concurrent_per_project"
KeyDeployMaxConcurrentPerProject caps simultaneous builds inside one project.
const KeyDeployOrphanGraceSeconds = "deploy.orphan_grace_seconds"
KeyDeployOrphanGraceSeconds is how old a running deploy must be before cancel may treat it as orphaned.
const KeyDomainsAuthGateTimeout = "domains.auth_gate_timeout"
KeyDomainsAuthGateTimeout is the default auth gate subrequest timeout.
const KeyDomainsBatchMaxItems = "domains.batch_max_items"
KeyDomainsBatchMaxItems caps the items of one POST /api/v1/domains/batch.
const KeyDomainsHTTPSAttemptsPerHour = "domains.https_attempts_per_hour"
KeyDomainsHTTPSAttemptsPerHour caps production HTTPS enable attempts per hour.
const KeyDomainsParkedRetentionDays = "domains.parked_retention_days"
KeyDomainsParkedRetentionDays is how long a parked domain may sit before the hourly job forgets it.
const KeyDomainsRollbackWindowMinutes = "domains.rollback_window_minutes"
KeyDomainsRollbackWindowMinutes bounds how long a domain change can be rolled back.
const KeyFirewallConfirmWindow = "firewall.confirm_window"
KeyFirewallConfirmWindow is how long a dashboard or CLI port restriction waits for confirmation.
const KeyGitSSHScanAllowInternal = "git.ssh_scan_allow_internal"
KeyGitSSHScanAllowInternal lists internal networks a host key scan may dial.
const KeyImagesPullConcurrency = "images.pull_concurrency"
KeyImagesPullConcurrency caps how many distinct image pulls run at once on a node.
const KeyImagesRemoveMaxPerRequest = "images.remove_max_per_request"
KeyImagesRemoveMaxPerRequest caps how many images one explicit removal request may name.
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.
const KeyMonitorsEnabled = "monitors.enabled"
KeyMonitorsEnabled turns the uptime monitor engine on or off without a restart.
const KeyNetOutboundTimeout = "net.outbound_timeout"
KeyNetOutboundTimeout bounds every shared outbound HTTP request.
const KeyNextjsGenerateActionsKey = "nextjs.generate_actions_key"
KeyNextjsGenerateActionsKey turns on the one-time Server Actions key for wizard-created Next.js apps.
const KeyNextjsMemoryFloorMB = "nextjs.memory_floor_mb"
KeyNextjsMemoryFloorMB is the memory limit under which the doctor warns about Next.js apps.
const KeyNodesProtectedTaintKeys = "nodes.protected_taint_keys"
KeyNodesProtectedTaintKeys lists taint keys whose removal or loosening counts as weakening.
const KeyOnboardingEnabled = "onboarding.enabled"
KeyOnboardingEnabled turns the first-run onboarding flow on or off for everyone.
const KeyOnboardingRestoreReminderDays = "onboarding.restore_reminder_days"
KeyOnboardingRestoreReminderDays is how many days after onboarding starts the dashboard nudges a restore test.
const KeyPagesAnalyticsRetentionDays = "pages.analytics_retention_days"
KeyPagesAnalyticsRetentionDays caps the longest Pages analytics range served.
const KeyPagesImageResize = "pages.image_resize"
KeyPagesImageResize turns on the on-demand image resize route for Pages sites.
const KeyPagesImageResizeCacheBytes = "pages.image_resize_cache_bytes"
KeyPagesImageResizeCacheBytes caps the memory held by resized variants.
const KeyPagesImageResizeMaxPixels = "pages.image_resize_max_pixels"
KeyPagesImageResizeMaxPixels caps the decoded source pixel count, which bounds memory.
const KeyPagesImageResizeMaxSourceBytes = "pages.image_resize_max_source_bytes"
KeyPagesImageResizeMaxSourceBytes caps the source image size that is decoded.
const KeyPagesImageResizeMaxWidth = "pages.image_resize_max_width"
KeyPagesImageResizeMaxWidth caps the width a resize request may ask for.
const KeyPagesPreviewMaxPerSite = "pages.preview_max_per_site"
KeyPagesPreviewMaxPerSite caps preview sites kept per Pages site; 0 keeps them all.
const KeyPagesServingWait = "pages.serving_wait"
KeyPagesServingWait bounds how long a Pages promote or rollback waits for the new files to be served.
const KeyPipelinesOIDCListenPort = "pipelines.oidc_listen_port"
KeyPipelinesOIDCListenPort is the port of the job OIDC endpoint on the bridge gateway.
const KeyPreviewSkipDrafts = "deploy.preview_skip_drafts"
KeyPreviewSkipDrafts skips preview deploys for draft pull requests.
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".
const (
KeyReadConns = "store.read_connections"
)
KeyReadConns sizes the control plane database read pool.
const KeyReconcileEventDriven = "reconcile.event_driven"
KeyReconcileEventDriven lets a reconcile pass skip apps that settled and saw no change.
const KeyReconcileLagWarnSeconds = "reconcile.lag_warn_seconds"
KeyReconcileLagWarnSeconds is how long a desired change may wait before a reconciler counts as lagging.
const KeyReconcileResyncSeconds = "reconcile.resync_seconds"
KeyReconcileResyncSeconds is the safety-net interval between full reconcile passes.
const KeyRegistryMirrorPrefix = "registry.mirror_prefix"
KeyRegistryMirrorPrefix is the pull-through prefix for the agent and BuildKit images.
const KeyRetentionRecentlyDeletedDays = "retention.recently_deleted_days"
KeyRetentionRecentlyDeletedDays is how long a deleted app or database can be restored.
const KeyScheduledTasksHistoryKeep = "scheduled_tasks.history_keep"
KeyScheduledTasksHistoryKeep caps the run history rows kept per scheduled task.
const KeyScheduledTasksMaxOutputBytes = "scheduled_tasks.max_output_bytes"
KeyScheduledTasksMaxOutputBytes bounds the output tail kept per run.
const KeySecurityDockerGuardMaxItems = "security.docker_guard_max_items"
KeySecurityDockerGuardMaxItems caps how many per-rule Docker guard items the attention feed lists.
const KeySecurityProtectedSilenceMaxDays = "security.protected_silence_max_days"
KeySecurityProtectedSilenceMaxDays caps how long a root admin may mute a security-integrity issue.
const KeyShellSectionTimeout = "shell.section_timeout"
KeyShellSectionTimeout bounds each section of the shell bootstrap aggregate.
const KeySizePresets = "apps.size_presets"
KeySizePresets holds the named resource sizes offered for apps and databases.
const KeyStatusTemplatesMax = "status_page.templates_max"
KeyStatusTemplatesMax caps saved status page incident templates.
const KeyStorageLargeUnmanagedImageMB = "storage.large_unmanaged_image_mb"
KeyStorageLargeUnmanagedImageMB is the size at which the Storage page marks an unmanaged image as large.
const KeyTemplatesCapNetAdmin = "templates.capability_net_admin_enabled"
KeyTemplatesCapNetAdmin gates the Elevated net_admin capability class.
const KeyTemplatesFileInputMaxBytes = "templates.file_input_max_bytes"
KeyTemplatesFileInputMaxBytes caps one config file an install form supplies.
const KeyTemplatesFirstBootMaxSeconds = "templates.first_boot_max_seconds"
KeyTemplatesFirstBootMaxSeconds caps a template's own first_boot_seconds.
const KeyUIOutboundUTM = "ui.outbound_utm"
KeyUIOutboundUTM controls whether the dashboard tags outbound links to third party sites with UTM parameters.
const KeyUpgradeVerifyBackup = "upgrade.verify_backup"
KeyUpgradeVerifyBackup turns on the scratch restore of the pre-upgrade backup.
const PasswordMinLengthFloor = 8
PasswordMinLengthFloor is the weakest length any policy may reach, enforced in code as well.
Variables ¶
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.
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.
var ErrUnknownKey = errors.New("runtimesettings: unknown setting")
ErrUnknownKey is returned for a key that is not registered.
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.
var RetentionPresets = []int{0, 30, 60, 90, 180, 365}
RetentionPresets are the day counts a cleanup policy offers; 0 keeps the data forever.
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 ¶
CheckAppImageKeep accepts 0 (follow the global count) or AppImageKeepMin up to the ceiling.
func CheckAppImageKeepCount ¶
CheckAppImageKeepCount refuses a map with more apps than the settings row may hold.
func ClampBuildCacheReclaimTimeout ¶
ClampBuildCacheReclaimTimeout forces an env seeded timeout into its safe range.
func ClampLimit ¶
ClampLimit forces n into the safe range of a limit setting; boot code uses it so nothing starts below a floor.
func ClampMeshApplyRetries ¶
ClampMeshApplyRetries bounds a mesh.apply_retries value to its registered range.
func ClampMeshApplyRetryDelay ¶
ClampMeshApplyRetryDelay bounds a mesh.apply_retry_delay value to its registered range.
func ClampMeshApplyTimeout ¶
ClampMeshApplyTimeout bounds a mesh.apply_timeout value to its registered range.
func ClampMeshWakeDebounce ¶
ClampMeshWakeDebounce bounds a mesh.wake_debounce value to its registered range.
func DurationEnvToDays ¶
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 ¶
MinDaysCheck rejects a positive day count below floor. 0 (keep forever) always passes.
func MinDurationCheck ¶
MinDurationCheck rejects a duration below floor.
func NonNegativeCheck ¶
NonNegativeCheck rejects a negative count; 0 means no limit.
func ParseAppImageKeepOverrides ¶
ParseAppImageKeepOverrides reads the per-app keep map; an empty value is no overrides.
func ParseBackupWindow ¶
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 ¶
ParseDigestSchedule reads "off" or "<day>@<hour>" (day mon..sun, hour 0..23, UTC), e.g. "mon@08".
func ParseDuration ¶
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 ¶
ParseK8sNamespaces splits a comma list, dropping blanks.
func PositiveDaysEnv ¶
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 ¶
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 CutoverGapSettings ¶
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 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 ¶
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.
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 NewWithDefinitions ¶
NewWithDefinitions builds a Service over an explicit definition list.
func (*Service) AbuseLimits ¶
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 ¶
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 ¶
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) AnyPendingRestart ¶
AnyPendingRestart reports whether a restart-kind setting differs from its boot value.
func (*Service) AuthGateTimeout ¶
AuthGateTimeout returns the saved default forced into its range, so a bad seed never disables the wait.
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 ¶
CaptureBoot records the effective value of every restart-kind setting; the accessors keep returning it and pending_restart compares against it.
func (*Service) ContainerLogRotation ¶
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 ¶
DatabaseParamsMaxConnections returns the live connection ceiling.
func (*Service) DatabaseParamsMaxMemoryMB ¶
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) FirewallConfirmWindow ¶
FirewallConfirmWindow reads the confirm window, forced into its safe range.
func (*Service) GitSubmodulesTimeout ¶
GitSubmodulesTimeout returns the saved fetch timeout forced into its range.
func (*Service) Limit ¶
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) 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 ¶
Onboarding returns the settings flagged for the first-run review.
func (*Service) PagesAnalyticsRetentionDays ¶
PagesAnalyticsRetentionDays returns the saved retention in days.
func (*Service) PagesBuildLogLimits ¶
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 ¶
PagesProxyLimits returns the saved body cap in bytes and response timeout.
func (*Service) PagesServingWait ¶
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 ¶
ProxyCertWait returns the wait forced into its range.
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 ¶
Source reports whether a key's value is saved, from the environment, or the default.
func (*Service) StringChecked ¶
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 ¶
SystemTokenRotationLead reads the rotation lead, forced into its safe range.
func (*Service) TemplatesImportTimeout ¶
TemplatesImportTimeout returns the saved timeout forced into its range.
func (*Service) TrustedProxyPreset ¶
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 ¶
VisitorHistoryRetention returns the rollup window forced into its range; 0 means persistence is off.
func (*Service) VisitorSaltRotation ¶
VisitorSaltRotation returns the salt period forced into its range.
func (*Service) WeakensOnReset ¶
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.
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 ¶
ValidationError is a rejected value, reported against the request's value field.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
type WriteOptions ¶
WriteOptions carries what the caller is allowed to do; the zero value is the strictest.
Source Files
¶
- legacy_keys.go
- registry.go
- registry_abuse.go
- registry_access_log.go
- registry_access_log_search.go
- registry_account.go
- registry_advisor.go
- registry_advisory_notify.go
- registry_alert_database.go
- registry_alert_defaults.go
- registry_alert_renotify.go
- registry_alert_sleep.go
- registry_apexwww.go
- registry_api_limits.go
- registry_app_bundle.go
- registry_app_metrics.go
- registry_app_throughput.go
- registry_apps_run.go
- registry_appsleep.go
- registry_audit_anchor.go
- registry_auth_gate.go
- registry_autoscale_gauge.go
- registry_backup_hooks.go
- registry_backup_retention.go
- registry_backup_root.go
- registry_backup_sftp.go
- registry_backup_size_anomaly.go
- registry_backup_webdav.go
- registry_boot.go
- registry_bootstrap_scripts.go
- registry_branches.go
- registry_build_cache.go
- registry_build_cache_budget.go
- registry_build_fallback.go
- registry_build_hooks.go
- registry_build_host_limits.go
- registry_build_limits.go
- registry_build_reuse.go
- registry_build_settings.go
- registry_build_stages.go
- registry_build_transfer.go
- registry_builds.go
- registry_bulk.go
- registry_certificates.go
- registry_changes_stream.go
- registry_cleanup_alert.go
- registry_cloud_aws_sso.go
- registry_cloud_connections.go
- registry_cloud_engine.go
- registry_cloud_oauth.go
- registry_clouddoctor.go
- registry_cloudflare.go
- registry_cloudguard.go
- registry_cloudguard_cfssm.go
- registry_cloudspend.go
- registry_compose.go
- registry_compose_repo.go
- registry_conditional_get.go
- registry_connections.go
- registry_container_logs.go
- registry_cutover_gap.go
- registry_cutover_verify.go
- registry_database_bulk.go
- registry_database_import.go
- registry_database_latest.go
- registry_db_compact.go
- registry_db_crash_loop.go
- registry_db_optimize.go
- registry_db_readpool.go
- registry_db_stats.go
- registry_db_tuning.go
- registry_dbparams.go
- registry_dbviewer.go
- registry_default_site.go
- registry_deploy.go
- registry_deploy_approvers.go
- registry_deploy_coalesce.go
- registry_deploy_duration_regression.go
- registry_deploy_orphan.go
- registry_disk_history.go
- registry_dns_authority.go
- registry_dns_egress_report.go
- registry_dns_forward.go
- registry_dns_internal_names.go
- registry_dns_mesh_resolver.go
- registry_dns_query_log.go
- registry_dns_verify.go
- registry_dns_watch.go
- registry_docker_guard.go
- registry_dockerhub.go
- registry_domain_limits.go
- registry_domain_tuning.go
- registry_domains_batch.go
- registry_domains_wait.go
- registry_env_apply.go
- registry_env_revisions.go
- registry_errors.go
- registry_firewall.go
- registry_footprint.go
- registry_git_deployments.go
- registry_git_poll.go
- registry_git_ref_patterns.go
- registry_git_refresh.go
- registry_git_ssh.go
- registry_git_submodules.go
- registry_guards.go
- registry_host_pressure.go
- registry_host_protection.go
- registry_https.go
- registry_iac_compose.go
- registry_image_bloat.go
- registry_images.go
- registry_incident_postmortem.go
- registry_ingress.go
- registry_k8s.go
- registry_limits.go
- registry_major_upgrade.go
- registry_mesh_apply.go
- registry_mesh_hub.go
- registry_metrics_presence.go
- registry_metrics_tiers.go
- registry_mirror.go
- registry_monitors.go
- registry_net_outbound.go
- registry_nextjs.go
- registry_node_agent_resilience.go
- registry_node_move_prepull.go
- registry_node_patch.go
- registry_node_thresholds.go
- registry_nodes.go
- registry_oidc_listen.go
- registry_onboarding.go
- registry_onboarding_restore.go
- registry_org_profile.go
- registry_orgs.go
- registry_otlp.go
- registry_pages_analytics.go
- registry_pages_build.go
- registry_pages_image.go
- registry_pages_previews.go
- registry_pages_proxy.go
- registry_pages_serving.go
- registry_parked_retention.go
- registry_password.go
- registry_perf.go
- registry_pooler.go
- registry_preview_render.go
- registry_previews_draft.go
- registry_project_archive.go
- registry_project_env.go
- registry_provider_capabilities.go
- registry_provider_resources.go
- registry_provision.go
- registry_provision_oracle.go
- registry_proxy_cert.go
- registry_quota_defaults.go
- registry_reachability.go
- registry_recently_deleted.go
- registry_reconcile.go
- registry_reconcile_event_driven.go
- registry_registry_push.go
- registry_resource_notes.go
- registry_retention.go
- registry_rightsizing.go
- registry_rollout.go
- registry_route_stat_bound.go
- registry_runtime_options.go
- registry_saved_views.go
- registry_scan_default.go
- registry_scheduled_tasks.go
- registry_schema_diff.go
- registry_secret_policy.go
- registry_secret_provider.go
- registry_secret_ref.go
- registry_self_heartbeat.go
- registry_server_limits.go
- registry_shell.go
- registry_silence.go
- registry_size_presets.go
- registry_spool.go
- registry_sso.go
- registry_stacks.go
- registry_stacksync.go
- registry_status_templates.go
- registry_storage.go
- registry_storage_ui.go
- registry_template_capabilities.go
- registry_template_file_input.go
- registry_template_first_boot.go
- registry_templates_import.go
- registry_token_expiry.go
- registry_tokens.go
- registry_tunables.go
- registry_ui.go
- registry_update_resilience.go
- registry_upgrade_verify.go
- registry_vault_aws.go
- registry_vault_client.go
- registry_volume_usage.go
- registry_volumes.go
- retention.go
- service.go
- store_load.go
- value.go
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. |