Skip to content
Configuration Reference

Configuration Reference

Generated by make docs-sync from tools/gendocs/config. Source of truth is the koanf:"..." struct tags + doc comments in internal/config/*.go. Do not edit by hand — make docs-sync re-runs the generator and git diff will catch drift.

Defaults are seeded by internal/config/config.go::defaultConfig() (and the per-section applyXxxDefaults helpers). The reference below names the type + the doc comment; the runtime default is in the seed.

Top-level structure

The root config is a single YAML document. The Config struct (internal/config/config.go) lists every top-level section; each section has its own struct in the same package.

Sections covered below:

server

ServerConfig configures the HTTP and gRPC listeners.

KeyTypeDescription
server.corsCORSConfig
server.grpcportint
server.hoststring
server.httpportint
server.tlsTLSConfig

server.cors

CORSConfig configures the HTTP CORS middleware. CORS lives outside the auth chain so OPTIONS preflight returns 204 before rate-limit is consulted (PROJECT-DETAILS §4.4 acceptance criterion).

KeyTypeDescription
server.cors.allowedheaders[]string
server.cors.allowedmethods[]string
server.cors.allowedorigins[]string
server.cors.enabledbool

server.tls

TLSConfig configures TLS termination for the listeners. Three modes: - Enabled=false: plain TCP. Insecure; only appropriate for dev loopback or behind a TLS-terminating ingress. - Enabled=true + CertFile/KeyFile both set: file-sourced cert/key. Conventional production setup with externally-provisioned PKI. - Enabled=true + CertFile/KeyFile both empty: identity-provider sourced. The embedded provider (Epic 09) issues a server SVID for spiffe://<td>/server/control-plane and refreshes it on each signing-CA rotation. Requires Identity.Enabled=true. Both modes enforce TLS 1.3 minimum + mTLS request semantics (ClientAuth = tls.VerifyClientCertIfGiven so API-key clients can still authenticate over TLS without a peer cert).

KeyTypeDescription
server.tls.certfilestring
server.tls.enabledbool
server.tls.keyfilestring

logging

LoggingConfig configures the structured logger.

KeyTypeDescription
logging.formatstring
logging.levelstring

storage

StorageConfig configures the persistence backend.

KeyTypeDescription
storage.driverstring
storage.dsnstring

health

HealthConfig configures the kscore-server liveness/readiness surface. PROJECT-DETAILS §4.4: /health/ready respects a startup grace period to avoid false-not-ready signals during boot.

KeyTypeDescription
health.checktimeouttime.Duration
health.startupgraceperiodtime.Duration

nats

NATSConfig configures the v1.0 NATS transport. Endpoints (Task 2/3) supersedes URLs for richer config (priority, weight, tags). Both are accepted for ergonomics: simple deployments list URLs; HA deployments use Endpoints. They are mutually exclusive in external mode — populating both is rejected at Validate.

KeyTypeDescription
nats.bootstrapBootstrapConfig
nats.circuitbreakerCircuitBreakerConfig
nats.clusternamestring
nats.credentialstring
nats.dedupDedupConfig
nats.embeddedEmbeddedNATSConfig
nats.endpoints[]EndpointConfig
nats.jetstreamJetStreamConfig
nats.maxreconnectdelaytime.DurationMaxReconnectDelay caps the exponential-backoff curve. 30s default — fast enough that a recovered CP draws agents back inside half a minute, slow enough that a flapping CP doesn’t get hammered once base*2^N reaches the cap.
nats.maxreconnectsint
nats.modeNATSMode
nats.reconnectjitterfloat64ReconnectJitter is the ±factor symmetric jitter applied to each backoff delay. 0.2 default (20%) — fleet-scale reconnect-storm protection against 1000-agent lock-step reconnects (Epic 06 risk). AWS decorrelated jitter is the gold standard at >500-agent scale; tracked in ROADMAP.
nats.reconnectwaittime.DurationReconnectWait is the base of the exponential-backoff curve. Epic 06 task 10 replaced the constant-delay nats.ReconnectWait with nats.CustomReconnectDelay using reconnectDelay(attempt, ReconnectWait, MaxReconnectDelay, ReconnectJitter) — so this field still names the floor, but actual delays grow per attempt up to MaxReconnectDelay with ±ReconnectJitter spread.
nats.tokenstring
nats.urls[]string

nats.bootstrap

BootstrapConfig governs the v1.0 server-side bootstrap registration handler (Epic 05 task 9). Defaults to disabled — operators opt in by setting Enabled=true and populating PSKs. A “default on with no PSKs” stance would be a footgun (looks permissive, actually rejects everything); explicit opt-in surfaces the dependency. PSKs are config-listed in v1.0; consumed PSKs are tracked in- memory so a server restart wipes the consumption record. Operators are expected to rotate PSKs (issue fresh ones per agent, don’t reuse). v1.x will persist consumption in the state DB and add an API endpoint to issue PSKs.

KeyTypeDescription
nats.bootstrap.enabledbool
nats.bootstrap.psks[]BootstrapPSK

nats.bootstrap.psks

BootstrapPSK describes one operator-issued bootstrap credential. Secret is hex-encoded so config files stay copy-pasteable; the validator hex-decodes once at construction. ExpiresAt is the hard cutoff after which Validate rejects the PSK.

KeyTypeDescription
nats.bootstrap.psks.agentidstring
nats.bootstrap.psks.expiresattime.Time
nats.bootstrap.psks.secretstring

nats.circuitbreaker

CircuitBreakerConfig configures the per-endpoint circuit breaker (Epic 05 task 7). State machine: closed → open → half-open → closed. PROJECT-DETAILS §4.2. v1.0 wiring: each endpoint owns one breaker. ConnectionManager drives transitions via the disconnect/reconnect callbacks already in place from task 2; Health degrades to error when every endpoint is OPEN. Active dial-time eviction (skipping OPEN endpoints when nats.go picks the next reconnect target) is deferred to v0.x — it requires replacing nats.go’s native multi-URL failover with a per-endpoint dial loop, which is a substantial refactor for marginal v1.0 benefit.

KeyTypeDescription
nats.circuitbreaker.enabledbool
nats.circuitbreaker.failurethresholdint
nats.circuitbreaker.halfopenmaxattemptsint
nats.circuitbreaker.opendurationtime.Duration
nats.circuitbreaker.successthresholdint

nats.dedup

DedupConfig configures producer-side message dedup (Epic 05 task 6). Defaults follow PROJECT-DETAILS §4.2: 5m window, large but bounded entry cap. Per-subject overrides let operators shrink the window for low-RTT subjects (heartbeats) or enlarge it for high- retry ones.

KeyTypeDescription
nats.dedup.cleanupintervaltime.Duration
nats.dedup.enabledbool
nats.dedup.maxentriesint
nats.dedup.persubjectoverrides[]SubjectOverride
nats.dedup.windowdurationtime.Duration

nats.dedup.persubjectoverrides

SubjectOverride applies a non-default WindowDuration to subjects matching Prefix (longest prefix wins; equality counts as a prefix match).

KeyTypeDescription
nats.dedup.persubjectoverrides.prefixstring
nats.dedup.persubjectoverrides.windowdurationtime.Duration

nats.embedded

EmbeddedNATSConfig configures the in-process nats-server/v2 instance started when Mode == NATSModeEmbedded. JetStream is gated by JetStreamConfig.Enabled — there is no separate embedded toggle so the two flags can never disagree.

KeyTypeDescription
nats.embedded.hoststring
nats.embedded.maxconnectionsint
nats.embedded.maxmemoryint64
nats.embedded.portint

nats.endpoints

EndpointConfig is the structured form of a single NATS endpoint consumed by ConnectionManager. Priority orders the connect-attempt list (higher first). Weight is reserved for post-v1.0 load distribution and ignored today. Tags are operator labels passed through to EndpointSnapshot for observability.

KeyTypeDescription
nats.endpoints.priorityint
nats.endpoints.tags[]string
nats.endpoints.urlstring
nats.endpoints.weightint

nats.jetstream

JetStreamConfig governs JetStream enablement and per-stream defaults. v1.0 streams (commands + events) inherit StreamMaxAge, StreamMaxBytes, StreamMaxMsgs, and StreamReplicas; per-stream overrides are reserved for v1.x. Enabled is the single switch — when true, the embedded server (if running) starts with JetStream and Manager auto-creates the commands/events streams. When false, no streams are touched and the embedded server runs without JetStream.

KeyTypeDescription
nats.jetstream.enabledbool
nats.jetstream.maxstorageint64
nats.jetstream.storedirstring
nats.jetstream.streammaxagetime.Duration
nats.jetstream.streammaxbytesint64
nats.jetstream.streammaxmsgsint64
nats.jetstream.streamreplicasint

agent

AgentConfig governs the kscore-agent daemon (Epic 06). Loaded from the same config file as the server’s sections (per PROJECT-DETAILS §4.6, agent’s config file lists agent.* alongside nats.* and security.*); the kscore-server binary ignores this section. AgentID is generally set by Task 6’s bootstrap engine and persisted to disk; for v1.0’s pre-bootstrap world it must be supplied via config. ClusterName is shared with the rest of the system via NATSConfig.ClusterName — the agent reads it from there.

KeyTypeDescription
agent.bootstrappskstringBootstrapPSK is the hex-encoded pre-shared key this agent presents at boot to register with the control plane. When non-empty, the agent publishes a bootstrap.register envelope at Start before the heartbeat loop begins. The server-side PSK list lives at nats.bootstrap.psks. Leave empty for v0.1- style deployments where the operator pre-provisions agent rows out-of-band.
agent.commandtimeouttime.Duration
agent.heartbeatintervaltime.Duration
agent.idstring
agent.labelsmap[string]string
agent.metadataintervaltime.Duration

security

SecurityConfig governs the agent-side SecurityEnforcer (Epic 06 task 4/5) and the control-plane-side command signer. Both binaries read the same security.* section so the HMAC secret, default policy, and command/principal rules stay in lockstep. HMACSecret is hex-encoded so config files stay copy-pasteable; the binary decodes once at startup. Empty HMACSecret disables the HMAC check (escape hatch for fresh agents pre-bootstrap; v1.x can require non-empty when bootstrap-derived keys land). PROJECT-DETAILS §4.6 lists security.{authorization, command_filter} as the agent’s top-level security keys; v1.0 flattens them into the fields below.

KeyTypeDescription
security.commandallowglobs[]string
security.commandallowregexes[]string
security.commanddenyglobs[]string
security.commanddenyregexes[]string
security.defaultpolicystring
security.envvarallowlist[]string
security.hmacsecretstring
security.maxargsbytesint
security.principalallowlist[]string

identity

IdentityConfig drives the embedded identity provider boot in kscore-server (Epic 09 task 12). All fields have v0.1 defaults that work for a single-server dev / external-tester install; production multi-CP deployments override TrustDomain + StoragePath.

KeyTypeDescription
identity.enabledboolEnabled toggles the embedded identity provider on/off. v0.1 defaults to true so a fresh kscore-server boots with a working CA + join-token endpoint. Operators who don’t want identity (e.g. running their own SPIRE) set this false.
identity.encryption_keystringEncryptionKey turns on encryption-at-rest for the CA private keys under StoragePath. Empty (the default) keeps the plaintext FileCAStorage surface — fully backward-compatible. When set, it is a scheme-prefixed master-key source resolved by masterkey.Resolve — env:VAR_NAME, file:/path/to/keyfile, or inline:<hex|base64> — and the provider uses EncryptedFileCAStorage. Migrate an existing plaintext directory with kscore-identity ca encrypt before enabling this.
identity.join_tokens_in_memoryboolJoinTokensInMemory forces the provider to use an in-memory JoinTokenStore even when a state.Store is otherwise available. Defaults false — the v0.1 production path wires the state-backed store so tokens survive restarts. Useful for development / CI when the test harness doesn’t want join-token persistence to bleed across runs.
identity.key_typestringKeyType selects the asymmetric algorithm for the root + signing CAs. Defaults to “ecdsa-p256” (per identity.KeyTypeECDSAP256). Other valid values: “ecdsa-p384”, “rsa-2048”, “rsa-4096”.
identity.storage_pathstringStoragePath is the directory that holds the CA cert + key files. Defaults to “./.kscore/identity” — operators are expected to override in production (e.g. “/var/lib/kscore/identity”).
identity.trust_domainstringTrustDomain is the SPIFFE trust domain. Defaults to identity.DefaultTrustDomain (“kscore.local”). Validation happens inside identity.NewSPIFFEID at construction time.

secrets

SecretsConfig drives the Epic 10 secrets boot in kscore-server. The shape mirrors PROJECT-DETAILS §4.11’s YAML example exactly: secrets: enabled: true default_backend: file backends: - name: file type: encrypted_file file: { path: /var/lib/keystone/secrets.bin, master_key: env:KSCORE_SECRETS_MASTER } - name: vault type: vault vault: { address: https://vault.internal , auth_method: approle, … } routing: - prefix: secret/ backend: vault - prefix: kv/ backend: file cache: { enabled: true, max_entries: 10000, default_ttl: 5m } lease: { poll_interval: 30s, jitter: 0.1, default_strategy: lazy } Enabled defaults to false — operators opt in. A stock kscore-server without secrets.enabled: true runs the rest of the stack unchanged; the gRPC SecretsService returns codes.Unavailable + REST returns 503 when called.

KeyTypeDescription
secrets.auditSecretsAuditConfig
secrets.backends[]SecretsBackendConfig
secrets.cacheSecretsCacheConfig
secrets.default_backendstring
secrets.enabledbool
secrets.leaseSecretsLeaseConfig
secrets.routing[]SecretsRouteConfig

secrets.audit

SecretsAuditConfig drives the audit-emission infrastructure (Epic 10 task 11). Wires LogAuditor (always) + BufferedAuditor (when BufferSize > 0) + an optional SamplingAuditor wrapping the log auditor when SamplingFraction < 1.0. Epic 12’s AuditStore will plug in here once it ships.

KeyTypeDescription
secrets.audit.buffer_sizeintBufferSize is the in-memory ring-buffer capacity (the PROJECT-DETAILS §4.12 “Auditor circular buffer”). 0 disables the buffer; positive enables. Default 10000.
secrets.audit.sampling_fractionfloat64SamplingFraction is the probability each successful event reaches the log auditor (in [0, 1]). 1.0 = no sampling (default). Failures + cap-refusals always emit regardless.

secrets.backends

SecretsBackendConfig is one operator-declared backend instance. Exactly one of [File] / [Vault] must be set and must match [Type].

KeyTypeDescription
secrets.backends.file*SecretsFileBackendConfig
secrets.backends.namestring
secrets.backends.typestring
secrets.backends.vault*SecretsVaultBackendConfig

secrets.backends.file

SecretsFileBackendConfig drives the encrypted-file backend (internal/secrets/file). MasterKey is the scheme-prefixed value resolved by masterkey.Resolveenv:VAR_NAME, file:/path/to/keyfile, or inline:<hex\|base64>.

KeyTypeDescription
secrets.backends.file.master_keystring
secrets.backends.file.pathstring

secrets.backends.vault

SecretsVaultBackendConfig drives the Vault backend (internal/secrets/vault).

KeyTypeDescription
secrets.backends.vault.addressstring
secrets.backends.vault.approle*SecretsVaultAppRoleConfig
secrets.backends.vault.auth_methodstring
secrets.backends.vault.kubernetes*SecretsVaultK8sConfig
secrets.backends.vault.ldap*SecretsVaultLDAPConfig
secrets.backends.vault.mounts[]SecretsVaultMountConfig
secrets.backends.vault.namespacestring
secrets.backends.vault.timeouttime.Duration
secrets.backends.vault.tlsSecretsVaultTLSConfig
secrets.backends.vault.tokenstring

secrets.backends.vault.approle

SecretsVaultAppRoleConfig — RoleID + SecretID. SecretID may itself be a wrapping token (per Vault’s response-wrapping flow).

KeyTypeDescription
secrets.backends.vault.approle.mountstring
secrets.backends.vault.approle.role_idstring
secrets.backends.vault.approle.secret_idstring
secrets.backends.vault.approle.secret_id_is_wrapping_tokenbool

secrets.backends.vault.kubernetes

SecretsVaultK8sConfig — Kubernetes ServiceAccount-based auth.

KeyTypeDescription
secrets.backends.vault.kubernetes.mountstring
secrets.backends.vault.kubernetes.rolestring
secrets.backends.vault.kubernetes.token_pathstring

secrets.backends.vault.ldap

SecretsVaultLDAPConfig — LDAP username/password auth.

KeyTypeDescription
secrets.backends.vault.ldap.mountstring
secrets.backends.vault.ldap.passwordstring
secrets.backends.vault.ldap.usernamestring

secrets.backends.vault.mounts

SecretsVaultMountConfig declares the KV engine version for one Vault mount path — see internal/secrets/vault.MountConfig.

KeyTypeDescription
secrets.backends.vault.mounts.kv_versionint
secrets.backends.vault.mounts.pathstring

secrets.backends.vault.tls

SecretsVaultTLSConfig configures HTTPS to Vault.

KeyTypeDescription
secrets.backends.vault.tls.ca_certstring
secrets.backends.vault.tls.client_certstring
secrets.backends.vault.tls.client_keystring
secrets.backends.vault.tls.insecurebool
secrets.backends.vault.tls.server_namestring

secrets.cache

SecretsCacheConfig drives the [secrets.SecretCache]. Enabled defaults to true when secrets are enabled — operators rarely want to disable caching, but explicit enabled: false falls back to the no-op cache.

KeyTypeDescription
secrets.cache.default_ttltime.Duration
secrets.cache.enabledbool
secrets.cache.max_entriesint
secrets.cache.sweep_intervaltime.Duration

secrets.lease

SecretsLeaseConfig drives the [secrets.LeaseManager].

KeyTypeDescription
secrets.lease.default_strategystring
secrets.lease.jitterfloat64
secrets.lease.poll_intervaltime.Duration
secrets.lease.renew_timeouttime.Duration

secrets.routing

SecretsRouteConfig is one row in the broker’s routing table.

KeyTypeDescription
secrets.routing.backendstring
secrets.routing.prefixstring

events

EventsConfig drives the Epic 11 events boot in kscore-server. events: enabled: true publisher: enabled: true buffer_size: 1000 flush_timeout: 100ms store_first: true subscriber: enabled: true dedup_size: 1000 Enabled defaults to true — events are foundational v1.0 infrastructure and most deployments running NATS expect them on. Operators explicitly disable via events.enabled: false. When disabled, the gRPC EventService returns codes.Unavailable + REST returns 503; the JetStreamPublisher / Subscriber are skipped at boot. Validation requires NATS JetStream to be enabled when events is enabled — the publisher / subscriber both need a JetStream context.

KeyTypeDescription
events.enabledbool
events.publisherEventsPublisherConfig
events.retentionEventsRetentionConfig
events.subscriberEventsSubscriberConfig

events.publisher

EventsPublisherConfig drives the JetStreamPublisher (Epic 11 task 3). - Enabled: gates the publisher specifically. Defaults true when parent Events is enabled. Setting false runs Events with the NoopPublisher (subscriber + REST list/get still work). - BufferSize / FlushTimeout: async-pipeline knobs from task 3. Defaults match the package’s Default* constants. - StoreFirst: when true (default), publisher persists to the EventStore before NATS publish; failures abort. When false, publishes go straight to NATS (no audit trail). Most deployments leave this on.

KeyTypeDescription
events.publisher.buffer_sizeint
events.publisher.enabledbool
events.publisher.flush_timeouttime.Duration
events.publisher.store_firstbool

events.retention

EventsRetentionConfig drives the Epic 11 task 8 retention enforcer — the hourly scheduler that calls events.EventStore.ApplyRetention to bound store growth. Defaults to enabled with a built-in catch-all policy matching the §4.9 JetStream stream defaults (7 days / 1M events). Operators either keep the catch-all and add per-type overrides, or set events.retention.enabled: false to opt out entirely. events: retention: enabled: true interval: 1h jitter: 0.1 policies: - type: "" # catch-all max_age: 168h # 7 days max_count: 1000000 - type: agent.heartbeat max_age: 24h - type: job.output max_age: 720h # 30 days

KeyTypeDescription
events.retention.enabledbool
events.retention.intervaltime.Duration
events.retention.jitterfloat64
events.retention.policies[]EventsRetentionPolicy

events.retention.policies

EventsRetentionPolicy is one row in the retention table. Type empty is the catch-all rule (applies to every event type not matched by a more-specific policy). Each policy must have at least one limit (MaxAge > 0 OR MaxCount > 0) — zero-zero is rejected by validation as a no-op typo.

KeyTypeDescription
events.retention.policies.max_agetime.Duration
events.retention.policies.max_countint
events.retention.policies.typestring

events.subscriber

EventsSubscriberConfig drives the JetStreamSubscriber (Epic 11 task 4). - Enabled: gates the subscriber specifically. Defaults true. Setting false makes SubscribeEvents return Unavailable. - DedupSize: bounded ID dedup ring (task 4). Defaults 1000.

KeyTypeDescription
events.subscriber.dedup_sizeint
events.subscriber.enabledbool

cluster

ClusterConfig drives the Epic 13 clustering/HA boot in kscore-server (PROJECT-DETAILS §4.15). cluster: enabled: false node: name: "" # empty → derived from etcd.name advertise_addr: "" # host:port peers dial (server↔server) etcd: mode: embedded # embedded | external name: kscore-1 data_dir: ./data/etcd client_urls: ["http://127.0.0.1:2379 "] peer_urls: ["http://127.0.0.1:2380 "] endpoints: [] # external mode only lease_ttl_seconds: 15 dial_timeout: 5s auto_sync_interval: 5m membership: heartbeat_interval: 5s key_prefix: /kscore/cluster election: session_ttl_seconds: 3 recampaign_delay: 1s shard: virtual_nodes: 150 rebalance_cooldown: 5s health: check_interval: 5s failure_threshold: 3 latency_window: 100 failover: cooldown: 10s agent_batch: 100 job_batch: 50 recovery: connect_timeout: 5s connect_retries: 3 fencing: mode: read_only # strict | read_only | graceful coordination: listen_addr: "" # host:port mTLS listener bind; empty → none heartbeat_interval: 5s heartbeat_timeout: 2s failure_threshold: 3 retry_max: 4 retry_base_delay: 100ms retry_max_delay: 2s shutdown: timeout: 30s Enabled defaults to false: the single-node path stays the default and clustering is strictly opt-in. When disabled, no etcd is started and the ClusterService/CoordinationService are not registered (later Epic 13 tasks). The wiring that translates this into a running internal/cluster.EtcdClient lands with a later Epic 13 task; Task 1 ships the config surface + validation.

KeyTypeDescription
cluster.coordinationClusterCoordinationConfig
cluster.electionClusterElectionConfig
cluster.enabledbool
cluster.etcdClusterEtcdConfig
cluster.failoverClusterFailoverConfig
cluster.fencingClusterFencingConfig
cluster.healthClusterHealthConfig
cluster.membershipClusterMembershipConfig
cluster.nodeClusterNodeConfig
cluster.recoveryClusterRecoveryConfig
cluster.shardClusterShardConfig
cluster.shutdownClusterShutdownConfig

cluster.coordination

ClusterCoordinationConfig is the operator-facing server↔server CoordinationService/Client config (Epic 13 tasks 12/13). The runtime equivalents are the dedicated mTLS coordination listener + controlplane.CoordinationClientConfig; boot wiring maps onto them.

KeyTypeDescription
cluster.coordination.failure_thresholdintFailureThreshold is the consecutive heartbeat failures after which a peer is marked unreachable.
cluster.coordination.heartbeat_intervaltime.DurationHeartbeatInterval is how often each peer is NodeHeartbeat’d.
cluster.coordination.heartbeat_timeouttime.DurationHeartbeatTimeout bounds each heartbeat RPC.
cluster.coordination.listen_addrstringListenAddr is the host:port the dedicated mTLS coordination gRPC listener binds (the server↔server channel, separate from the agent/operator surface). Distinct from node.advertise_addr (what peers dial): ListenAddr is the local bind (e.g. “0.0.0.0:9443”) while advertise_addr is the routable address recorded in the member record. Empty ⇒ no coordination listener is started (this node serves no server↔server channel); when set it must be a valid host:port.
cluster.coordination.retry_base_delaytime.DurationRetryBaseDelay / RetryMaxDelay bound the exponential backoff.
cluster.coordination.retry_maxintRetryMax is the max attempts per coordination RPC.
cluster.coordination.retry_max_delaytime.Duration

cluster.election

ClusterElectionConfig is the operator-facing leader-election config (Epic 13 task 3). The runtime equivalent is cluster.ElectionConfig; boot wiring (later task) maps onto it. The election session lease is separate from the membership lease: it is tuned to the “first/new leader < 3s” failover SLO, not the membership 3×-heartbeat anti-flap rule. SLO verification + any tuning is Epic 13 task 18.

KeyTypeDescription
cluster.election.recampaign_delaytime.DurationReCampaignDelay is how long TransferLeadership waits after resigning before re-campaigning, so a peer reliably takes over rather than the resigner immediately winning again.
cluster.election.session_ttl_secondsintSessionTTLSeconds is the etcd concurrency-session TTL; a dead leader’s lock expires within ~this long, so it bounds failover time. §4.15 SLO target default 3s.

cluster.etcd

ClusterEtcdConfig is the operator-facing etcd backend config. internal/cluster owns the runtime equivalent (cluster.EtcdConfig); boot wiring (later task) maps this onto it.

KeyTypeDescription
cluster.etcd.auto_sync_intervaltime.Duration
cluster.etcd.client_urls[]string
cluster.etcd.data_dirstring
cluster.etcd.dial_timeouttime.Duration
cluster.etcd.endpoints[]string
cluster.etcd.lease_ttl_secondsint
cluster.etcd.modestring
cluster.etcd.namestring
cluster.etcd.peer_urls[]string
cluster.etcd.tlsTLSConfig

cluster.failover

ClusterFailoverConfig is the operator-facing failover config (Epic 13 task 8). The runtime equivalent is cluster.FailoverManagerConfig; boot wiring (later task) maps onto it.

KeyTypeDescription
cluster.failover.agent_batchintAgentBatch is the agent-reassignment batch size. §4.15 default 100.
cluster.failover.cooldowntime.DurationCooldown is the minimum spacing between failover episodes (rapid flapping members coalesce). §4.15 default 10s — distinct from the shard rebalance cooldown (5s).
cluster.failover.job_batchintJobBatch is the job-reassignment batch size. §4.15 default 50.

cluster.fencing

ClusterFencingConfig is the operator-facing split-brain fencing config (Epic 13 task 11). The runtime equivalent is cluster.FencingManagerConfig; boot wiring (later task) maps onto it.

KeyTypeDescription
cluster.fencing.modestringMode is how hard a fenced (minority / stale-epoch) node blocks operations: “strict” (block all), “read_only” (allow reads, block writes) or “graceful” (finish in-flight, block new). §4.15 acceptance (“minority blocks writes, reads continue”) = read_only, the default.

cluster.health

ClusterHealthConfig is the operator-facing health-monitor config (Epic 13 task 7). The runtime equivalent is cluster.HealthMonitorConfig; boot wiring (later task) maps onto it.

KeyTypeDescription
cluster.health.check_intervaltime.DurationCheckInterval is how often the registered checkers run.
cluster.health.failure_thresholdintFailureThreshold is the consecutive-failure count at which a checker is considered failing. §4.15 default 3.
cluster.health.latency_windowintLatencyWindow is how many recent check durations are kept per checker for P50/P99.

cluster.membership

ClusterMembershipConfig is the operator-facing membership config (Epic 13 task 2). The runtime equivalent is cluster.MembershipConfig; boot wiring (later task) maps onto it.

KeyTypeDescription
cluster.membership.heartbeat_intervaltime.DurationHeartbeatInterval is how often a member refreshes its observable liveness. §4.15 default 5s.
cluster.membership.key_prefixstringKeyPrefix roots the etcd keyspace for this cluster’s member records (and, later, shard/leader keys).

cluster.node

ClusterNodeConfig identifies this server within the cluster (Epic 13 boot wiring). Distinct from cluster.etcd.name (the etcd member name): Name is this node’s stable Keystone member identity, recorded in the membership record and reused across restarts so RecoveryManager can reclaim this node’s shards.

KeyTypeDescription
cluster.node.advertise_addrstringAdvertiseAddr is the host:port peers use to reach this node’s server↔server coordination channel. It is recorded in the member record now; the CoordinationClient that dials it is a later Epic 13 task. Empty is allowed (no peer can dial this node yet); when set it must be a valid host:port.
cluster.node.namestringName is this member’s stable cluster identity. Empty → derived from cluster.etcd.name at boot.

cluster.recovery

ClusterRecoveryConfig is the operator-facing restart-recovery config (Epic 13 task 10). The runtime equivalent is cluster.RecoveryManagerConfig; boot wiring (later task) maps onto it.

KeyTypeDescription
cluster.recovery.connect_retriesintConnectRetries is how many times CONNECTING retries the probe before recovery fails.
cluster.recovery.connect_timeouttime.DurationConnectTimeout bounds each etcd reachability probe during the CONNECTING phase.

cluster.shard

ClusterShardConfig is the operator-facing consistent-hash + rebalance config (Epic 13 tasks 4/6). The runtime equivalents are the cluster.HashRing vnode count and the ShardManager cooldown; boot wiring (later task) maps onto them.

KeyTypeDescription
cluster.shard.rebalance_cooldowntime.DurationRebalanceCooldown is the minimum spacing between topology-driven rebalances; rapid member join/leave flaps coalesce into one rebalance after the window. §4.15 default 5s.
cluster.shard.virtual_nodesintVirtualNodes is the number of ring points per member. More vnodes = smoother key distribution + less rebalancing churn, at a higher ring-rebuild cost. §4.15 default 150.

cluster.shutdown

ClusterShutdownConfig is the operator-facing graceful-shutdown config (Epic 13 task 14). The runtime equivalent is cluster.GracefulShutdownConfig; boot wiring (later task) maps onto it.

KeyTypeDescription
cluster.shutdown.timeouttime.DurationTimeout bounds the DEREGISTERING phase (in-flight drain + member-key removal). §4.15 default 30s.

gitops

GitOpsConfig drives the Epic 16 GitOps integration. Task 1 ships the inbound webhook receiver sub-config only; verification, rollback and outbound webhooks extend this struct in later tasks. gitops: webhook: enabled: false addr: “:8081” path: “/webhooks” max_body_bytes: 1048576 sources: github: method: hmac # none|hmac|bearer secret: ${KSCORE_GITOPS_WEBHOOK_SOURCES_GITHUB_SECRET} gitlab: method: bearer secret: … Enabled defaults to false: the receiver opens a network port and (from task 4) re-emits onto the event bus, so it is opt-in rather than on-by-default infrastructure. Operators turn it on with gitops.webhook.enabled: true.

KeyTypeDescription
gitops.webhookGitOpsWebhookConfig

gitops.webhook

GitOpsWebhookConfig is the inbound webhook receiver block. Addr defaults to “:8081” — distinct from the main REST API on server.httpport (:8080); colliding the two would wedge boot.

KeyTypeDescription
gitops.webhook.addrstring
gitops.webhook.enabledbool
gitops.webhook.max_body_bytesint64
gitops.webhook.pathstring
gitops.webhook.sourcesmap[string]GitOpsSourceAuthConfigSources maps a provider (github|gitlab|argocd|flux) to its inbound authentication. A provider absent from the map is authenticated open ([webhook.NoneAuthenticator]) and flagged by [Config.ProductionWarnings]. v1.0: one secret per source; rotation requires a restart (PROJECT-DETAILS §4.13).

webhook

WebhookConfig drives the outbound webhooks subsystem (Epic 16 tasks 11..18 / PROJECT-DETAILS §4.14). The top-level webhook key is owned by outbound for v1.0; inbound non-GitOps webhooks are v1.x (the GitOps inbound block lives at gitops.webhook). webhook: outbound: enabled: false max_retries: 3 retry_backoff: 1s timeout: 10s max_payload_size: 1048576 delivery_retention: 168h max_concurrent_deliveries: 32 refresh_interval: 30s Enabled defaults to false (opt-in; the same posture as gitops.webhook.enabled).

KeyTypeDescription
webhook.outboundWebhookOutboundConfig

webhook.outbound

WebhookOutboundConfig is the outbound-webhooks block. - MaxRetries / RetryBackoff drive the task-14 RetryQueue. - Timeout caps each task-13 Dispatcher.Deliver call. - MaxPayloadSize bounds the JSON event payload — over-size events are recorded as one synthetic failed delivery. - DeliveryRetention is the task-9 / task-11 retention enforcer horizon (auto-invocation = post-v1.0 dot release per §4.14). - MaxConcurrentDeliveries / RefreshInterval drive the task-12 Manager (fan-out cap and subscription-cache reload cadence).

KeyTypeDescription
webhook.outbound.delivery_retentiontime.Duration
webhook.outbound.enabledbool
webhook.outbound.max_concurrent_deliveriesint
webhook.outbound.max_payload_sizeint64
webhook.outbound.max_retriesint
webhook.outbound.refresh_intervaltime.Duration
webhook.outbound.retry_backofftime.Duration
webhook.outbound.timeouttime.Duration

metrics

MetricsConfig configures the Prometheus exposition surface. PROJECT-DETAILS §4.16: /metrics is on the main HTTP server, unauthenticated, no rate-limit — same posture as /health/*.

KeyTypeDescription
metrics.enabledboolEnabled toggles registration of the /metrics handler. Default true (epic line 14: “default true”); set false in deployments where the operator routes scrape traffic differently.
metrics.pathstringPath is the URL path the handler mounts on. Default “/metrics”. Operators who reverse-proxy under a non-standard prefix override this so the inner mount matches the proxy’s rewrite.

tracing

TracingConfig configures the Epic 17 task 4 OTel trace pipeline. Disabled by default — 100% sampling adds 5-10% latency at scale (PROJECT-DETAILS §4.16 gotcha), so operators opt in explicitly.

KeyTypeDescription
tracing.batchsizeintBatchSize is the sdktrace batch processor MaxExportBatchSize. Default 512.
tracing.enabledboolEnabled toggles the whole pipeline. Default false. When false, internal/tracing.New returns a noop TracerProvider.
tracing.endpointstringEndpoint is the collector URL (or addr:port for OTLP gRPC). Required when Exporter is not stdout; ignored for stdout.
tracing.exporterstringExporter selects the span sink. One of stdout / otlp_grpc / otlp_http / zipkin. Default stdout — operator-visible without needing a collector.
tracing.flushintervaltime.DurationFlushInterval is the sdktrace batch processor BatchTimeout — the longest a span will wait before being exported. Default 5s.
tracing.insecureboolInsecure disables TLS for OTLP exporters. Stdout/Zipkin ignore this. Default false (TLS required) so production-wired collectors don’t accidentally negotiate plaintext.
tracing.queuesizeintQueueSize is the sdktrace batch processor MaxQueueSize. Default 2048. Must be >= BatchSize.
tracing.ratelimitpersecondintRateLimitPerSecond bounds the rate_limiting sampler’s accepts. Default 100. Above-rate spans return Drop. Honors parent decisions per OTel convention.
tracing.samplerstringSampler selects the sampling strategy. Default probabilistic at SampleRate. Adaptive is intentionally NOT supported in v1.0 — see ROADMAP entry for the v2.x+ adaptive-sampling work.
tracing.sampleratefloat64SampleRate is the [0,1] sampling fraction for the probabilistic sampler and the probabilistic fallback inside parent_based. Default 0.1 (PROJECT-DETAILS §4.16 line 1126).
tracing.servicenamestringServiceName is the resource attribute service.name. Default “kscore-server”; per-binary wiring may override (e.g. “kscore-agent” in the agent runtime).

profiling

ProfilingConfig configures the opt-in pprof endpoint. PROJECT-DETAILS §4.16 — “Default off; opt-in via profiling.enabled=true. Listen port default 6060.” Default Host is 127.0.0.1: pprof can leak heap state and bottleneck under CPU profile load, so operators who flip Enabled must explicitly widen the bind to reach the LAN.

KeyTypeDescription
profiling.blockprofilerateintBlockProfileRate is passed to runtime.SetBlockProfileRate on Start. Default 0 means “no block profile” (the runtime default). Non-zero N samples blocking events whose duration exceeds N nanoseconds. Same overhead caveat as MutexProfileFraction.
profiling.enabledboolEnabled toggles the whole pprof listener. Default false. When false the server is never constructed.
profiling.hoststringHost is the bind address. Default “127.0.0.1” (localhost-only). Operators who want LAN reachability set this to “0.0.0.0” and accept the security responsibility — pprof has no auth and is not appropriate for public exposure.
profiling.mutexprofilefractionintMutexProfileFraction is passed to runtime.SetMutexProfileFraction on Start. Default 0 means “no mutex profile” (the runtime default). Non-zero N records 1/N mutex contention events. Has non-trivial overhead; leave at 0 unless actively debugging contention.
profiling.portintPort is the bind port. Default 6060 (conventional Go pprof). Range [1, 65535]; zero is rejected when Enabled.
profiling.shutdowntimeouttime.DurationShutdownTimeout caps the graceful-shutdown wait when the server is asked to stop. Default 5 seconds.

blueprints

BlueprintsConfig wires the optional v1.0 BlueprintService. Epic 19 task 2b — until the gate-v1.0 ROADMAP item “Remote / distributed blueprint apply wiring” lands, the server-side BlueprintService applies blueprints against the server’s local stdlib StateRunner (the same convergence path kscore-blueprint uses today). CatalogPath enables ListBlueprints / GetBlueprint / ApplyBlueprint over gRPC; empty disables them (clients reach Unavailable).

KeyTypeDescription
blueprints.catalogpathstring