{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "Storage Cluster Controller Configuration Environment Schema",
  "description": "Environment variables required or available to configure the FermiHDI Storage Cluster Controller (SCC).",
  "type": "object",
  "properties": {
    "COMMAND_INTERFACE": {
      "type": "string",
      "description": "The networking interface binding the Control Plane (e.g., eth0)."
    },
    "OBSERVABILITY_INTERFACE": {
      "type": "string",
      "description": "The networking interface binding Prometheus and OTel unencrypted telemetry."
    },
    "LOG_LEVEL": {
      "type": "string",
      "description": "Logging verbosity (info, debug, warn, error)."
    },
    "OTEL_GRPC_URL": {
      "type": "string",
      "description": "The target gRPC endpoint for OpenTelemetry exports."
    },
    "PRODUCTION_INTERFACE": {
      "type": "string",
      "description": "The DPDK-bound networking interface actively routing raw production data."
    },
    "PRODUCTION_IP": {
      "type": "string",
      "description": "The specific IPv4 address reserved for DPDK production transfers."
    },
    "PRODUCTION_PORT": {
      "type": "integer",
      "default": 6987,
      "description": "The DPDK UDP/TCP listening port."
    },
    "RECORD_SIZE": {
      "type": "integer",
      "default": 150,
      "description": "The explicit byte boundary determining record splitting during sequential background hashing."
    },
    "HASH_ALGORITHM": {
      "type": "string",
      "default": "sha512",
      "description": "Cryptographic hashing specification governing Data Plane validation traces."
    },
    "MAX_HASH_QUEUE_BYTES": {
      "type": "integer",
      "description": "Megabyte limit configuring memory safety caps on the background hash processing queue protecting RAM footprint."
    },
    "BATCH_TIMEOUT_MS": {
      "type": "integer",
      "description": "Inactivity timer threshold in milliseconds dictating when to automatically severe lingering incomplete network ingest batches."
    },
    "TIMEOUT_ACTION": {
      "type": "string",
      "enum": [
        "EOB",
        "BBN"
      ],
      "default": "EOB",
      "description": "Action executed against uncompleted batches hitting timeout limits mapping directly to DPDK control frames."
    },
    "MASTER_CPUSET": {
      "type": "string",
      "default": "1-3",
      "description": "Thread mapping parameters pinning the execution scope exactly ensuring core-isolation for critical subsystems."
    },
    "TRANSPORT_CORES": {
      "type": "integer",
      "default": 1,
      "description": "The specific count of processor cores assigned exclusively bypassing the kernel inside DPDK."
    },
    "KV_CORES": {
      "type": "integer",
      "default": 1,
      "description": "The distinct internal CPU count scaling internal key-value lookup parameters directly."
    },
    "SN_TARGETS": {
      "type": "string",
      "description": "Comma-separated topology map strings identifying replica nodes specifically matching node_name:ip:control_port:prod_port structure (e.g., sn1:10.0.0.1:8000:6987)."
    },
    "DMS_URL": {
      "type": "string",
      "default": "https://dms-core:6986",
      "description": "Data Management System endpoint triggering bootstrap PKI initialization and CSR handshakes."
    },
    "FERMIHDI_BOOTSTRAP_TOKEN": {
      "type": "string",
      "description": "Optional ephemeral token for node registration v2 (RSA-4096)."
    },
    "K8S_SERVICEACCOUNT_TOKEN": {
      "type": "string",
      "description": "Optional K8s ServiceAccount token for registration."
    },
    "FERMIHDI_CLIENT_CERT_FILE": {
      "type": "string",
      "description": "Path to pre-issued X.509 client certificate."
    },
    "FERMIHDI_CLIENT_KEY_FILE": {
      "type": "string",
      "description": "Path to pre-issued X.509 private key."
    },
    "FERMIHDI_PKI_WRAP_KEY": {
      "type": "string",
      "description": "Optional AES key for encrypting persisted identity files."
    },
    "NODE_NAME": {
      "type": "string",
      "description": "Unique SCC identifier applied strictly across log context schemas."
    },
    "COMMAND_PORT": {
      "type": "integer",
      "default": 6986,
      "description": "REST API unencrypted listening port natively accepting HTTP inbound."
    },
    "OBSERVABILITY_PORT": {
      "type": "integer",
      "default": 8080,
      "description": "Prometheus/health endpoint."
    },
    "FERMIHDI_OPT_IN": {
      "type": "boolean",
      "default": false,
      "description": "Opt-in to enhanced developer support and crash reporting."
    },
    "SENTRY_DSN": {
      "type": "string",
      "description": "The Data Source Name (DSN) for Sentry error tracking."
    },
    "HASH_CHAIN_BLOCK_SIZE": {
      "type": "string",
      "description": "Number of record hashes per chain block (integer as string env var). Default: 64. Instance-wide \u2014 must be identical across all nodes.",
      "default": "64"
    }
  }
}
