rules.svc reads one bootstrap YAML file at start, overlays it with command-line flags, then merges
the result over the service node it resolves from the config plane. This page enumerates every key
the binary actually reads. Keys not listed here are not read by this service.
For what the service does with that configuration once it is up, see
Service. For diagnosing a boot that produced no output, see
Troubleshooting.
Highest — a non-empty flag overwrites the YAML value
Tenant config, per tenant
meta.url, meta.isexternal
Read from the tenant record, not the service section
The bootstrap file defaults to .rules.yaml in the working directory. Change it with -f.
Terminal window
rules.svc-f/etc/kis/rules.yaml
An empty flag falls back to the YAML value; a non-empty flag is written back into the bootstrap map
and wins. At boot the resolved config-plane node is fetched first and the bootstrap map is merged on
top of it, so a key present in the bootstrap file always beats the same key published by the config
plane. That includes port, which is re-read from the merged map immediately before the listener is
created.
These fourteen persistent flags and the version subcommand are everything the service declares.
The command framework adds its own help and completion commands on top.
Flag
Type
Default
Effect
-f, --config
string
.rules.yaml
Bootstrap YAML file path
-p, --port
string
none
HTTP listen port
--sid
string
none
Service instance id
--datacenter
string
none
Datacenter label
--cluster
string
none
Cluster label
--config_url
string
none
Config server URL
--config_apikey
string
none
Config server API key. Boot fails with error: either config.apikey or svccert should be present when config.url is set and neither is
--servicediscovery_url
string
none
Service registry URL
--servicediscovery_apikey
string
none
Service registry API key. Boot fails with error: either servicediscovery_apikey or svccert should be present when servicediscovery_url is set and neither is
--svccert
string
none
Service certificate path
--svckey
string
none
Service private key path
--rootcacert
string
none
Root CA certificate path
--jwt_public_key
string
none
Public key for verifying tenant tokens
--zerotrust
string
none — resolves to true
true (case-insensitive) serves over TLS; any other non-empty value is false, including yes and 1
There is no --host, no --log-level and no --jwt_private_key flag — those are configuration keys
only. rules.svc version prints the service name, version, commit hash, build timestamp and the
build’s age. The build number is compiled in but never printed.
When true the server is served over TLS with the configured service certificate. When false the certificate is still loaded but TLS resolution returns nil and the server listens in plain HTTP.
svccert
string (path)
""
Service certificate, PEM.
svckey
string (path)
""
Service private key, PEM.
rootcacert
string (path)
""
Root CA used to validate peers.
rootcakey
string (path)
""
Root CA key, used by certificate auto-renewal. No flag.
insecureskipverify
bool
false
Disables peer certificate verification.
auto_renew_certificates
bool
true
Enables automatic certificate renewal.
jwt_public_key
string (path)
""
Public key for verifying tenant tokens on /rule.
jwt_private_key
string (path)
""
Private key for signing tokens. Configuration only — this binary registers no flag for it.
Remote config server. Wins over config.path when both are set; config.path is then logged as ignored.
config.path
string (path)
""
Local directory of config documents.
config.apikey
string
""
API key for the remote config server.
config.cache
string (path)
""
Warm-cache file holding the last-known-good config, read when the remote is down. Remote mode only.
boot.retry_window
duration string or int seconds
90s
How long boot keeps retrying the service-discovery and config clients before giving up. Retries back off from 1s to a 10s ceiling. Raise it when the config plane starts after this service.
With neither config.url nor config.path set, the bootstrap file itself is the config source. A
config client that cannot be built inside the retry window fails boot with config-client-init and
exit 1.
Rule definitions reach the service only from the platform metadata plane. There is no local rules
directory, no import command and no admin endpoint — see
Service for the delivery path and document shape.
Key
Type
Default
Effect
meta.url
string (URL)
"" — required for rule loading
Metadata server. Rule loading reads it from the tenant’s config section; the same key in the service section only decides whether a chassis-level metadata client is registered. Without the tenant-level value that tenant has no rule source.
meta.isexternal
bool
false
Tenant-level flag telling the metadata client the server sits outside the trust boundary.
api.key
string
""
API key presented when initialising every per-tenant metadata client. The URL is per tenant; this key is global.
meta.apikey
string
""
API key for the chassis-registered metadata client, separate from the per-tenant clients above.
meta.dir
string (path)
""
Local metadata mirror, used only when meta.url is empty.
ReadTimeout on the HTTP server. An integer is read first; only if absent is the string parsed as a duration. A parse failure logs and keeps the default.
timeouts.write
int seconds or duration string
15s
WriteTimeout. This is the only unconditional ceiling on a synchronous rule execution.
timeouts.readheader
int seconds or duration string
5s
ReadHeaderTimeout.
timeouts.defaultcontexttimeout
duration string
1s
Global fallback context timeout registered with the timeout checker.
timeouts.services
list of maps
empty
Per-service timeout table. Only the entry whose name equals rules is applied; when no entry matches, previously loaded service timeouts are cleared. Loaded at boot and on every tenant refresh.
timeouts.services[].defaultcontexttimeout
duration string
none
Default deadline for the matched service entry.
timeouts.services[].timeouts.enabled
bool
true
Enables the matched service entry.
timeouts.services[].pathconfig[].expr
string (regexp)
none
URL path pattern the entry applies to. Invalid patterns are logged and skipped.
Tenants whose config is fetched at boot so it is resident before the first request. Failures log warm tenant on start failed and boot continues.
Entries must be full four-part customer:product:env:tenant keys. The refresh dispatcher requires
exactly four non-empty colon-separated parts; a short or malformed key logs a warning and returns, so
that tenant’s rules never load while the service still reports healthy and ready.
trace, debug, info, warn, error, fatal, panic or disabled. An unparseable value leaves the level unchanged.
realtimedebug
bool
false
When true, a request carrying the X-Debug-Log header or the _debug_log_ query parameter is logged at debug level for that request only. Read per request from the resolved config, so it takes effect without a restart.
None of the engine’s execution limits are configurable — there is no flag and no configuration key
for any of them. The values below are fixed for every deployment.
Limit
Value
Configurable
Effect
Max cycles
5000
No
The engine re-evaluates all rule conditions in a loop; each cycle where at least one rule is runnable increments a counter. Exceeding the cap aborts the execution.
Rule set version
1.0.0
No
Every knowledge base is keyed name plus version. The service always loads and executes at the default version.
Abort on failed rule evaluation
true
No
Any error while evaluating a rule’s when or executing its then aborts the whole execution instead of skipping the rule.
Plugin set
utility built-ins plus the document plugin
No
util, num, strings, time, math, map and array are bound in every execution. The document plugin is registered as well, so bbox is bound in any execution whose request carries document input.
The service binds one port and registers exactly three routes: POST /rule,
GET /health and GET /ready. Both probes are registered directly on the router and short-circuit
ahead of the tenant middleware, so they need no headers and no token.
Probe
Success
Failure
Body
GET /ready
200
500
ready:true / ready:false, plain text
GET /health
200
500
JSON with healthy, dependencies, memstats and version
The memstats block reports Alloc, HeapAlloc, HeapSys, HeapIdle, HeapInUse, TotalAlloc
and Sys in MiB, plus NumGC as a count. It is the only built-in memory observability for this
block. dependencies is always {} — this service registers none. version is always the empty
string: the binary never sets the value the probe reports, so do not key a deployment check on it.