runtimesettings

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2026 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Overview

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

Index

Constants

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

Source says where an effective value came from.

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

Registered setting keys.

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

Registered keys for the per-app abuse defense limits.

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

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

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

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

View Source
const (
	KeyAppsMetricsMax                = "api.apps_metrics_max"
	KeyLogExportMaxLines             = "logs.export_max_lines"
	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"
)

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

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

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

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

App metrics scrape setting keys.

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

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

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

Limits for requests held while a sleeping app wakes.

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

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

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

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

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

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

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

Boot recheck keys.

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

	DefaultBootstrapScriptMaxBytes = 64 << 10
	DefaultBootstrapScriptMaxCount = 50
)

Registered keys for the saved bootstrap script limits.

View Source
const (
	// KeyBuildCacheAppQuotaGB caps one app's cache mounts; 0 turns the quota off.
	KeyBuildCacheAppQuotaGB = "build.cache_app_quota_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"
)
View Source
const (
	// KeyBuildCacheBudget turns the post build cache budget prune on, off or auto.
	KeyBuildCacheBudget = "build.cache_budget"
	// KeyBuildCacheBudgetMaxMB is the most builder cache kept after a build; 0 sizes it from the disk.
	KeyBuildCacheBudgetMaxMB = "build.cache_budget_max_mb"
	// KeyBuildCacheBudgetReservedMB is the cache a prune never goes below; 0 picks a default.
	KeyBuildCacheBudgetReservedMB = "build.cache_budget_reserved_mb"
)
View Source
const (
	BuildCacheBudgetAuto = "auto"
	BuildCacheBudgetOn   = "on"
	BuildCacheBudgetOff  = "off"
)

Cache budget modes.

View Source
const (
	KeyBuildHookTriggersPerMinute = "deploy.build_hook_triggers_per_minute"
	KeyBuildHookMaxCIDRs          = "deploy.build_hook_max_cidrs"
)

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

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

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

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

Cleanup failure alert setting keys.

View Source
const (
	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"
)

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

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

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

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

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

Keys for compose apps deployed from a git repository.

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

Registered keys for managed container log rotation.

View Source
const (
	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"
)

Registered keys for the domain cutover verifier thresholds.

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

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

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

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

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

Keys for SQLite connection tuning of the control plane database.

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

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

View Source
const (
	KeyDBViewerTimeout    = "database_viewer.query_timeout"
	KeyDBViewerMaxRows    = "database_viewer.max_rows"
	KeyDBViewerMaxBytes   = "database_viewer.max_bytes"
	KeyDBViewerMaxCell    = "database_viewer.max_cell_bytes"
	KeyDBViewerSchemaRows = "database_viewer.schema_max_rows"
	KeyDBViewerMaxSQL     = "database_viewer.max_sql_bytes"

	KeyLogRuleEvalInterval = "log_rules.eval_interval"
	KeyLogRuleMaxWindow    = "log_rules.max_window"
	KeyLogRuleMaxRows      = "log_rules.max_rows"
	KeyLogRuleSamples      = "log_rules.samples"
)

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

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

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

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

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

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

Disk history setting keys.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Docker Hub integration keys.

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

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

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

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

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

Keys for the error tracking event-ID dedup window.

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

Keys for the live Go runtime footprint knobs.

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

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

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

Keys of the live git poller settings.

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

Registered keys bounding git deploy trigger tag and branch patterns.

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

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

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

Keys bounding submodule and LFS fetches of git source builds.

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

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

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

Host pressure setting keys.

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

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

View Source
const (
	KeyImagesKeepPerApp    = "images.keep_per_app"
	KeyImagesPruneSchedule = "images.prune_schedule"
)

Image retention keys.

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

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

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

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

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

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

View Source
const (
	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"
	KeyInlineSourceMaxBytes  = "deploy.inline_source_max_bytes"
	KeyInlineSourceMaxFiles  = "deploy.inline_source_max_files"
	KeyInlineSourceKeep      = "deploy.inline_source_keep"
)

Registered keys for request limits and deploy concurrency.

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

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

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

Mesh hub hostname resolution keys.

View Source
const (
	KeyMetricsIdleInterval   = "metrics.idle_interval"
	KeyMetricsPresenceWindow = "metrics.presence_window"
	KeyStoreTouchFlush       = "store.touch_flush_interval"
)

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

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

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

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

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

Organization profile keys.

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

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

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

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

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

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

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

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

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

Keys for the environment a new project starts with.

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

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

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

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

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

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

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

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

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

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

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

Registered keys for the instance default scan policy apps inherit.

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

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

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

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

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

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

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

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

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

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

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

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

Registered keys for the plan only git sync of stacks.

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

Disk guard and telemetry storage setting keys.

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

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

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

Template import by URL keys.

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

)

Token expiry reminders, rotation grace and git credential renewal.

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

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

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

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

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

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

HashiCorp Vault and OpenBao client tunables.

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

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

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

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

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

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

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

View Source
const AppImageKeepMin = 2

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

View Source
const AuthRateLimitFloor = 10

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

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

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

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

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

View Source
const ImagesPruneOff = "off"

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

View Source
const JobQueueMax = 10000

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

View Source
const KeyAPIConditionalGet = "api.conditional_get"

KeyAPIConditionalGet switches ETag and 304 answers on read JSON endpoints.

View Source
const KeyAPIConditionalGetMaxBytes = "api.conditional_get_max_bytes"

KeyAPIConditionalGetMaxBytes caps the body buffered to compute an ETag.

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

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

View Source
const KeyAccountPreferencesMaxBytes = "account.preferences_max_bytes"

KeyAccountPreferencesMaxBytes caps one saved per-user preference document.

View Source
const KeyAppsEnvApplyOnSet = "apps.env_apply_on_set"

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

View Source
const KeyAppsMaxReplicasPerService = "apps.max_replicas_per_service"

KeyAppsMaxReplicasPerService caps the replica count one service may be given.

View Source
const KeyAuthSSOAutoRedirect = "auth.sso_auto_redirect"

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

View Source
const KeyBackupDefaultRetentionHours = "backup.default_retention_hours"

KeyBackupDefaultRetentionHours is the default backup retention window in hours.

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

Backup root key.

View Source
const KeyBuildSettingValueMaxBytes = "builds.setting_value_max_bytes"

KeyBuildSettingValueMaxBytes caps each per-app build setting value.

View Source
const KeyBuildStageLogTailLines = "build.stage_log_tail_lines"

KeyBuildStageLogTailLines sizes the log tail kept for each build stage.

View Source
const KeyBuildsMemoryLimitMB = "builds.memory_limit_mb"

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

View Source
const KeyCertificatesWeeklyIssueWarn = "certificates.weekly_issue_warn"

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

View Source
const KeyCloudConnectionsEnabled = "cloud.connections_enabled"

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

View Source
const KeyComposeDependsOnTimeout = "compose.depends_on_timeout"

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

View Source
const KeyConnectionBindingRuleValueMaxLen = "connections.binding_rule_value_max_len"

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

View Source
const KeyConnectionBindingRulesMaxBytes = "connections.binding_rules_max_bytes"

KeyConnectionBindingRulesMaxBytes caps the rules JSON a binding may store.

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

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

View Source
const KeyDBOptimizeInterval = "store.optimize_interval"

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

View Source
const KeyDBParamsMaxConnections = "databases.params_max_connections"

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

View Source
const KeyDBParamsMaxMemoryMB = "databases.params_max_memory_mb"

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

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

KeyDNSVerifyTokenOnSave makes a DNS provider credential save also test it.

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

KeyDatabaseImportMaxBytes caps one dump uploaded to a managed database.

View Source
const KeyDatabasesPoolerImage = "databases.pooler_image"

KeyDatabasesPoolerImage is the image the managed Postgres pooler runs.

View Source
const KeyDeployApprovalMaxRequired = "deploy.approval_max_required"

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

View Source
const KeyDeployMaxConcurrentPerProject = "deploy.max_concurrent_per_project"

KeyDeployMaxConcurrentPerProject caps simultaneous builds inside one project.

View Source
const KeyDeployOrphanGraceSeconds = "deploy.orphan_grace_seconds"

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

View Source
const KeyDomainsAuthGateTimeout = "domains.auth_gate_timeout"

KeyDomainsAuthGateTimeout is the default auth gate subrequest timeout.

View Source
const KeyDomainsBatchMaxItems = "domains.batch_max_items"

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

View Source
const KeyDomainsHTTPSAttemptsPerHour = "domains.https_attempts_per_hour"

KeyDomainsHTTPSAttemptsPerHour caps production HTTPS enable attempts per hour.

View Source
const KeyDomainsParkedRetentionDays = "domains.parked_retention_days"

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

View Source
const KeyDomainsRollbackWindowMinutes = "domains.rollback_window_minutes"

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

View Source
const KeyFirewallConfirmWindow = "firewall.confirm_window"

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

View Source
const KeyGitSSHScanAllowInternal = "git.ssh_scan_allow_internal"

KeyGitSSHScanAllowInternal lists internal networks a host key scan may dial.

View Source
const KeyImagesPullConcurrency = "images.pull_concurrency"

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

View Source
const KeyImagesRemoveMaxPerRequest = "images.remove_max_per_request"

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

View Source
const KeyNetOutboundTimeout = "net.outbound_timeout"

KeyNetOutboundTimeout bounds every shared outbound HTTP request.

View Source
const KeyNextjsGenerateActionsKey = "nextjs.generate_actions_key"

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

View Source
const KeyNextjsMemoryFloorMB = "nextjs.memory_floor_mb"

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

View Source
const KeyNodesProtectedTaintKeys = "nodes.protected_taint_keys"

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

View Source
const KeyOnboardingEnabled = "onboarding.enabled"

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

View Source
const KeyOnboardingRestoreReminderDays = "onboarding.restore_reminder_days"

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

View Source
const KeyPipelinesOIDCListenPort = "pipelines.oidc_listen_port"

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

View Source
const KeyProxyCertWait = "ingress.proxy_cert_wait"

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

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

KeyReadConns sizes the control plane database read pool.

View Source
const KeyReconcileResyncSeconds = "reconcile.resync_seconds"

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

View Source
const KeyRegistryMirrorPrefix = "registry.mirror_prefix"

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

View Source
const KeyScheduledTasksHistoryKeep = "scheduled_tasks.history_keep"

KeyScheduledTasksHistoryKeep caps the run history rows kept per scheduled task.

View Source
const KeyScheduledTasksMaxOutputBytes = "scheduled_tasks.max_output_bytes"

KeyScheduledTasksMaxOutputBytes bounds the output tail kept per run.

View Source
const KeySecurityDockerGuardMaxItems = "security.docker_guard_max_items"

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

View Source
const KeySecurityProtectedSilenceMaxDays = "security.protected_silence_max_days"

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

View Source
const KeyShellSectionTimeout = "shell.section_timeout"

KeyShellSectionTimeout bounds each section of the shell bootstrap aggregate.

View Source
const KeySizePresets = "apps.size_presets"

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

View Source
const KeyStorageLargeUnmanagedImageMB = "storage.large_unmanaged_image_mb"

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

View Source
const KeyTemplatesCapNetAdmin = "templates.capability_net_admin_enabled"

KeyTemplatesCapNetAdmin gates the Elevated net_admin capability class.

View Source
const KeyTemplatesFileInputMaxBytes = "templates.file_input_max_bytes"

KeyTemplatesFileInputMaxBytes caps one config file an install form supplies.

View Source
const KeyTemplatesFirstBootMaxSeconds = "templates.first_boot_max_seconds"

KeyTemplatesFirstBootMaxSeconds caps a template's own first_boot_seconds.

View Source
const KeyUIOutboundUTM = "ui.outbound_utm"

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

View Source
const KeyUpgradeVerifyBackup = "upgrade.verify_backup"

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

View Source
const PasswordMinLengthFloor = 8

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

Variables

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

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

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

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

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

ErrUnknownKey is returned for a key that is not registered.

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

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

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

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

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

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

Functions

func BindRuntimeLimits

func BindRuntimeLimits(s *Service)

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

func CheckAppImageKeep

func CheckAppImageKeep(n int) error

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

func CheckAppImageKeepCount

func CheckAppImageKeepCount(n int) error

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

func ClampBuildCacheReclaimTimeout

func ClampBuildCacheReclaimTimeout(d time.Duration) time.Duration

ClampBuildCacheReclaimTimeout forces an env seeded timeout into its safe range.

func ClampLimit

func ClampLimit(key string, n int) int

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

func ClampMeshApplyRetries

func ClampMeshApplyRetries(n int) int

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

func ClampMeshApplyRetryDelay

func ClampMeshApplyRetryDelay(d time.Duration) time.Duration

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

func ClampMeshApplyTimeout

func ClampMeshApplyTimeout(d time.Duration) time.Duration

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

func ClampMeshWakeDebounce

func ClampMeshWakeDebounce(d time.Duration) time.Duration

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

func DurationEnvToDays

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

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

func MinDaysCheck

func MinDaysCheck(floor int) func(string) error

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

func MinDurationCheck

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

MinDurationCheck rejects a duration below floor.

func ParseAppImageKeepOverrides

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

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

func ParseDuration

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

ParseDuration parses a positive duration.

func ParseJSON

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

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

func PositiveDaysEnv

func PositiveDaysEnv(raw string) (string, error)

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

func Register

func Register(d Definition)

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

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 Apply

type Apply string

Apply says when a changed value takes effect.

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

Apply modes.

type Category

type Category string

Category groups settings in the dashboard.

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

Setting categories.

type 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
}

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

type Definition

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

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

func Definitions

func Definitions() []Definition

Definitions returns a copy of the registry in registration order.

type Kind

type Kind string

Kind is the value type of a setting.

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

Setting kinds.

type LogRuleLimits

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

LogRuleLimits bounds one log rule evaluation.

type PostmortemLimits

type PostmortemLimits struct {
	FieldMax  int
	ActionMax int
	BodyMax   int
}

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

type Risk

type Risk string

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

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

Risk levels.

type Service

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

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

func New

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

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

func NewWithDefinitions

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

NewWithDefinitions builds a Service over an explicit definition list.

func (*Service) AbuseLimits

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

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

func (*Service) AccessLogRetention

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

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

func (*Service) AccessSearchLimits

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

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

func (*Service) AckReviewed

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

AckReviewed marks the first-run security review as done.

func (*Service) All

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

All returns every registered setting in registration order.

func (*Service) AnyPendingRestart

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

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

func (*Service) AuthGateTimeout

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

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

func (*Service) Bool

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

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

func (*Service) CaptureBoot

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

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

func (*Service) ContainerLogRotation

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

ContainerLogRotation returns the live rotation limits; 0 means unchanged.

func (*Service) CutoverVerify

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

CutoverVerify reads the thresholds at call time.

func (*Service) DatabaseParamsMaxConnections

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

DatabaseParamsMaxConnections returns the live connection ceiling.

func (*Service) DatabaseParamsMaxMemoryMB

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

DatabaseParamsMaxMemoryMB returns the live memory ceiling for unlimited databases.

func (*Service) DatabaseViewerLimits

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

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

func (*Service) Duration

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

Duration returns a duration setting.

func (*Service) FirewallConfirmWindow

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

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

func (*Service) Get

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

Get returns one resolved setting.

func (*Service) GitSubmodulesTimeout

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

GitSubmodulesTimeout returns the saved fetch timeout forced into its range.

func (*Service) Int

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

Int returns an int setting.

func (*Service) Limit

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

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

func (*Service) List

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

List returns a string_list setting.

func (*Service) LogRuleLimits

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

LogRuleLimits returns the live log rule bounds.

func (*Service) Onboarding

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

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

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) ProxyCertWait

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

ProxyCertWait returns the wait forced into its range.

func (*Service) Reset

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

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

func (*Service) Reviewed

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

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

func (*Service) Set

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

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

func (*Service) Source

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

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

func (*Service) String

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

String returns a string setting.

func (*Service) StringChecked

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

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

func (*Service) SystemTokenRotationLead

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

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

func (*Service) TemplatesImportTimeout

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

TemplatesImportTimeout returns the saved timeout forced into its range.

func (*Service) TrustedProxyPreset

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

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

func (*Service) ValidateForWrite

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

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

func (*Service) VisitorHistoryRetention

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

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

func (*Service) VisitorSaltRotation

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

VisitorSaltRotation returns the salt period forced into its range.

func (*Service) WeakensOnReset

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

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

func (*Service) WeakensTo

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

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

type Setting

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

Setting is the wire shape of one resolved setting.

type SizePreset

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

SizePreset is one named CPU and memory size.

func ParseSizePresets

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

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

type Store

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

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

type ValidationError

type ValidationError struct {
	Key     string
	Message string
}

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

func (*ValidationError) Error

func (e *ValidationError) Error() string

type WriteOptions

type WriteOptions struct {
	ConfirmWeakening bool
	RefuseSensitive  bool
}

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

Source Files

Directories

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

Jump to

Keyboard shortcuts

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