Orca ORCA v0.174.2

settings

Environment Variables Gopher

The platform contract between the Runtime Environment and applications: the environment variable names and default values applications are configured by.

The platform owns the environment and guarantees the names and defaults here. The defaults are the platform's paved path: opinionated values that make a service work out of the box, overridden per service through the Runtime Environment when needed. Accessors implement the one agreed precedence rule, environment over paved default; interpreting values stays with the consumers.

Variables renamed to namespaced names (see the table) are still accepted under their old non-namespaced names until services and charts migrate; the canonical variable wins when both are set.

Installation

go get github.com/corticph/gocomo/settings

Variables

Env var Default Purpose
LOG_LEVEL info Minimum log level emitted (case-insensitive)
LOG_FORMAT json Log handler format (json or text)
PROBES_PORT 9090 Port for the /ready, /live and /startup probe server (legacy PROBE_PORT name still honored)
PROBES_READY_PATH /ready Readiness endpoint path (legacy READY_ENDPOINT name still honored)
PROBES_LIVE_PATH /live Liveness endpoint path (legacy LIVE_ENDPOINT name still honored)
PROBES_STARTUP_PATH /startup Startup probe endpoint path (legacy STARTUP_ENDPOINT name still honored)
HTTP_PORT 8080 Application port (legacy PORT name still honored)
HTTP_IDLE_TIMEOUT 2m0s http.Server IdleTimeout: bounds idle keep-alive connections only; safe to pave (legacy HTTP_SERVER_IDLE_TIMEOUT name still honored)
HTTP_READ_TIMEOUT unset http.Server ReadTimeout: absolute deadline covering the body; unset = consumer default (breaks streaming/uploads if paved) (legacy HTTP_SERVER_READ_TIMEOUT name still honored)
HTTP_WRITE_TIMEOUT unset http.Server WriteTimeout: absolute per-request deadline; unset = consumer default (breaks SSE/WebSockets if paved) (legacy HTTP_SERVER_WRITE_TIMEOUT name still honored)
HTTP_CLIENT_TIMEOUT 1s Outbound http.Client request timeout; bounds the whole request incl. reading the body, so streaming consumers override it
HTTP_CLIENT_ASYNC_TIMEOUT 15s Timeout for background outbound fetches that outlive the request that started them
HTTP_CACHE_TTL 5m0s TTL for HTTP-backed response caches
NATS_URI injected NATS connection URL (nats://… or tls://…), injected by platform-operator
NATS_CREDS_FILE injected Path to the injected NATS credentials file (/etc/nats-creds/nats.creds)
NATS_TLS_ENABLED injected "true" when mTLS is enabled
NATS_TLS_CERT_FILE injected Client cert path (/etc/nats-client-tls/tls.crt)
NATS_TLS_KEY_FILE injected Client key path (/etc/nats-client-tls/tls.key)
NATS_TLS_CA_FILE injected CA bundle path (/etc/nats-ca/ca.crt)
NATS_SUBJECT_PREFIX injected Subject prefix for tenanted NATS subjects (<namespace>.<cluster>.), injected by the mutating webhook

NATS

The NATS stanza of the platform contract. The values are injected by the platform-operator's mutating webhook into NATS-enabled Deployments; there are no paved defaults and no legacy names. Go clients read them through the accessors NATSURI(), NATSCredsFile(), NATSTLSEnabled(), NATSTLSCertFile(), NATSTLSKeyFile(), NATSTLSCAFile(), NATSSubjectPrefix(); non-Go clients read the env vars themselves (the VarNATS* constants pin the names). Pod-spec consumers use the volume/mount/path constants (NATSVolume*, NATSMount*, NATSCredsFilePath, NATSTLSCertFilePath, and the other NATS*FilePath values). The human-readable contract (annotations, ACL mechanics, credential rotation) stays in platform-operator's docs.