Reeve Docs

Docs / Operations

Workloads configuration

Settings for workloads: the containers and pods that plugins run as, such as the Matter bridge. The workload model is in workloads. The rest of the configuration is in configuration.

Settings

Setting Default Effect
Workloads:DefaultStorageClassName unset The StorageClass the Kubernetes provider uses by default. Read only while the workload settings have never been saved. Ignored while Managed:WorkloadProviders is set, and reported as configuration.invalid. The host still starts
Workloads:Gateway:* The workload gateway. See the workload gateway
Workloads:GatewayEndpoint:* The address Kubernetes and Docker adapters dial. See the gateway endpoint
Workloads:OrphanSweep:Enabled true Background sweep that removes workload resources no instance owns
Workloads:OrphanSweep:Interval 00:05:00 How often it runs
Workloads:OrphanSweep:MaxOrphansPerPass 5 Most resources it removes in one pass
Workloads:PluginRoll:* See the plugin roll
Workloads:Reconciler:*, Workloads:Repairs:* See reconciler and repair thresholds
Workloads:ObservationReplication:* See observation replication

Node-local workload state lives under /var/lib/reeve/workloads/{pluginTypeId}/{workloadId}. The provider fixes this root. It is not a setting.

The workload gateway

Workloads:Gateway needs no configuration for a stock deployment. A value out of range, or a pair that breaks a rule below, stops the start.

Setting Default Range Effect
HelloTimeoutSeconds 10 1-120 How long a new connection may take to send its hello
ServerPingSeconds 25 1-60 How often the gateway pings a session
HandshakeRateLimitPermits 20 1-10000 Handshakes one source may attempt per window
HandshakeRateLimitWindowSeconds 60 1-3600 The window
ReauthWindowSeconds 300 30-86400 A session this close to its token's expiry is sent a reauth frame
CommandTimeoutSeconds 30 1-300 How long a command sent from another replica waits for its response before it is marked timed out. It is also the answer budget of a plugin call passed to the replica that holds the plugin's connection lease, capped at Cluster:ActionTimeBudget minus 2 s
CommandPollIntervalMilliseconds 250 50-10000 How often the waiting replica polls for the response
PresenceSweepSeconds 30 5-600 How often the shared presence store is scanned for sessions that missed their heartbeat
CompletedCommandRetentionHours 24 1-8760 How long command rows are kept after their outcome (after creation for rows still pending)
InstallEvacuationTimeoutSeconds 15 1-600 How long a plugin reload waits for evacuated sessions to close. It then proceeds and logs what is still live
InstallFenceMaxHoldSeconds 120 1-3600 Longest a reload fence may hold registrations. Must exceed InstallEvacuationTimeoutSeconds. Keep it the same on every replica, and change it only while no update is at its plugin roll
RecentHandshakeFailureWindowHours 24 1-8760 How long a failed handshake counts as recent on System status and in the gateway-status endpoint. Older failures are not counted or listed

Sidecar environment

Every sidecar reads these variables:

Variable Default Effect
REEVE_GATEWAY_URL required wss://<host>/ws/workloads/{instanceId}. The instance id in the path is the session identity
REEVE_WORKLOAD_TOKEN required The per-instance bearer. Sent in the Authorization header only, never in a query string
REEVE_SPEC_HASH empty Echoed in the handshake so an update can be certified against the rollout it produced. Empty skips the check

The manifest's health.heartbeatSeconds defaults to 30 and is part of the spec hash. A session is dead when no frame has arrived for more than three times this value, and never sooner than 90 s. A workload that declares privileges.callsBackendRest also reads BackendBaseUrl, the backend's REST address.

Tokens and approval

  • Workload tokens are stored hashed, carry no permission codes and are never logged.
  • Rotating a token revokes the old value at once and closes any live session on it.
  • A Docker or Kubernetes workload is re-applied with a fresh token on its next permitted apply, with no operator action. The token the rotation returns stays valid, but that workload does not use it.
  • A manual workload, or one handed over to manual management, keeps the revoked token until its artifact is rendered and applied again.
  • Parameter edits, token rotation and workload commands are refused while an update is in flight on that instance.

The workloads.approve permission covers privileged approvals, provider settings, force adoption, revealing or rotating a token, and the dangerous global toggles. Granting it is roughly granting node-root authority. Without it, every escalating change and every return of a live credential fails.

The gateway endpoint

Setting Default Effect
Workloads:GatewayEndpoint:BackendServiceName reeve-backend The backend Service a Kubernetes adapter pod dials when the Kubernetes gateway URL is blank: ws://<name>.<namespace>.svc.cluster.local, port 80. The Helm chart sets it to its own Service (<fullname>-backend). Set it yourself only outside the chart. On Docker it is the backend's container hostname
Workloads:GatewayEndpoint:BackendNamespace unset Pins the namespace in that URL. Unset, the backend reads its own pod's namespace. Adapters in a remote cluster cannot resolve in-cluster DNS, so they need a gateway URL
Workloads:GatewayEndpoint:DefaultNamespace reeve Used only when the pod's namespace cannot be read and the Kubernetes settings name none
Workloads:GatewayEndpoint:BackendPort 8080 Docker only: ws://<BackendServiceName>:<port>
Workloads:GatewayEndpoint:BackendServicePort 80 Kubernetes only: the Service port in that URL. The URL carries :<port> only when it is not 80. The chart does not set it, so a chart service.backend.port other than 80 needs this key or a gateway URL

This section is validated on first use, not at start.

The orchestrator settings

The workload settings under Integrations, Workloads are three records. Each is saved on its own, with its own Save button. A save leaves unsaved edits in the other sections alone.

The reconciliation pause has no Save button. Ticking it asks for confirmation, because a pause stops installs, updates and drift repair for every workload. Unticking resumes at once.

Every save route needs workloads.approve and answers with the whole settings document, secrets masked.

Method Path What it does
GET /api/integrations/workload-orchestrator Returns workloadProviders, workloadOrchestrator and reconciliationPaused. Needs integrations.manage
PUT /api/integrations/workload-orchestrator/providers/{provider} Replaces one provider's entry, gateway URL included. The body is the bare entry. A provider that is not compiled into the build answers 400
PUT /api/integrations/workload-orchestrator/selection Replaces the selected provider, the unpinned-image policy and the registry mirrors
PUT /api/integrations/workload-orchestrator/reconciliation-paused { "paused": true } or false, the global pause
GET /api/integrations/workload-orchestrator/gateway Returns { dockerGatewayUrl, kubernetesGatewayUrl, manualExternalGatewayUrl }, read-only. Needs integrations.manage

Saving a provider entry

An entry is a replace.

  • A key you leave out takes its default.
  • A secret you omit, or send as the mask ***, keeps its stored value. An explicit null clears it.
  • A gateway URL you omit is kept. A gateway URL sent as null is cleared.
  • An entry with no fields means the provider's defaults, apart from the secrets it keeps.
  • The panel's form sends every key it shows, so a bearer registry auth scheme survives a save. A credential row with a blank token is never posted. Retyping a kubeconfig replaces the stored secret.
  • A connection test that reaches the cluster but cannot list nodes is a warning, not a failure.

Entry and selection saves are judged before they are written, and a refusal writes nothing. A save is applied at once or refused.

Refusal Status When
provider_switch_blocked 409 The selection moves to another provider while instances still run on the current one. The body lists them
provider_in_use 409 An entry is relocated or dropped while instances or retained volumes are bound to it. The body lists the entries with their instances and volumes
unavailable 400 The selection names a provider that is not compiled into this build, or Docker while the backend runs as a cluster

Every compiled-in provider counts as configured. An entry with no fields means its defaults.

Relocating means changing where workloads run: the namespace, connection mode or API server of a Kubernetes entry, or the socket of a Docker one. The Manual entry has no placement.

  • Relocating an entry that nothing uses is saved, the active provider's included.
  • An instance in any state, a terminating one too, or a retained volume bound to the entry blocks the relocation. Uninstall the instances with data retention, purge or restore the retained volumes the refusal lists, then save again.
  • The active provider's entry cannot be dropped while it is selected.
  • Rotating a credential that resolves to the same server, and editing a network name, volume prefix or gateway URL, are not relocations. A kubeconfig that points at another API server is.

The pause is state, not configuration, so you can pause while another section is refused. A stored secret left unprotected stops every save, the pause included.

The gateway URLs

The three addresses a sidecar dials are keys of the provider entries: gatewayUrl on the Docker and Kubernetes entries and externalGatewayUrl on the Manual one. Set them with the entry on the provider form.

A value is stored as written and the save validates nothing. An address that cannot work is reported where it is used:

  • The install preflight of a Docker or Manual workload reports it as a failed check.
  • The provider form's connection test reports it in its result.
  • Rendering a Manual workload's artifacts answers 400.

The Kubernetes entry is used as written. See workloads.

Managed workload settings

The deployment can declare the provider entries and the selection as two separate applied snapshots. Declare either, both or neither. A feature that is not declared keeps its rows, edited in the panel, and the other feature's declaration is judged against what is served.

Section Holds
Managed:WorkloadProviders The provider entries (Docker, Kubernetes, Manual)
Managed:WorkloadOrchestrator The selected provider, the unpinned-image rule and the registry mirrors

While a feature is managed, its panel section is read-only and its write routes answer 409 feature_managed. The reconciliation pause is never declared. It stays a database write and is always allowed.

Providers

A provider is configured exactly when its key is declared with at least one setting. An empty object ("Manual": {}) is refused as a shape error naming the provider. To declare a provider with no real setting, use an empty value: "ExternalGatewayUrl": "" for Manual, "SocketUri": "" for Docker or "ConnectionMode": "inCluster" for Kubernetes. A provider that is not declared cannot be selected. Only Docker, Kubernetes and Manual can be declared.

Key Fields
Docker SocketUri, NetworkName, GatewayUrl, RegistryCredentials (a list of HostPattern, Username, Token and AuthType, basic or bearer)
Kubernetes Namespace, ConnectionMode (inCluster or remoteKubeconfig), Kubeconfig, KubeconfigContext, DefaultStorageClassName, ImagePullSecretName, AllowUnsupportedOverrides, GatewayUrl
Manual ExternalGatewayUrl

Selection

Key Default Effect
Provider required docker, kubernetes or manual. There is no automatic detection, and an empty value is refused
AllowUnpinnedImages false Whether a workload image without a digest pin may run
Mirrors empty A list of MatchRegistry and MirrorRegistry
{
  "Managed": {
    "WorkloadProviders": {
      "Kubernetes": {
        "ConnectionMode": "remoteKubeconfig",
        "Kubeconfig_FILE": "/run/secrets/kubeconfig",
        "Namespace": "reeve-workloads"
      },
      "Manual": {
        "ExternalGatewayUrl": ""
      }
    },
    "WorkloadOrchestrator": {
      "Provider": "kubernetes"
    }
  }
}

Secrets

The secrets are Kubernetes:Kubeconfig and each Docker:RegistryCredentials:<n>:Token, in the forms X, X_FILE and X_REF. A reference or a file is recommended.

  • An inline value is stored in the snapshot, protected. Changing it makes a new version.
  • A value rotated under the same reference or file is picked up at the next restart or activation. It is not a new version.
  • A file or reference for a kubeconfig must hold the whole kubeconfig, self-contained.

When a managed list is removed, a reference that does not resolve on the releasing replica is left not set, and nothing else changes. The replica logs each field that came back not set (the provider and the field, never a value). Enter those secrets again in the panel.

  • A remote Kubernetes entry keeps its namespace, connection mode and context, with the kubeconfig not set.
  • A registry credential keeps its host pattern, user name and auth type, with the token not set.
  • The Docker socket is carried over.
  • Entering a missing kubeconfig is not a relocation. While it is not set, the entry does not block writes to another entry or to the selection. Enter the kubeconfig of the same cluster. A different cluster cannot be judged, because the entry has no API server to compare.

Errors and waiting versions

A declaration never stops the boot.

  • A shape error (an unknown key, a provider that cannot be declared, a missing Provider, a value out of range) and a reference that does not resolve on a replica are reported in the system status for that replica and as configuration.invalid. The fleet keeps serving the last applied version, or the database rows when none has been applied.
  • A declaration that is well formed but judged unsafe waits as a pending version with one of the codes below. The active version keeps serving. A reason that lasts 15 minutes raises configuration.pending.

When several codes apply, the first in the table is reported. A configuration error comes before the instances and volumes that would also hold the version, because removing them cannot help while the configuration is wrong. The reason names the instances, volumes or entries involved and never a secret value.

Code The version waits because
declaration_invalid A declared value fails the provider's own content check, for example a kubeconfig that does not parse or has no usable context
target_not_configured The selection names a provider the served list does not configure, or Docker while the backend is clustered
provider_switch_blocked The selection moves to another provider while instances still run on the current one
provider_in_use A provider is dropped while it is the active provider, or dropped or relocated while instances or retained volumes are bound to it. A provider counts as configured whether or not it has an entry, so leaving out the active provider is held even when it never had settings

Changing providers

Each feature is judged against the other as it is served: the providers list against the active selection, and the selection against the active list.

A commit that drops the active provider's entry and in the same commit switches to an entry that is not yet active waits on both features. Add the new entry first and let it activate. After that:

  • One commit that switches the selection and drops the old entry activates in two steps: the selection first, then the list, because nothing runs on the old provider any more.
  • Switching the selection in one commit and dropping the old entry in a later one works as well.

The old entry stays in the list until nothing runs on it.

Pending provider switch

While the selection is managed and the declared Provider differs from the provider in force, the host holds a pending switch. This includes the first managed start of an installation that auto-detected. It also applies on a replica that cannot serve the orchestrator settings or the providers list.

These answer 409 provider_switch_pending. The body names declaredTarget, activeProvider and the pending reason when there is one:

  • the install or update of a plugin that declares workloads
  • the restore of a workload from a retained volume
  • adoption of a container or pod, forced or not

The consent for a workload waits and is retried. It is not reported as a failure. Everything else keeps working: purging or marking a retained volume handled, orphans, relocation, the per-instance commands (start, stop, restart, reinstall, uninstall), the reconciliation pause, the provider test and the gateway status. So the instances that block the switch can be removed.

What the API shows

GET /api/integrations/workload-orchestrator carries a managed object while either feature is managed. It holds:

Member Meaning
a state per feature declaredSha, declarationError, the active version (null while the rows serve), the pending head, and notServedReason
notServedReason Set when this replica cannot serve the active snapshot (a reference that does not resolve here). It names the field and the reference, never a value. The read still answers 200, with that feature's part left empty
configuredProviders The providers the served list configures
switchPending Whether a provider switch is pending
secrets The declared secrets by form: inline, file, reference

When only the providers list is managed, PUT .../selection answers 400 provider_not_declared for a provider that the list does not declare. The panel's Automatic choice stays selectable. When only the selection is managed, PUT .../providers/{provider} is judged against it and answers 409 provider_in_use for a drop of the active provider, or a drop or relocation that instances or retained volumes stand on. Either write saves only its own part of the rows.

Declaring the orchestrator settings is the operator's consent to them. Consent for an individual workload is never declared. It stays an approval in the panel. When an activation widens what a workload may do, that workload is suspended until it is approved there, like any update that escalates.

To remove a section, restart without it. The feature returns to the rows as described in handing a snapshot feature back. See upgrading for rolling back while a workload feature is managed.

Reconciler and repair thresholds

The workload libraries read these keys. Each is a number of seconds, and the environment variable form is Workloads__<Section>__<Key>.

Setting Default Effect
Workloads:Reconciler:StatusResyncSeconds 60 Interval of the full status and drift pass that runs next to the watch events.
Workloads:Reconciler:DeployStalledAfterSeconds 600 A workload that is still not ready this long after its deploy started is reported Degraded with the engine's reason.
Workloads:Repairs:StuckWarningAfterSeconds 900 A workload left Degraded, Failed or Unknown this long raises the workload.<id>.stuck repair, as a Warning, and as an Error for Failed.
Workloads:Repairs:CrashLoopWindowSeconds 900 A restart count that has not risen for this long clears the crashloop repair.

The plugin roll

Workloads:PluginRoll paces and bounds the turns in which an update reloads the fleet one replica at a time. See how it works and when it halts. All values are checked at start. These stop the start: a turn that could not outlive its lease, a drain that would use up the shutdown budget, and a fleet of no replicas.

Setting Default Effect
TurnBudgetSeconds 300 Longest a turn may renew its claim. A turn still running after it halts the walk. Must be greater than TurnLeaseSeconds
TurnLeaseSeconds 30 The claim's lease, on the database clock, renewed every third of it
NudgeRetrySeconds 30 How often a replica that has not started its turn is sent it again, and how often the fleet is asked for fresh reports before the roll finishes
ReplicaLivenessSeconds 30 How often the roll drops the reports of replicas that left its census, and how long such reports are kept
TurnDrainSeconds 10 How long a stopping replica waits for its turns in flight to release their rows. At most half of Hosting:ShutdownTimeoutSeconds
FleetSize unset Fixed rollout target on a clustered host. At least 1. Required there. An unclustered host always uses 1

The time values are positive whole seconds.

Set FleetSize to the number of replicas that take part in each roll. The Helm chart renders it from replicaCount on a clustered host and supports no autoscaling. workloads.pluginRoll.fleetSize or backend.extraEnv can override it.

  • On a clustered host without a value, starting a plugin update is refused with 409 fleet_size_unset, naming Workloads:PluginRoll:FleetSize. This happens before anything is installed, pinned or adopted, and the update can be retried once the value is set. The host also warns at start and the plugin-roll-fleet health check reports degraded.
  • If fewer replicas than the target are live, the roll waits for the fleet. A member stops counting when its lease runs out (Cluster:LeaseTtl). There is no overall timeout: the roll stays at "waiting for the fleet" until enough members return, or Give up ends it.
  • If more replicas are live, the target does not grow. The roll still processes each member of its current census.
  • A target above the pods that can run therefore waits until Give up.
  • With FleetSize 1, a turn may fence the only replica serving.

The fence bound also reads Workloads:Gateway:InstallFenceMaxHoldSeconds (120 s). Keep it the same on every replica.

Observation replication

Workloads:ObservationReplication controls replication of workload observations between replicas, and its stream budgets and reader timing. What it costs and how to size it is in running multiple replicas.

Enabled decides whether streams are read. When unset it follows the resolved Coordination:Clustered setting. An explicit true or false overrides that, on a single replica too. A clustered host still writes session markers when Enabled is false, so peers can record a gap instead of treating the session as missing.

Every value is an operator default. A budget that is too small shortens history and shows up as gaps. It does not cause wrong behaviour.

  • A value out of range stops the start. Byte values are 1 KiB to 16 GiB, and RedisMaxmemoryBytes is 0 to 1 TiB.
  • Budgets are never checked against each other or against Redis. A TotalBudgetBytes larger than Redis can hold is accepted and reported by the health check.

Budgets

Setting Default Effect
Enabled unset See above
PerStreamBudgetBytes 8 MiB Most one instance's stream and checkpoint hold after a trim
TotalBudgetBytes unset All streams together. Unset derives it (see below). A value is used as given
TotalBudgetPercentOfMaxmemory 20 Share of RedisMaxmemoryBytes the derived total may take. 1-100. Ignored when TotalBudgetBytes is set
RedisMaxmemoryBytes unset Redis maxmemory, for the derivation. The chart passes its built-in Redis's value. Unset or 0 gives the 64 MiB ceiling
MinShareBytes 1 MiB A share below this is reported by a metric and the health check. Nothing is refused
MaxEntryBytes 256 KiB Largest single frame appended, never above half the share. A larger one becomes a too-large marker
MaxSnapshotBytes 1 MiB The same limit for snapshot frames
MaxBatchBytes 1 MiB Largest append batch, never above a quarter of the share
MaxBatchEntries 256 Entries that send a batch early. 1-10000

The derived total is min(64 MiB, TotalBudgetPercentOfMaxmemory% x RedisMaxmemoryBytes - replicas x ReaderMaxReplyBytes). Each instance's share is min(PerStreamBudgetBytes, total / instances).

Owner (writer) side

Setting Default Effect
BatchIntervalMilliseconds 20 How often the owner appends. 1-1000
WriterQueueBytes / WriterQueueProcessBytes 16 MiB / 64 MiB The owner's queue between the socket and Redis, per session and per process. Overflow drops frames and records the drop
HandoverBufferBytes / HandoverBufferProcessBytes 16 MiB / 64 MiB Frames a new owner holds back while it replays its predecessor's tail. When full it stops waiting and reports itself incomplete
HandoverGraceMilliseconds 5000 How long a new owner waits for the previous session to close before opening anyway and recording the end as unclean. 1-300000
HandoverDrainTimeoutSeconds unset (grace + 5 s) Longest a handover, or a wait on an instance's dispatch gate, holds up the owner's own ingestion. 1-600. Not shorter than the grace
HeartbeatIntervalMilliseconds 1000 Longest the owner goes without refreshing its high-water mark when nothing is appended. 10-60000
OpenRetryMilliseconds 200 How often a new owner retries its open while the previous session is still open. 10-60000
CloseFlushMilliseconds 1000 How long a closing session may spend flushing its queue. Frames it could not append are a gap. 0-60000
OomRetryMinSeconds / OomRetryMaxSeconds 5 / 60 Backoff after Redis refuses a write as out of memory. 1-3600 each. A writer paused longer than the maximum is reported by the health check
CheckpointIntervalSeconds 60 How often the owner asks its plugin for a checkpoint when it has ingested something since. 5-3600
DormantAfterHours 24 How long a closed chain is kept before the sweep deletes it. 1-8760
InstanceRegistrationSeconds 60 How often an owner re-registers its instance, and how often the leader's sweep runs. 1-3600

Reader side

Setting Default Effect
ReaderQueueBytes / ReaderQueueProcessBytes 8 MiB / 64 MiB A replica's queue between Redis and the plugin. Overflow is reported as a gap
ReaderMaxReplyBytes 1 MiB What one poll may read across every instance it follows
PollIntervalMilliseconds 250 Polling interval. Also the first backoff after a failed round and Adaptive's interval while busy. 50-10000
ReaderMode unset Polling, Interrupt or Adaptive. Unset is Adaptive when the idle interval is at least the poll interval, otherwise Polling. See choosing a reader mode
IdlePollIntervalMilliseconds 5000 Longest Interrupt, and Adaptive while quiet, go without a full round. 250-30000, and not below PollIntervalMilliseconds in those modes. In quiet Adaptive mode, follower lag can reach this value if a hint is missed
InstanceCountCacheSeconds 10 How long the instance count, and each replica's list of instances to follow, is reused. 1-3600
InstanceCountRefreshTimeoutMilliseconds 2000 Longest a background instance and membership refresh may take before the cached share is kept. 100-30000

For each per-session and per-process pair of byte values, the per-session value must not be larger than the per-process value. OomRetryMinSeconds must not exceed OomRetryMaxSeconds.

Helm chart

The chart exposes enabled, the three budget values, handoverGraceMilliseconds, pollIntervalMilliseconds, readerMode, idlePollIntervalMilliseconds, checkpointIntervalSeconds, dormantAfterHours and redisMaxmemoryBytes under workloads.observationReplication (see Helm chart values). Set the others as Workloads__ObservationReplication__<Setting> environment variables through backend.extraEnv. The chart leaves enabled null, so it follows the rendered Coordination__Clustered setting.