Skip to content

Durable runtime state

Every node gets its own volume, and what is on it is the node's identity. The volume is what makes a restart a continuation rather than a new join.

What the bundle renders

  persistentVolumeClaimRetentionPolicy:
    whenDeleted: Retain
    whenScaled: Retain
  volumeClaimTemplates:
  - metadata:
      name: cursor-state
    spec:
      accessModes: ["ReadWriteOnce"]
      resources:
        requests:
          storage: "1Gi"

The claim is mounted at /var/lib/xratu in both the init container and xratud:

        volumeMounts:
        - name: cursor-state
          mountPath: /var/lib/xratu

What lives on it

Path Holds
/var/lib/xratu/identity/xratud.bootstrap.json The bootstrap seed: identity set, runtime credential, invitation scope, discovery pin, watch revision
/var/lib/xratu/identity/xratud.identity.json Runtime identity state
/var/lib/xratu/identity/xratud.runtime.cache.json Cached runtime state
/var/lib/xratu The watch cursor and node-local working state

The seed is written by the init container at enrollment and read on every subsequent start. See Identity continuity.

What the retention policy buys

Retain on both conditions is the deliberate choice.

flowchart TB
  P["Pod dp-eu-west1-1"] --> R{"What happened?"}
  R -->|"restart"| K1["Volume kept<br/>same installation identity"]
  R -->|"scaled down"| K2["Volume kept<br/>same node returns on scale up"]
  R -->|"StatefulSet deleted"| K3["Volume kept"]
  R -->|"volume deleted"| N["New installation identity<br/>enrols as a new node"]

On restart, the pod remounts its claim and reads back the same installation identity, so the control plane reuses its dataplane_uuid and enrollment_uuid.

On scale down, the claim survives. Scaling from 3 to 2 and back to 3 returns the original third node rather than introducing a fourth.

On StatefulSet deletion, the claims remain, so re-applying the bundle reconnects the existing nodes.

Sizing it

The default request is 1Gi, which covers the identity files, the watch cursor, and node-local working state. Artifact bytes are cached separately and the control plane holds no tenant bytes at all, so this volume stays small.

The storage class is whatever your cluster defaults to. A node's identity is on it, so choose a class that survives node failure rather than local ephemeral storage.

Treat it as part of the node

Deleting a claim is deleting a node. The next start comes up with no installation identity, arrives as a new installation, and receives a new dataplane_uuid.

Where that is what you want, retire the old enrollment first so its node label is released for the replacement to reuse. See Manage an enrollment over its life.